Problem Meshing, UV Maps and dds file help please

Nexiss

Addon Developer
Addon Developer
Joined
Jul 18, 2009
Messages
51
Reaction score
0
Points
0
Location
Hoddesdon, London
Hi all I’m hoping some of you good people can give me some advice and point me in the right direction owing to the overwhelming amount of talent on this forum and superb addons out there.
I’m having a go at creating some add-ons for orbiter, as it’s my first go I thought I would start with something simple like a few space station modules, my first attempt is here: http://www.orbiter-forum.com/showthread.php?t=27122

However the texturing thing is giving me nightmare's, I've found away of doing it but i'm convinced its not right so I'll walk you through what I've done and hopefully someone can spot the error, I say error because it didn't work the first time using one method, and I'm sure the method that works is not the easiest way of doing things.

Ok I’ll start with how I was hoping it would go based on what I’ve read in the forums:
1. Using Sketchup Pro create my model – Done nice and easy.
2. Create my textures as BMP’s (power of 2) bring into Sketchup and apply to model – Done with some trial and error.
3. Export as .OBJ – Done giving me an .OBJ file, an .MTL file and a folder with my textures.
4. Convert Textures to .DDS using the supplied DirectX Texture tool
5. Convert .OBJ to mesh using Obj2Msh, selecting yes to apply a different texture to each group.
6. Create config file
7. Put .dds files in orbiter texture folder, put config file in orbiter Config/Vessels
8. Put .MSH file in orbiter meshes folder
9. Fire up orbiter, from scenario editor load module and MAJOR FAIL!!! NO TEXTURES on model !!!!
When I inspect the mesh file it points to node.dds my mesh is called ‘node.msh’ and was exported as node.obj, when I check the .mtl file it refers to the textures!

So my question is what do I need to do to get the .MSH file to point to the textures?

So this how I ended up doing things which I’m convinced is not the right or easiest way and makes for large file sizes
1. Open the .obj file in UV Mapper pro
2. Organize the UV Map to make for easier painting
3. Save Model
4. Save Template as .bmp
5. Open .bmp in Photoshop and paint as desired
6. On saving flip vertically
7. Convert .bmp to .dds
8. Convert new .obj file created by UV Mapper Pro to .msh
9. Place in relevant orbiter directories and HEY PRESSTO IT WORKS
But all the textures for the model are all in one .dds file (node.dds)

So my next question is, is it possible to make more than one UV map for the same model with different parts of the model on each map with UV Mapper Pro and how do I do this?

My final question is what is the .mtl file for and how do I use it to make life easier for myself?

I have searched the forum for a few weeks now, but there doesn’t seem to be a complete answer anywhere specific to sketchup, I appreciate it’s not the ideal software but it’s easy to learn

I just feel that with more than one .dds per model the same texture could be utilized by more than one model and I won’t have to keep repainting the same thing on every model i.e. docking port etc.

I have read Greg Burch’s tutorial for UV mapping using anim8or, and to be honest I did look at anim8or but don’t feel too comfortable with it yet, so if possible would be happy too find an answer using the software I’m using at present, (Sketchup Pro, UV Mapper Pro & Photoshop)

If anyone can give me some pointers and advice that would be great and much appreciated.
 
Out of curiousity, if in your initial workflow you were to import the .obj into Wings3D, and then export it to .msh using [ame="http://orbithangar.com/searchid.php?ID=3901"]my exporter[/ame], do the textures show up correctly? You'll still need to convert the textures to .dds manually, but the Wings3D step may allow you to see what's going wrong if something is (maybe the texture names are being messed up?)
 
You use more than one texture on model?
If's this the case you need before exporting to OBJ with SketchUp each face with it's texture put into group.
Each face or group of faces who use same material you need to put into group.
Probably you use 2 or more texture on a one model and model is solid not in group,it work fine in SketchUp and work fine after export but in Orbiter each texture need to have its own group of faces for single texture.
I don't use OBJ2mesh,there if fine plugin for Anim8or to conver to msh and no need to flip textures,and Anim8or open OBJ file.
 
Thankyou so much guys I've managed to do what I was wanting to do,

Heilor using your method of importing into wings3D and then using your exporter works a treat and like you said its just a matter of converting the .bmp's to .dds, clearly wings3D can also read the .mtl file because the textures are imported with the mesh.

Liber I did try the anim8or method as you suggested but it didn't import the textures (even when set up as groups in sketchup), only the model so when I export no texture info was exported, so I'm guessing I would need to texture the model in anim8or which is something i'm not comfortable doing until I get my head around anim8or.

Also one other quick question, what is the difference between materials and textures?

anyway thank you so much for your replies instead of being stubborn I should have just asked three weeks ago :thumbup:
 
Also one other quick question, what is the difference between materials and textures?

What is the difference between an engine and a piston? ;)

One is part of the other and fulfills a specific purpose therein. By analogy, textures are part of a material. More specifically, they are the diffuse color of the material. If you have a texture, that texture will be aplied instead of a uniform diffuse color.

But the texture doesn't have any properties beyond that. Instead, the actual properties of how the thing is supposed to behave to lighting are managed by the remaining material properties. Those are:

Ambient color: The color of the ambient lighting. This is rarely used for orbiter, as our models rarely stand in a room with colored lighting. Wat this does is basically simulating the look of your mesh if the color of the surrounding ambient was what you set here, I.E. it gives the material a tint. Usually a bright gray ambient color is used in many orbiter models to not let them apear completely black when in shadow.

Specular color: The color the light has that is reflected off of the material. This is usually somewhere close to the dominant color of your texture.

Emissive color: a color that is emitted by the material (this shows most prominently when the mesh is in shadow, as the emissive color is unaffected by that). Usually used for windows, interiors, position lights or other stuff that has to glow.

Specular power: Not a color, only a value to adjust how focused specular reflections are. A high specular power gives you a very bright, prominent and tight spot on the material where the light is reflected off into the camera. It will have the color defined in specular color. Absolutely essential for anything that should give the impression of looking like metal. For lack of a better word, it determines how "shiny" a material is.

All colors are in RGBA format, that is Red, Green, Blue and Alpha. Alpha controls the opacity of the effect, which is usually used to regulate intensity.
 
Heilor using your method of importing into wings3D and then using your exporter works a treat and like you said its just a matter of converting the .bmp's to .dds, clearly wings3D can also read the .mtl file because the textures are imported with the mesh.
Good to know. Let me know if you run into any issues using it, and I'll see if I can figure it out.

Also one other quick question, what is the difference between materials and textures?
A less technical explanation than jedidia's:

Materials define the optical properties of the surface of an object--how it reflects light, essentially. Without a texture, this results in an object which is uniformly a single color, but it will be the color you specified in the material and be as "shiny" as you specified in the material. A brand new pool cue ball is a decent example of something that might have just a material but no texture--it's solid white with no variations in color.

However, if you look at any objects in the real world, they won't be a perfect solid single color--they'll have variations in color across their surface, either naturally (the grain of wood, or brushed metal) or from additions/imperfections in the surface (painted logos, smudges, etc).

These are what textures are used for. A texture allows you to map an image onto the surface of a 3d object. That image can be anything you want it to be, but in general the goal is to make the object more realistic and less "pristine" or "perfect." In most 3d programs (and Orbiter uses the same method), a texture is applied to a material, so that any objects using that material have that texture applied to their surface.
 
Back
Top