Oolite Bulletins

For information and discussion about Oolite.
It is currently Sat Dec 16, 2017 5:26 am

All times are UTC




Post new topic  Reply to topic  [ 18 posts ]  Go to page 1 2 Next
Author Message
 Post subject: Python model converters
PostPosted: Sun Jul 30, 2017 12:13 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 441
Quick question concerning the Python model converters: I want to modify a .dat model which uses several textures, but I can't convert it into an .obj file while keeping the same textures applied to the model. Do I need to import it without any textures and then manually re-UV-map it?


Top
   
PostPosted: Sun Jul 30, 2017 3:33 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 441
Or rephrasing it: what is the best workflow to alter someone else's .dat model using Wings3D, which may use more than one single texture?


Top
   
PostPosted: Sun Jul 30, 2017 5:26 pm 
Offline
Deadly
Deadly
User avatar

Joined: Sat Jan 25, 2014 2:35 am
Posts: 189
Location: floating the Blackfoot
The UV layout is preserved so you should be able to apply the same textures once you convert the model back to a .dat, but any modified faces of the model that don't match up with the original UV layout may not be textured properly.
I converted a model, loaded it into wings, made a modification, then exported it. I had to edit the .dat to get it to use the old texture, down near the bottom of the file I changed:
Code:
NAMES 1
0
to the original texture:
Code:
NAMES 1
witchfire-saloon-33.png
Defiantly got some distortion but I really enlarged a few surfaces next to the dock:
Image
Unless you are going to make any drastic changes to existing faces or add new ones it seems to work.

_________________
Realize collective conscious creation


Top
   
PostPosted: Sun Jul 30, 2017 7:24 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 441
Hi Stormrider, thanks for the reply!
Quote:
The UV layout is preserved so you should be able to apply the same textures once you convert the model back to a .dat, but any modified faces of the model that don't match up with the original UV layout may not be textured properly.
Yes, that is exactly my problem: unfortunately my case is complicated because I am adding new faces to the model, but also because this model uses more than one texture. I so much wished there was a trivial way of editing this, having to use these conversion tools and running into all these problems is so off putting for someone just starting out with 3D modelling :(


Top
   
PostPosted: Sun Jul 30, 2017 7:41 pm 
Offline
Deadly
Deadly

Joined: Thu Aug 27, 2015 4:24 pm
Posts: 247
imagine a thin person -> mr bean

you are adding/inserting large protruding objects into mr bean, how does mr beans skin behave?

you are lucking if you can use the existing uv map ( with small changes ), i think you have to make a new uv map when making many big changes,
you can make the new additions into a new model itself, make a new uvmap/texture for the new model and 'add' as a subentity

think of it as skin, if you move your nosebone to your chin does the noseskin automatically move with it?

:)


Top
   
PostPosted: Sun Jul 30, 2017 8:21 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 441
@cbr I understand that, but what I actually called frustrating is how cumbersome is the process of converting dat <-> obj and how those Python converters do not handle objects with more than one texture, not the fact that adding faces result require a new UV-map. The issue is that, if I understand correctly, there is a limitation with those Python conversion programs that make you have to either import dat models that use one single texture or import a dat model ignoring textures. And then there is the cumbersome workflow for editing an existing model: dat -> obj, import obj and save as wing, export it back as obj, convert back to dat, perhaps edit it manually as to add the textures back to the file. :cry:


Top
   
PostPosted: Sun Jul 30, 2017 9:27 pm 
Offline
Deadly
Deadly

Joined: Thu Aug 27, 2015 4:24 pm
Posts: 247
Perhaps you could rephrase your frustations with the different tools into one simple question, somebody could know a solution, a tool or a script which could help you.


Top
   
PostPosted: Sun Jul 30, 2017 9:35 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 441
Quote:
Perhaps you could rephrase your frustations with the different tools into one simple question, somebody could know a solution, a tool or a script which could help you.
My apologies. My question is: what is a reasonable workflow to edit an DAT model using Wings3D when the DAT model in question uses more than one texture and therefore can only be converted into OBJ by ignoring all textures? Is there an easy way of doing that?


Top
   
PostPosted: Mon Jul 31, 2017 1:35 pm 
Offline
Deadly
Deadly
User avatar

Joined: Sat Jan 25, 2014 2:35 am
Posts: 189
Location: floating the Blackfoot
Quote:
Yes, that is exactly my problem: unfortunately my case is complicated because I am adding new faces to the model,
I think you will have to create a new UV map then. I am not sure if there is a way to add new faces to an existing UV layout in wings without creating a new UV map. If the new faces aren't on the UV map they won't get textured at all.
Quote:
obj and how those Python converters do not handle objects with more than one texture,
I believe this is more of a limitation of the OBJ file, I have read that they only support one material so the python converter will only apply that to the model in the conversion process.
Quote:
I understand that, but what I actually called frustrating is how cumbersome is the process of converting dat <-> obj and how those Python converters do not handle objects with more than one texture, not the fact that adding faces result require a new UV-map. The issue is that, if I understand correctly, there is a limitation with those Python conversion programs that make you have to either import dat models that use one single texture or import a dat model ignoring textures. And then there is the cumbersome workflow for editing an existing model: dat -> obj, import obj and save as wing, export it back as obj, convert back to dat, perhaps edit it manually as to add the textures back to the file.
Your frustration is understandable but its not really the converters, I have the same issues with OBJ files exported from one model utility and imported into another, eg makehuman ->blender (no conversion software involved).
Please don't give up, the texture packs you created look awesome.

_________________
Realize collective conscious creation


Top
   
PostPosted: Mon Jul 31, 2017 2:09 pm 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 178
Quote:
My apologies. My question is: what is a reasonable workflow to edit an DAT model using Wings3D when the DAT model in question uses more than one texture and therefore can only be converted into OBJ by ignoring all textures? Is there an easy way of doing that?
If you can point me to such a model you want to deal with, I can show you what Blender can do with the converted DAT file. I had some tweaks made on the python conversion scripts, and they might fit your needs.


Top
   
PostPosted: Mon Jul 31, 2017 2:47 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 441
@Stormrider Thanks for the answer and for the info, Stormrider, I really appreciate it. I will continue taking a look at this, let's see how it goes :)

@Commander_X Many, many thanks. Well, I am trying to increase the poly count of the asteroid part of the new Imperial Astrofactory. You can download the latest version using the in-game extension manager.


Top
   
PostPosted: Mon Jul 31, 2017 11:15 pm 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 178
Well here are some quick results of how the station looks in Blender:
matcap
Image

textured
Image

I didn't put too much effort into materials for the textured version, I mainly split the UV from how Blender imports it.
Here is the version of the script I used for conversion. You'll definitely want to manually create the materials, and match the textures.


Top
   
PostPosted: Mon Jul 31, 2017 11:41 pm 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 178
Ok, I looked back at the posts in this thread, and it seems that not the conversion was the culprit, but the modelling afterwards.

Unfortunately, the conversion back from the models in-game will result in triangulated meshes. That is a no-no for modelling/changing the model.
You will have to take your time and merge the triangles to quads following the layout of the UVs in order to be able to properly make changes to the model, otherwise you won't be able to reuse the original textures.


Top
   
PostPosted: Tue Aug 01, 2017 12:02 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 441
Quote:
Unfortunately, the conversion back from the models in-game will result in triangulated meshes. That is a no-no for modelling/changing the model.
I do not understand what you mean, Commander_X. I am aware of what are triangle and quad meshes, but I don't understand what is a "no-no" regarding them. Wings3D can use either type of mesh, and I have successfully exported both types of mesh to Oolite. Could you explain this better to me?

Also, many many thanks for taking a look at this.


Top
   
PostPosted: Tue Aug 01, 2017 2:16 pm 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 178
Here's a final quote from an answer to a similar question:
Quote:
Quads at the assets creation level, and triangles at the engine level!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 18 posts ]  Go to page 1 2 Next

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited