Page 1 of 1

multiple materials, multiple textures in one model.....

Posted: Fri Sep 18, 2009 12:31 pm
by Matthew
OK, I'm a newbie, and I've been searching for the answer, but just can't find it, how do I do this........

I have already created a MD3 model of a woman (thanks to Blender)

I want to have one jpg image rapped around her face with loads of detail

Also I want a second jpg image with very little detail of skin texture tiled around the rest of her skin.

A third image with the texture of cloth tiled around her clothing.

Etc....

I do NOT want to just have one image rapped around her, (eg Sydney in those tutorials), because I know the detail should be in her face.

What do I do???????

I can see maps use multiple images on one model and I can't see how that is done either. I'm just a confused newbie.....

I hope someone can help me see the light, cheers.....

Posted: Fri Sep 18, 2009 12:51 pm
by Adler1337
I've only done this with .3ds files. But .3ds isn't animated :( . I would like to know this as well. I use .ms3d for my animated files, but i find one unwarp to lack detail. It can be very confusing too, since my models can be very complex. Any suggestions?

Posted: Sat Sep 19, 2009 7:39 pm
by jotatsu
Well i have kinda the same question. For Static objects there are no problems, since for example in irrb they can be exported as independant objects (with 1 material per node).

But with animated ones doenst seem to work so well, i tried the b3d script of gandalf, it works well with 1 material-1UV-1texture, but with more than 1 material per object the textures wont load. I know that at least 2 materials (each one with different UVs) can exported ( i did that with the fairy before) , because you can fix the textures in irredit. Maybe that part of the b3d loader is broken.

Posted: Sat Sep 19, 2009 8:20 pm
by bitplane
MD3 models are split into parts, each part can have a different material (and therefore textures), but a single part can't have more than one texture.

jotatsu, this sounds like a problem with the exporter, not with Irrlicht's loader.

Posted: Sun Sep 20, 2009 5:28 pm
by arras
I don't know Blender but most of the modelling apps allow you to assign different materials to different parts of your model. This is really application specific so consult your manual. When loaded in to Irrlicht each part of your model which have separate material assigned is made in to its own meshbuffer.

Posted: Sun Sep 20, 2009 6:20 pm
by Alpha Omega
I use blender and it is very easy to have multiple unwraps. Before I create a model I always ask myself, "How many textures will this model need?". Then when you can answer this question you know how many unwraps you will need to do this. You can make multiple pieces of the model and then when exported it exports as one model. Like for example if I am making a spear. I make two objects in blender. I sculpt each to my liking and apply different textures to each. Then a put them together and export. For your case you will have to go to edit mode select the vertices for each sub object and give it a different object name. At least I think you can do this... let me know.

Posted: Sun Sep 20, 2009 11:05 pm
by omar shaaban
if this a problem of one model ,were i mean you don't want to use the multiple textures for any other reasons then i have a simple question:
why don't you make your textures(face texture,body tex...etc)
and lets say each texture is of resolution :400x400.
and you have 4 textures for the node;
then all you have to do ismix the 4 textures in one texture of resolution :800x800;
that way you have the same detail and in one texture!

Posted: Mon Sep 21, 2009 1:17 am
by Dorth
Argh, think of the graphic cards! 512x512 and 1024x1024 please

Posted: Mon Sep 21, 2009 2:13 am
by omar shaaban
Dorth wrote:Argh, think of the graphic cards! 512x512 and 1024x1024 please
and why do i care??
i make whatever resolution i want and no errors come out of it

Posted: Mon Sep 21, 2009 2:22 am
by Acki
omar shaaban wrote:i make whatever resolution i want and no errors come out of it
of course no errors, but bad quality with most gfx cards... ;)

Posted: Mon Sep 21, 2009 4:55 pm
by Matthew
I'm getting the idea that the done thing is to chop my woman into three pieces head, torso, and legs and UV rap each, with loads of pixals on the head. This should also help with the animation stuff I'm learning.

As for the comment about caring for slow graphics cards, just think how much a slow graphics card will enjoy the torso and legs with so little pixels.

But I'm still confused, if you look at tutorial 2:

http://irrlicht.sourceforge.net/docu/example002.html

...there is a model (the map), which is one mesh with loads of textures or materials, how the hell does one mesh get all those images assigned to it?????

Posted: Mon Sep 21, 2009 5:05 pm
by serengeor
Afaik BSP map is made up from lost of different objects which have textures assigned to them.

Posted: Fri Sep 25, 2009 8:01 pm
by puh
try this:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?p=26074

or read this:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=1522

P.S. i know both links are very old, proly code should be slightly changed for current irrlicht