If I have a 2048 map and want a small part to glow, and a small part to have alpha. What is the most efficient way to do it?
1. include alpha in diffuse alpha channel, include glow in normals alpha channel (waste alot of unused texture space)
2. seperate 16 bit, 128x128 texture with glow in one channel and alpha in the other, model would also need 2 uv channels (waste ram on uv channels, (models 9ktri), + another texture call)
3. ?
Replies
intresting info, so the G is best, R is second best, and B is worst to use, how does the A stack up? full quality as green?
Also, if i store somthing in the normal maps alpha, will the compression used there mess somthing up as far as quality goes?
I intend to use a 128x128 texture using G for alpha, and R for glow, which uses the models second UV channel.
An additional draw call is probably not a big deal in this case, and you don't need a "second" uv channel to have two materials.
A second material with a diff+alpha/normal/spec/glow maps at say 128 or so is practically nothing compared to having alpha in a 2048. I would do this unless its going to cause seams or other problems.
http://udn.epicgames.com/Three/CroppedEmissiveAssistant.html
if its really small and your engine supports lods id say make 2 new materials (and bite the bullet on those 2 drawcalls) and make sure that stuff gets turned off as soon as you go 2 steps away from the object !
Pink= alpha
Green= Glow
Its just this small area, I'll try the Crop E assist on it, from the link you gave.
2 steps away?, I could see turning the alpha off, but I would think the glow would always have to be on, sorry im very new to all this.
What is the alpha for? You might be better off just "faking" the holes here with black in the diffuse/spec.
pink=alpha
Green=glow
Ok I think I realize im getting to picky about small things that could be faked. But I do like to learn for the future things, youd fake the glow as well?
I also am unsure as to why you wouldn't cut those holes in the blades when you have serrations already modeled into the blades - either make the blades flat quads with alpha or model the whole thing, don't half-ass it like you would be in your image there because you'll get the worse visual quality of the alpha with the increased vert density of the modeled blades.
The first step to determining how best to optimize is to ask yourself "is this important, and why is it important to do it this way?"
For memory it's always cheaper to use a second, smaller map with alpha rather than using alpha, and it's even better to cram shit into the RGB channels rather than adding an alpha. A second set of UVs is much cheaper, memory-wise, than all but the smallest of maps on the densest of meshes.
The second UV channel does inflate your CPU (rather than GPU) memory which matters on the PS3, as it has a split memory architecture, so that's something to potentially consider, but a second UV channel on a 9k tri mesh is still going to be smaller than an alpha channel on a 2048.
Doing some quick math, I believe 9k verts (which is way more than 9k tris) is about 105kb per UV channel (4bytes per float, 3 floats per UVW for verts.) In comparison, a 1024x1024RGB compressed with DXT5 compression is about 768kb, a 512x512 is 192kb. and a 256x256 is 48kb. Alpha doubles those numbers, so the cost of alpha at 1024x1024 is an additional 768. Thus you can see the extra UV pays for itself if you can cut your map in half, assuming your map is 512x512 or larger.
I prefer cast light, it's pretty important to make the battery seem super powered.
Thanks for all the info.