Create New model
Moderators: winston, another_commander
- Danam22315
- Above Average
- Posts: 17
- Joined: Wed Jun 09, 2010 2:42 pm
- Location: Nova Scotia, Canada
Create New model
I have installed Oolite 1.75, and am running Windows XP.
Icreated a new model using Wings3D. and exported the file in the wave format, but it created 2 files "myshipname.obj", and "myshipname.mtl".
Which do I use to create the model with Python? Or do I use both?
Icreated a new model using Wings3D. and exported the file in the wave format, but it created 2 files "myshipname.obj", and "myshipname.mtl".
Which do I use to create the model with Python? Or do I use both?
Last edited by Danam22315 on Tue Mar 01, 2011 7:29 pm, edited 1 time in total.
Insanity takes its' toll. Please have exact change.
Re: Create New model
Both, plus the texture template file (.png format) that you can also get Wings to spit out with suitable coaxing via the UV mapping menu command. Then run the .obj file through obj2dat.py (it will inhale the .mtl file too) and the .dat file is your model, and the .png file is your texture (to be painted using GIMP or the graphics package of your choice).
There are various tutorials and threads about it on the wiki, the web and around here.
There are various tutorials and threads about it on the wiki, the web and around here.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Danam22315
- Above Average
- Posts: 17
- Joined: Wed Jun 09, 2010 2:42 pm
- Location: Nova Scotia, Canada
Re: Create New model
Can I create a model without creating a texture? Just to see what it looks like?Thargoid wrote:Both, plus the texture template file (.png format) that you can also get Wings to spit out with suitable coaxing via the UV mapping menu command. Then run the .obj file through obj2dat.py (it will inhale the .mtl file too) and the .dat file is your model, and the .png file is your texture (to be painted using GIMP or the graphics package of your choice).
There are various tutorials and threads about it on the wiki, the web and around here.
Also, when I download the Obj2DatTex.py file, what format am I supposed to save it as?
Text???
Insanity takes its' toll. Please have exact change.
Re: Create New model
Yes text format (although it should end in .py rather than .txt). It's a script file.
As to model without a texture, I don't think so if you want to use it in-game. But you can export a "blank" texture (just plain white, with only the edges drawn onto it by Wings) and use that for a sneak preview.
As to model without a texture, I don't think so if you want to use it in-game. But you can export a "blank" texture (just plain white, with only the edges drawn onto it by Wings) and use that for a sneak preview.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Danam22315
- Above Average
- Posts: 17
- Joined: Wed Jun 09, 2010 2:42 pm
- Location: Nova Scotia, Canada
- Danam22315
- Above Average
- Posts: 17
- Joined: Wed Jun 09, 2010 2:42 pm
- Location: Nova Scotia, Canada
Re: Create New model
I'm still having a problem creating a dat file.
I think I have figured out how to segment the ship, but I still don't know how to create a png pic. do I use the File + Save the Selected option? Do I somehow export the pic?
I have Wings3D V 1.3.01, and am running windows.
I tried to create a dat file and after it says creating... I get an error!
Where can I find out how to use Wings3D?
P.S. I downloaded the manual for Wings3D 1.6.0 and it was no help at all.
I think I have figured out how to segment the ship, but I still don't know how to create a png pic. do I use the File + Save the Selected option? Do I somehow export the pic?
I have Wings3D V 1.3.01, and am running windows.
I tried to create a dat file and after it says creating... I get an error!
Where can I find out how to use Wings3D?
P.S. I downloaded the manual for Wings3D 1.6.0 and it was no help at all.
Insanity takes its' toll. Please have exact change.
- 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: Create New model
For creating a .png you need Photoshop or another graphics software. Wings3D only uses a picture as a texture, it's not a software for creating/manipulating pictures.Danam22315 wrote:I still don't know how to create a png pic.
-
- ---- E L I T E ----
- Posts: 471
- Joined: Sun Jan 23, 2011 9:27 pm
- Location: Belgium, Monarchy, Feudal, Overtaxed system
Re: Create New model
Hi Danam22315. And welcome.
A full list of the tools to create a model from A to Z can be found in this thread https://bb.oolite.space/viewtopic.php?f=4&t=9305
- It's always easier to create something simple to start with and test, like a brick for example. Texture it and bring it ingame.
- Also if you have Wings 3d, you should also download the (excellent and free) manifold lab plugins and install them. Google them as I don't remember the link from the top of my head. They will come handy if you want to use a Boolean operation on two objects. For example if you wanto cut a rectangular hole in a wing or something like that.
Google that in youtube as well, they have some demo videos of the plugin there.
Tip 1.
Now if you have created your brick export it as an obj file to a folder. That folder will contain 2 files:
Brick.mtl and Brick.obj. Both files can be opened with a text editor like notepad (Dont' use wordpad though). I use notepad to open the mtl file to check if it contains a texture reference. That is a reference to a bitmap file like a tga, png bmp etc. Sometimes when you export your model and there is no reference to a bitmap file in your mtl file, the converter (OBJ2DatTex.py) will not create one either and you will see no texture ingame.
You can actually change the line with the text editor without opening wings which is sometimes easy if you just want to change it from "map_Kd brick.tga" to for example "map_Kd brick.png" in a heartbeat before converting it to a dat file that Oolite will recognise.
brick.mtl example.
Tip 2
Before you start making a texture, you need to UV-Map your model. Remember paper models that you used to cut up as a kid and then fold so they would become a 3d tank or house or car etc.... well this is exactly what UV-mapping is about and what you should do to your brick only the other way round. You will make a 2D "map" of your brick cutting up the 3d model so it would fold out in 2d that you can use to draw stuff into so it will show on your texture.
There is a UV-mapping tutorial of a cube out there somewhere for wings 3d. Google it, otherwise follow these steps.
- Basically create a cube.
- Select it (so it's red) and right click
- In the menu, go to the bottom menu more->and click UV-mapping
- A window opens and then you can either AUTOmap (by projection or feature detection) or Manually, or both. (right click -> segment by)
- When you are satisfied with how the model will be cut and folded open (something you will get good at by getting your hands dirty!) You can mark edges that should be cut and change the colors on the cube. Identical colors that share a vertice or an edge will be attached to each other, so a little bit of care is necessary when choosing where to cut . Make sure there is a seperate coloured surface if you want them to be seperated on your 2d map.
-In the window with the cube having the different colors, right click again and choose continue Projection normal.
If eveything went well (no errors) you will see a window open with which is the uv editor window accessible from window->UV editor window if you close it. Remember to select something on your model or the window will not open. From this window with a right click you can create a basic texture (bmp, tga, png that will be created). You will see in your main window that your brick now has all kinds of letters painted on it. If no letters are distorted, you cut up your model correctly, if not you will have to undo your steps correct the faces texturing. Use Window-> outliner to view the default texture that was painted on your brick. You can now export that texture as an image file and change it in a Photoshop, the gimp, paint etc and save it. Import it again in wings and your cube will have the colors you put on it in your image manipulation program. The outlines of the cube on the texture "tell you" where to paint in Photoshop etc) and you can always select faces on the model and move them about in the UV-editor window, to where your texture is, it works both ways.
Then select everything and export it as a obj file to a folder and make sure that following 4 files are there in the same folder for conversion. The image goes straight to the texture folder in your oxp.
A) Brick.mtl
B) Brick.obj
C) Obj2DatTex.py
D) Convert.bat
D) create a notepad (.txt file and change the extension to bat). Call it convert.bat or something similar (make sure you have the extentions for known file types turned ON, otherwise you will see it as convert.bat, but it will actually be called convert.bat.txt and wont do a thing when double clicked exept open and show you the text you typed in) The Icon of the file should be a couple of gears on a white background, to edit it you should right click and press edit.
Now copy the line below into your batch file and save it. Obviously change brick.obj to your the filename of your model.
to convert your model from Obj to Dat you just need to double click the batch file now instead typing lines in the console.
Open your newly converted dat file with the text editor and scroll down to the bottom. If there are lines that indicate the presence of a bitmap file, the conversion was succesful and the texture (with the same name as in the dat file) and in the texture folder of your oxp will show up as it should ingame.
Tip 3
ALL, I repeat ALL faces of the model must be UV-mapped. If you encounter any popup errors in wings 3d when doing the projection normal operation in the UV-mapping window, you will have to track down the piece that has not been mapped and delete/hole/dissolve it in the main window hoping that it doesnt wreck the appearance of your model or Tesselate it if possible and try the UV mapping again.
Tip 4
It is advised to divide a complicated model in different more simple objects, and export the selected pieces as individual obj files. (use the extract menu for that purpose (right click) and the Geometry graph window (window->geometry graph ). Oolite supports the use of subentities which are different dat files dependent on another dat file. Basically it means you could have a fuselage.dat and a wing.dat and make the wing.dat a subentity of the fuselage in the shipdata.plist file of your model.
Tip 5
If you add light effects to your brick, make sure that you export the model with "hemispherical lighting" set as shader in wings3d. It is normally the default activated shader when you install wings 3d but should you change it to view it differently in wings be sure to put it back to hemispherical lighting under the VIEWS>SHADERS menu in wings.
If you don't your effects map will not show ingame.
That's about all I can say for now. It takes a little bit of time to get to know wings 3d, but by the end of the week you should be on your way.
Have fun
XIII
A full list of the tools to create a model from A to Z can be found in this thread https://bb.oolite.space/viewtopic.php?f=4&t=9305
- It's always easier to create something simple to start with and test, like a brick for example. Texture it and bring it ingame.
- Also if you have Wings 3d, you should also download the (excellent and free) manifold lab plugins and install them. Google them as I don't remember the link from the top of my head. They will come handy if you want to use a Boolean operation on two objects. For example if you wanto cut a rectangular hole in a wing or something like that.
Google that in youtube as well, they have some demo videos of the plugin there.
Tip 1.
Now if you have created your brick export it as an obj file to a folder. That folder will contain 2 files:
Brick.mtl and Brick.obj. Both files can be opened with a text editor like notepad (Dont' use wordpad though). I use notepad to open the mtl file to check if it contains a texture reference. That is a reference to a bitmap file like a tga, png bmp etc. Sometimes when you export your model and there is no reference to a bitmap file in your mtl file, the converter (OBJ2DatTex.py) will not create one either and you will see no texture ingame.
You can actually change the line with the text editor without opening wings which is sometimes easy if you just want to change it from "map_Kd brick.tga" to for example "map_Kd brick.png" in a heartbeat before converting it to a dat file that Oolite will recognise.
brick.mtl example.
Code: Select all
# Exported from Wings 3D 1.4
newmtl Brick_ship
Ns 100.0
d 1.0
illum 2
Kd 1.0 1.0 1.0
Ka 1.0 1.0 1.0
Ks 1.0 1.0 1.0
Ke 0.0 0.0 0.0
map_Kd brick.png
newmtl default
Ns 100.0
d 1.0
illum 2
Kd 0.8200000000000001 0.9049993849536925 1.0
Ka 0.8200000000000001 0.9049993849536925 1.0
Ks 1.0 1.0 1.0
Ke 0.0 0.0 0.0
Before you start making a texture, you need to UV-Map your model. Remember paper models that you used to cut up as a kid and then fold so they would become a 3d tank or house or car etc.... well this is exactly what UV-mapping is about and what you should do to your brick only the other way round. You will make a 2D "map" of your brick cutting up the 3d model so it would fold out in 2d that you can use to draw stuff into so it will show on your texture.
There is a UV-mapping tutorial of a cube out there somewhere for wings 3d. Google it, otherwise follow these steps.
- Basically create a cube.
- Select it (so it's red) and right click
- In the menu, go to the bottom menu more->and click UV-mapping
- A window opens and then you can either AUTOmap (by projection or feature detection) or Manually, or both. (right click -> segment by)
- When you are satisfied with how the model will be cut and folded open (something you will get good at by getting your hands dirty!) You can mark edges that should be cut and change the colors on the cube. Identical colors that share a vertice or an edge will be attached to each other, so a little bit of care is necessary when choosing where to cut . Make sure there is a seperate coloured surface if you want them to be seperated on your 2d map.
-In the window with the cube having the different colors, right click again and choose continue Projection normal.
If eveything went well (no errors) you will see a window open with which is the uv editor window accessible from window->UV editor window if you close it. Remember to select something on your model or the window will not open. From this window with a right click you can create a basic texture (bmp, tga, png that will be created). You will see in your main window that your brick now has all kinds of letters painted on it. If no letters are distorted, you cut up your model correctly, if not you will have to undo your steps correct the faces texturing. Use Window-> outliner to view the default texture that was painted on your brick. You can now export that texture as an image file and change it in a Photoshop, the gimp, paint etc and save it. Import it again in wings and your cube will have the colors you put on it in your image manipulation program. The outlines of the cube on the texture "tell you" where to paint in Photoshop etc) and you can always select faces on the model and move them about in the UV-editor window, to where your texture is, it works both ways.
Then select everything and export it as a obj file to a folder and make sure that following 4 files are there in the same folder for conversion. The image goes straight to the texture folder in your oxp.
A) Brick.mtl
B) Brick.obj
C) Obj2DatTex.py
D) Convert.bat
D) create a notepad (.txt file and change the extension to bat). Call it convert.bat or something similar (make sure you have the extentions for known file types turned ON, otherwise you will see it as convert.bat, but it will actually be called convert.bat.txt and wont do a thing when double clicked exept open and show you the text you typed in) The Icon of the file should be a couple of gears on a white background, to edit it you should right click and press edit.
Now copy the line below into your batch file and save it. Obviously change brick.obj to your the filename of your model.
Code: Select all
Obj2Dattex.py brick.obj
Open your newly converted dat file with the text editor and scroll down to the bottom. If there are lines that indicate the presence of a bitmap file, the conversion was succesful and the texture (with the same name as in the dat file) and in the texture folder of your oxp will show up as it should ingame.
Tip 3
ALL, I repeat ALL faces of the model must be UV-mapped. If you encounter any popup errors in wings 3d when doing the projection normal operation in the UV-mapping window, you will have to track down the piece that has not been mapped and delete/hole/dissolve it in the main window hoping that it doesnt wreck the appearance of your model or Tesselate it if possible and try the UV mapping again.
Tip 4
It is advised to divide a complicated model in different more simple objects, and export the selected pieces as individual obj files. (use the extract menu for that purpose (right click) and the Geometry graph window (window->geometry graph ). Oolite supports the use of subentities which are different dat files dependent on another dat file. Basically it means you could have a fuselage.dat and a wing.dat and make the wing.dat a subentity of the fuselage in the shipdata.plist file of your model.
Tip 5
If you add light effects to your brick, make sure that you export the model with "hemispherical lighting" set as shader in wings3d. It is normally the default activated shader when you install wings 3d but should you change it to view it differently in wings be sure to put it back to hemispherical lighting under the VIEWS>SHADERS menu in wings.
If you don't your effects map will not show ingame.
That's about all I can say for now. It takes a little bit of time to get to know wings 3d, but by the end of the week you should be on your way.
Have fun
XIII
Alpha Backer of Elite Dangerous
With 250 GBP
With 250 GBP
Re: Create New model
Manifold Labs download - at least it looks like it to me (can't do it on this machine).
Oh and I think you may have notepad and wordpad mixed up in the post above - notepad is normally the no-no...
Oh and I think you may have notepad and wordpad mixed up in the post above - notepad is normally the no-no...
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
-
- ---- E L I T E ----
- Posts: 471
- Joined: Sun Jan 23, 2011 9:27 pm
- Location: Belgium, Monarchy, Feudal, Overtaxed system
Re: Create New model
Thargoid wrote:Manifold Labs download - at least it looks like it to me (can't do it on this machine).
Oh and I think you may have notepad and wordpad mixed up in the post above - notepad is normally the no-no...
That is exactly the link I was talking about T !.
And eeeh. nope its notepad, the least intrusive program tha MS ever wrote, but having not many undo steps it's maybe a better idea to use something like Alleycode. I use Dreamweaver myself from my old Webdesigner days.
http://www.alleycode.com/download.htm
Dreawmweaver aligns all the code nicely. But maybe wordpad does that too. I am not too keen on anything that comes out of Microsoft production since they tend to make software that does two things:
- Ask if it's ok that it did something after it did it and not before as it should. (preferably with a nagging popup that you cannot disable and that keeps popping up at the least convenient times.
- Does things only half way since that is the reason for MS perpetuated carrousel of "fix things half to stay in business" A bit like politicians not doing a proper job of solving the problems of the country they govern, because the moment they would they would be obsolete and looking for a real job instead.
Last edited by dertien on Thu Mar 03, 2011 8:06 am, edited 1 time in total.
Alpha Backer of Elite Dangerous
With 250 GBP
With 250 GBP
- CheeseRedux
- ---- E L I T E ----
- Posts: 827
- Joined: Fri Oct 02, 2009 6:50 pm
Re: Create New model
Search: notepad evil
.....
Search found 16 matches: https://bb.oolite.space/search.php?k ... mit=Search
(Okay, 17 now that I posted this...)
.....
Search found 16 matches: https://bb.oolite.space/search.php?k ... mit=Search
(Okay, 17 now that I posted this...)
"Actually this is a common misconception... I do *not* in fact have a lot of time on my hands at all! I just have a very very very very bad sense of priorities."
--Dean C Engelhardt
--Dean C Engelhardt
-
- ---- E L I T E ----
- Posts: 471
- Joined: Sun Jan 23, 2011 9:27 pm
- Location: Belgium, Monarchy, Feudal, Overtaxed system
Re: Create New model
CheeseRedux wrote:Search: notepad evil
.....
Search found 16 matches: https://bb.oolite.space/search.php?k ... mit=Search
(Okay, 17 now that I posted this...)
Hey Butthead, hrm hrm.... notepad, ever heard of it ?
Yeah, Shut up Beavis... uuuuh, hum... notepad sucks.
hrm hrm, yeah, yeah, ... and its evil too. hrm hrm EEVIL
Alpha Backer of Elite Dangerous
With 250 GBP
With 250 GBP
- Danam22315
- Above Average
- Posts: 17
- Joined: Wed Jun 09, 2010 2:42 pm
- Location: Nova Scotia, Canada
Re: Create New model
WOW! Thanks for all the info dertien! (et al)
P.S. I have been using notepad to amend some of my saved games ( read cheat ).
I've been adding equipment, changing the amount of fuel, and credits! And it seems to work fine.
I'll download the other editor you mentioned though, just in case.
Is that for PC, or Mac?
P.S. I have been using notepad to amend some of my saved games ( read cheat ).
I've been adding equipment, changing the amount of fuel, and credits! And it seems to work fine.
I'll download the other editor you mentioned though, just in case.
Is that for PC, or Mac?
Insanity takes its' toll. Please have exact change.