Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / Question about using multiple textures on one mesh

Author
Message
Dimis
12
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 10th Jul 2011 15:04
I'm loading a human model (1 single mesh) which uses 2 textures on it, 1 for the skin and 1 for outfit.
Is it possible to change only one of the two (or more) textures in real time?

I know that using multiple textures on 1 mesh is not the ideal way of texturing characters but it is easier for me
to work that way. Also it could help me in adding details, like damage on skin and outfit, and for alternative outfits
for my charakters.

Thank you in advance!
AJ Schaeffer
14
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: Jacksonville,FL
Posted: 10th Jul 2011 18:54
What game engine are you using...

Making someone's day a little better because of one of my models means a lot to me.
Dimis
12
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 10th Jul 2011 19:26
I'm using Dark Basic Pro.
GregA
12
Years of Service
User Offline
Joined: 21st Jun 2011
Location:
Posted: 10th Jul 2011 20:35
Probably the highest performance way to do that...

Using xna terminology here so please bear with me...

1. Make render target.call it character_with_clothing
2. draw your skin layer on the render target.
3. draw the selected clothing layer on the render target.
4. use the render target as your texture.

That eliminates the need to do this per frame, you would only need to do it when your character changed clothing.

This would work nice because you wouldn't need to composte the whole thing per frame.

I can think of about three other ways to accomplish the same thing... Simulated mutitexturing, actual multitexturing, and then finally using one of the specialized shaders for blend texturing.
AJ Schaeffer
14
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: Jacksonville,FL
Posted: 11th Jul 2011 00:35
You should be able to change the texture in DBpro. And why is this in 3D chat and not in the DBpro section...

Making someone's day a little better because of one of my models means a lot to me.
Dimis
12
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 11th Jul 2011 19:29 Edited at: 11th Jul 2011 20:40
@ GregA
I am not sure if this will help me to do it, but I'll look into it.

@AJ Schaeffer
Texture limb command in Dark Basic Pro fails when a limb uses UV texture data from two different texture files and that's why I'm looking for an advice about it.
You are right, I have posted this thread in the wrong section, because of the description on the board "modifying and using models in your own games". I will post my question in DBpro section.

Thank you again.
Dimis
12
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 11th Jul 2011 20:45
Could a moderator move this thread to a more suitable section in the forum for me please?
The Zoq2
14
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 12th Jul 2011 12:19
Assign the textures to the model in a modelling program, then put the model and textures in the same folder and just load the model but don't assign the texture in DBP

Srry about my english im from sweeden
Dimis
12
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 12th Jul 2011 14:59
Loading the model with two textures is not the problem. I will explain exactly what I want to do.
Here's a pic of one of my models and the textures it uses.

As you can see, there are two texture files, one for the skin and one for the outfit. The game is a classic beat'em up like
Mortal Kombat. I thought about adding damage on the models during the fights or create alternative outfits for the
characters and that's why I need to texture parts of the main mesh of the model from different texture files.
But I can't find a way to change only one of the two textures on the main body of the model in DBpro.
Perhaps that's not possible yet.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 13th Jul 2011 03:16
Quote: "Texture limb command in Dark Basic Pro fails when a limb uses UV texture data from two different texture files and that's why I'm looking for an advice about it."


I think a lot is determined by the export of the Direct X file from your modeling program. For example, 2 or more materials can be stored in a Direct X file and applied to the same mesh. Each material definition can reference a different texture. When the direct x file is loaded and these references are embedded in the file, the model will be textured correctly. However, since I am refering to a single mesh definition in this example, if you attempt to retexture the object in DBPro, only a single texture can be applied.

But, if your model is divided into a series of limbs, you should be able to texture all of the limbs that texture 1 applies to by specifying each limb in that collection. You would do the same for texture 2 and it's group of limbs.

For example, let's say limbs 1, 2, and 3 are the chest, head, and right arm. These are all textured with texture 1. So to retexture them with say, texture 500:

texture limb < objectnumber > ,1,500
texture limb < objectnumber > ,2,500
texture limb < objectnumber > ,3,500

And perhaps the leg, hips, and a foot are limb numbers 4,5, and 6 and you want to texture them with texture number 600:

texture limb < objectnumber > ,4,600
texture limb < objectnumber > ,5,600
texture limb < objectnumber > ,6,600

Does this not work in DBPro?

Enjoy your day.
Dimis
12
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 13th Jul 2011 12:09
@Latch

Of course that works inDBpro. But that's all I can do for alternative colors on outfits, as shown in the screenshots.


Parts of every fighter's outfit are extra limbs, that can be texture as I want.
Separating the skin in different limbs is a good idea, but the result is not so good, because the body
does not look solid but separated in sections. (I'm working in 3d Canvas, maybe a different program could produce
a better result)
GregA
12
Years of Service
User Offline
Joined: 21st Jun 2011
Location:
Posted: 13th Jul 2011 15:25
You could do the first beat em' up game where everyone is naked.

/jk
Dimis
12
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 13th Jul 2011 16:10
That's the best idea so far! I could use a special "pixelating" Shader to cover the genitals too.
It could work.

Login to post a reply

Server time is: 2024-05-07 01:13:50
Your offset time is: 2024-05-07 01:13:50