Sign in to follow this  
ph33r

Best way to optimize textures for 10 characters

Recommended Posts

This is what I was thinking for a 2k-3k polygon character model. Character --------- 512x512 Texture Map(color map) 512x512 Diffuse Map 512x512 Specular Map 512x512 Normal Map Now I figure I can put all 4 of those textures into one 1024x1024 texture atlas. That would mean I would have to do four samples in the pixel shader per character. It seems something like this would kill performance. I'm wondering what you guys think would be most optimal for a character in a game? Is 512x512 dds lod texture too much, are four texture too much? If it is then what type of textures would work the best? Any other suggestions for how I could arrange this. BTW - target platform, Radeon 9800 pro(vs_2_0/ps_2_0)

Share this post


Link to post
Share on other sites
Quote:
Original post by ph33r
Now I figure I can put all 4 of those textures into one 1024x1024 texture atlas. That would mean I would have to do four samples in the pixel shader per character. It seems something like this would kill performance.

You'll have to do four samples anyway, no matter if you put all 4 textures in one big atlas or keep them in separate texture stages.
Hmm, why do you have separate color map and diffuse map?

Share this post


Link to post
Share on other sites
Quote:
Original post by centipede
Hmm, why do you have separate color map and diffuse map?


I figured the artist could specify if they want some area's more diffuse then others. So they could paint in the chest area of low diffuse and paint in the hair a higher diffuse.

The color map(maybe I'm confusing terminology) is the actualy texture itself, the picture of what the character looks like.

Share this post


Link to post
Share on other sites
Quote:
Original post by ph33r
I figured the artist could specify if they want some area's more diffuse then others. So they could paint in the chest area of low diffuse and paint in the hair a higher diffuse.

The color map(maybe I'm confusing terminology) is the actualy texture itself, the picture of what the character looks like.

Ahh, now I think I understand... [smile] I suggest putting your diffuse map in color map's alpha channel, for example. If it only defines how strong the diffuse should be, one channel is enough. You could do the same with specular map and normal map, too.

Share this post


Link to post
Share on other sites
Ok so

Character
---------
512x512 Texture Map | Alpha contains Diffuse Map
512x512 Normal Map | Alpha contains Specular Map


Now, I have two textures per character(and ten different types of characters) how should I arrange it so I could get most optimal performance? I could have an atlas that would hold two characters each now. Would reducing the texture size be beneficial, or is 512x512 the defacto standard?

I'm just looking for the optimal way to group up textures

Share this post


Link to post
Share on other sites
The diffuse map and the color map are typically the same thing. It's known as the albedo texture, and each channel tells how much incoming light is reflected from the surface.

By color map, do you mean emissive? Like light is coming from the surface even in the absence of an external light source?

If so, one trick is to use just an alpha channel for where emissive goes, and use a single color constant to have one emissive color per object. Like for instance, if you have a dude with evil glowing red eyes, his constant would be red.

Share this post


Link to post
Share on other sites
Actually by color map I mean the texture for the character, that is the texture that shows his face, jacket, pants etc. My OGL always refered to this texture as a color map so thats where I got the term from.

Share this post


Link to post
Share on other sites
Then what do you define as the "diffuse map"? Think of it this way: There's a green box. Is the color map green, or is the diffuse map green?

Share this post


Link to post
Share on other sites
I would define the diffuse map as the intensity of diffuse component at different parts of the character. Just like a gloss map defines how much specular intensity is at certain parts.

Share this post


Link to post
Share on other sites
Quote:
Original post by ph33r
I would define the diffuse map as the intensity of diffuse component at different parts of the character. Just like a gloss map defines how much specular intensity is at certain parts.

So what would an object with a color map of "white" and a diffuse map of "black" look like? (assuming no specular lighting)

Share this post


Link to post
Share on other sites
It would be black.

Color map - RGB (255,255,255)
Diffuse Map - A (0)

Final Color = Color * DiffuseMap

Share this post


Link to post
Share on other sites
Right. So you may as well premultiply the two maps, and only have the result as your texture.

Share this post


Link to post
Share on other sites
If you had a diffuse of 0.5 and colour of (1,1,1), why couldn't the artist just make the colour (0.5,0.5,0.5)?

Edit: Damn you sneftel for beating me by 30s!

Share this post


Link to post
Share on other sites
Yah I didn't think about that, I suppose I could put the ambient occlusion term in the alpha channel of the color map.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this