Converting to .dat
Moderators: winston, another_commander
Converting to .dat
I've made a model for a corvette-type ship using Wings3D (first time I model anything actually), I've tried using the script obj2dattex.py but it says 'invalid syntax'. (I typed obj2dattex.py shipname.obj). What am I doing wrong?
Re: Converting to .dat
Welcome onboard Ross154 .-)
Under Windows:
1. E.g. your model (myModel.obj, myModel.mtl and myModel_auv.png) is located in D:\Mods.
2. Copy the obj2dattex.py in that folder (D:\Mods) via Explorer.
3. Open a Dos-Box (cmd.exe).
4. Type in cd d:
5. Type in cd Mods
6. Type in Obj2DatTex.py myModel.obj (or for the sloppy ones like me: obj2dattex.py myModel.py)
Under Windows:
1. E.g. your model (myModel.obj, myModel.mtl and myModel_auv.png) is located in D:\Mods.
2. Copy the obj2dattex.py in that folder (D:\Mods) via Explorer.
3. Open a Dos-Box (cmd.exe).
4. Type in cd d:
5. Type in cd Mods
6. Type in Obj2DatTex.py myModel.obj (or for the sloppy ones like me: obj2dattex.py myModel.py)
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: Converting to .dat
Also, the ship has an odd position and orientation. The front end should be in direction of the 'z', while the top should be towards the 'y'. Finally, the whole model should be centered around the origin.
Re: Converting to .dat
I'd also say from the screenshot that it's not been UV mapped (select the whole object and then it's the bottom entry on the right-click menu). That needs to be done to create the .mtl file and from that the texture layout.
And from the design, it's going to be an absolute bitch to map (if it's possible at all)...
And from the design, it's going to be an absolute bitch to map (if it's possible at all)...
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Re: Converting to .dat
Thanks for your tips. I had installed Python 3.x, installing 2.7 it could convert the object. By the way I don't know how to test it in game (untextured would be fine).
- MiMoriarty
- Competent
- Posts: 39
- Joined: Mon Nov 14, 2011 1:03 pm
- Location: Madrid, España
- Contact:
Re: Converting to .dat
I used a tip from Simon B.By the way I don't know how to test it in game (untextured would be fine).
Edit a standart savegame and search for this string:
Code: Select all
<key>ship_desc</key>
<string>cobra3-player</string>
After that launch Oolite and use the external views to see how it looks.
There is an art, it says, or rather, a knack to flying. The knack lies in learning how to throw yourself at the ground and miss. … Clearly, it is this second part, the missing, which presents the difficulties.
Blog http://mimoriarty.wordpress.com/
Blog http://mimoriarty.wordpress.com/
Re: Converting to .dat
The scripts are for Python 2.x . Iirc (and this may be wrong) I don't think they work with 3.x as you seem to have discovered yourself/Ross154 wrote:Thanks for your tips. I had installed Python 3.x, installing 2.7 it could convert the object. By the way I don't know how to test it in game (untextured would be fine).
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Re: Converting to .dat
Thank you all, I can see my ship in game . How can I add textures?
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Converting to .dat
Hi Ross154,
You should be able to produce a diffuse_map (texture) and normal_maps etc from the modelling software. You might find my Texture tutorial on the wiki useful as well.
You should be able to produce a diffuse_map (texture) and normal_maps etc from the modelling software. You might find my Texture tutorial on the wiki useful as well.
Commander Smivs, the friendliest Gourd this side of Riedquat.
Re: Converting to .dat
As I said above I think the problem will come before your tutorial kicks in, namely UV mapping the model in Wings to generate the basic diffuse map to be textured. That model has a lot of feature details and intricate bits, which usually gives Wings a headache.
I've found a web tutorial on doing that here but as your model is so complex then you may hit problems, or at least you'll need to chop it up quite intricately to get anywhere. For me this is the most frustrating bit of model-making, as it can often take longer to get the UV map right than it did to make the model in the first place.
But once you have your map (maybe having simplified your model a bit) then Smivs' tutorial should guide you the rest of the way to getting it in-game fully.
I've found a web tutorial on doing that here but as your model is so complex then you may hit problems, or at least you'll need to chop it up quite intricately to get anywhere. For me this is the most frustrating bit of model-making, as it can often take longer to get the UV map right than it did to make the model in the first place.
But once you have your map (maybe having simplified your model a bit) then Smivs' tutorial should guide you the rest of the way to getting it in-game fully.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Re: Converting to .dat
Thank you for all your tips I managed to apply some textures (not original, you'll recognize them, it's just to try it ).
The edges are thick because I mistakenly generated the UV map with edges 2 pixels wide. Other than that it's been very nice to see it in game . I have yet to understand a couple of things in Wings3d (material and texture handling for different parts of an object) but I found a workaround for this ship that made things easier for me . Textures can be improved.. (top column above all..). The engine glow wasn't in the right position so I shut it down.