multiple textures to one model?

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
Paintbrush
Gnoblar
Posts: 3
Joined: Sun Aug 28, 2005 3:48 pm

multiple textures to one model?

Post by Paintbrush »

Hey guys,

First off, yes, I realize that some of you have already addressed a variant of this issue in other posts, but I think i'm a tad confused. I'm currently using Maya to build and texture my models, and have been able to export fine and dandy with 1 texture.

Now I'm looking to one-up it by adding a second texture... say i'm making a rubber ducky. The way I see it, the rubber ducky will have separate textures for the head and body. The head will remain a simple yellow rubber ducky head, while i want the body to be customizable to take several different textures depending on attire.

The problem I have is 2-fold:

1. MAYA PROBLEM
Okay, i'm not new to maya, but not an expert either. I understand that some might ask me to have this problem addressed at a Maya forum, but I think i'll get more decisive results in a community that is doing similar things, namely making models in Maya for Ogre.

Straightforward and Simple: How do you assign multiple textures to a model in Maya? Until now my standard procedure involved selecting faces on a model and applying one texture, and doing the same for other faces and applying the other texture. Apparently this is a no-go for Ogre Maya Exporter, so I need help there.


2. TEXTURE SCRIPT PROBLEM
I suppose this would be solved once i get problem 1 solved and have ogre exporter spit out the model with no complaints... so I may modify this question later. I'm sure I can figure it out once the example material file gets outputted.


Thanks,
J.
User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 15
Contact:

Post by metaldev »

the functionality to export more than one material on a single model in Maya doesnt exist yet for the ogre exporter.

bisco is working on this and is testing it...

http://www.ogre3d.org/phpBB2/viewtopic.php?t=12690

looks like he has made some progress so i think it might be available soon.

for now, if we must use 2 materials, we have to split up the model.
joi
Gnome
Posts: 327
Joined: Tue Feb 22, 2005 8:11 pm
Location: brazil

Post by joi »

Well, if it is only about texturing (and not about materials/shaders) you can always use UV maps. Same file with 2 textures("colors") ... doesnt suit you ?
Until now my standard procedure involved selecting faces on a model and applying one texture, and doing the same for other faces and applying the other texture
Similar to uv texturing, but unstead you unwrap it and build the file color on top of the faces.
maya 7.0, vs 2005, ogre 1.2
Rixeh
Greenskin
Posts: 135
Joined: Sat Nov 20, 2004 8:36 am

Post by Rixeh »

Uhmmmm... what you *could* do is Extract the parts you want to be a seperate texture. This will make it an ogre Submesh. (Dont worry, the entire mesh will get exported as 1 big object). Then you can assign a copy of the same material onto the extracted part, and change the texture file input...
Once you export it, you should see the different filenames used under each part of the submesh.

It's sort of a hack, but it's what I use for right now. The next version of the exporter (BISCO YOU ROCK) should support per-face materials and textures I'm pretty sure.
Bringer of Darkness
Halfling
Posts: 98
Joined: Thu May 05, 2005 3:57 pm

Post by Bringer of Darkness »

Well, in fact you CAN assign 2 different textures to one mesh, even though there are some restrictions - you cannot have 2 MATERIALS on one model, which is different. 8)

For applying 2 textures, use layer texture node in maya.

You can (or possibly have to) link different UV mapping sets to every texture by using UV linking editor....
It will be exported correctly, according to my experience :P

Hope this helps....
Rixeh
Greenskin
Posts: 135
Joined: Sat Nov 20, 2004 8:36 am

Post by Rixeh »

Oo cool, I didn't even know you could use the layered texture node...
Post Reply