Help with texturing x-file models

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Jazz-E

Help with texturing x-file models

Post by Jazz-E »

Hi all. I wondered if anyone could tell me discover how to texture a box with different bitmaps/textures on each sides. I am trying to write a game which has a floor with different coloured panels and various symbols. I know how to do this with max but find it difficult to get it done in irrlicht. I CAN PLACE A texture on a mesh but not more than one. Any help would be grateful. I am coding in Visual Basic 2005 express but understand both C++/C#. Using irrlicht version 0.14. Thanks :roll:
bearSoft
Posts: 165
Joined: Fri Apr 01, 2005 9:55 pm
Location: Denmark

Post by bearSoft »

u need to UVmap the textures on ur model
If u search on my old post i wrote a litle 'tut' on how to do that with the freeware 'UVmapper' and 3ds files
U mention MAX and i'm sure that MAX has inbuild UV-mapper-tools. I have no expierence with those (to expensive:(
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Jazz-E
Posts: 4
Joined: Sat Jan 07, 2006 9:10 pm
Location: Wolverhampton, England, UK

Thanks

Post by Jazz-E »

Thanks, I will check that out. 3D Studio Max has its own tools for UV mapping and unwrapping. I trying to get an handle on 3D Coding, so much to learn. LOL. But up for the challenge. Thanks again for that. Is that tutorial you mentioned here or on your own site! Cheers. :P
bearSoft
Posts: 165
Joined: Fri Apr 01, 2005 9:55 pm
Location: Denmark

Post by bearSoft »

Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Jazz-E
Posts: 4
Joined: Sat Jan 07, 2006 9:10 pm
Location: Wolverhampton, England, UK

Happy Dayz.....

Post by Jazz-E »

^^^^
Cheers mate, with your help i have managed to solved the problem.
This is how i did it in the end but must add there are other ways or formats possible.

This is for anyone else who has problems texturing a model with multiple colors or textures. For example creating a dice texture on a box.

1) Create the model e.g box
2) Export as a .obj .. free from 3dlinks .com
3) Using uv mapper software - e.g UVMapper Classic (UVMapper.com). I first load mesh then created a uv map e.g by selecting new uvmap> box.
4) Resave model and uvmap as texture
5) Load uvmap texture into paint software e.g photoshop, as a trace and painted it
6) Resave it as bmp, jpg, etc e.g bmp as 24 bit
7) Reload modellor e.g 3d max in my case
8) Load texture and model
9) texture model with new texture (goes straight on)
10) ** all important save work **
11) Export to x file as text data (not binary) with texture. I used panda pluggin for max
12) Model is now ready for irrlicht... phew!!!

Check out above link for tutorial or you can edit tutorial 1. Replacing Sydney with your own model. If all gone well you should see your model complete with texture in place.

This can be extended to other models/shapes.

Credits to bearSoft without whom I may not of got this far.
Thanks again ...Now on to the next set of problems!!! LOL..
Hope this helps other beginners. 8)
bearSoft
Posts: 165
Joined: Fri Apr 01, 2005 9:55 pm
Location: Denmark

Post by bearSoft »

great that u got it working jazz-E
I will 'cirkular link' from the 3ds thread because the things u have for .x files may be usefull for others :D
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
luckymutt
Posts: 453
Joined: Sun Mar 06, 2005 11:56 pm
Location: C-Ville

Post by luckymutt »

If you are using Max, why do steps 2 - 4 :?: :?:
Why use another file format, importing and exporting with another program for something you can easily do in Max :?:
You have a $3,000 program that is made to do all this

1)Create model (eg box)
2)Modifier panel->UnwrapUVW
-PropertiesRollout->Edit
-Flatten mapping, render uvw template

Save it as whatever image file you want, open it in photoshop (or what ever)
Apply the texture, export, and you're done.
Jazz-E
Posts: 4
Joined: Sat Jan 07, 2006 9:10 pm
Location: Wolverhampton, England, UK

^^ Yep - I know I could use MAX :) ^^

Post by Jazz-E »

The above wasn't written as the perfect guide. The Idea was to help others with similar issues to find a solution with other pakages which may not have Max's features or at least do them as well!

With my initial request I knew what i wanted to do but unclear on how to do it. bearSoft gave me a pointer and i went from there. Me being me shared how I solved the initial task. Now I am clearer of what is required I can seek other ways like the one LuckyMutt stated above. :wink: I must say though that UVMapper was very simple to use indeed. I found it easier than MAX's version to learn for a beginner like me. Not quicker however. LOL. :)

Thanks all!
Guest

Post by Guest »

If 3D max has this capability, I am assuming Maya has that capability too?

I'm kinda confused about this texturing thing, this is what I think how it works, am i correct?

1. I use blender, or maya to create the mesh, outputing obj, 3ds
2. I'm hoping that I can just load the object with color directly into irrlicht, but it doesn't seem like i can

3. So I need to generate this UV map thing (probabily direclty in maya, and need UV mapper with blender) , i assume that it is just an image file, like jpeg or tiff ,

4. I import the obj file into irrlicht, and I import the image file , and I somehow use a function that put them together

Is this correctly? Its really fuzzy this part for me, thank you very much if you can help.
Jazz-E
Posts: 4
Joined: Sat Jan 07, 2006 9:10 pm
Location: Wolverhampton, England, UK

^^ Whatever 3D Max can do I am certain u can do in Maya ^^

Post by Jazz-E »

Raw mesh objects don't really have any colour just data to reproduce the model. Imagine you created a clay model (or bowl, cup, etc). Before it is put on display you need to paint it! (Texturing). To do this you need to wrap a material (wood, metal, colour paint etc) around the model. This material is stored as a image file (bmp, jpg, etc) and is only a square sample. This allows it to be seamlessly repeated side by side around the model. For example a wooden floor may have a number of copies of the same material to cover the space.

So to load a mesh (model object) into irrlicht you need both the 3d file and a texture image sample. Irrlicht will place the texture on the mesh (with some code). The problem arises when your model needs different colours or textures at different part of the mesh. Take a human form character with clothes on. The skin would be one texture, T-shirt and trousers would be different ones. To unwrap a model allows you to paint a 3d mesh in a 2d environment (package) such as paint, photoshop, etc or apply different textures. This can then be saved in one or a number of texture/material files. By doing this ensures that the materials(paint) are placed in the correct position. And the skin texture doesn't end up being used as cloth material for trousers or t-shirt. LOL.

Maya has it's own tools to help you do this. Most 3D Packages will export their textures and handle unwrapping. If not then you can use UNWrapper (or similar) that I mentioned earlier. To use that software the mesh must be exported as obj file.

hope this helps!

this tutorial i found may help clarify things a bit better.

http://www.ramyhanna.com/texturing/poly ... ial01.html

Good Luck!!
Post Reply