.png Alpha map not working
by David Aaron Philip Blake · in Artist Corner · 01/17/2005 (12:51 pm) · 10 replies
I'm having a headache trying to understand why the .png alpha map for the .DTS file i'm exporting does not work.
I'm using a .png so that I can get tuffs of hair on a model.
The modle is a 1200 poly head with 2 material ID's, one for the skin and one for the hair, both of the material ID's have their own texture map. The model is a single mesh object with a multi sub-object texture on it.
Inside 3dsmax the alpha mapping shows up fine.
But within the Show tool the alpha map does not work all. If you even have the opacity channel ticked in max when you export to .DTS the Show tool then no longer displays any mesh and has a poly count of 0, even though the .dts filesize suggets the mesh is contiained there.
Show Tool view of mesh shown with alpha channel not working (exported with opacity slot unchecked)
TSE view showing the same .DTS mesh not showing at all, only showing the jaw bone.
I hope that this image shows the problem clearly
The top right box is the basic max texture properties showing that the .pg is in the diffuse channel and the opacity channel is checked, it makes no difference whether the .png is in the opacity channel as well. The circled data shows that the show tool does not recognize any polys in the mesh. and as you can see in the background, only the nodes are shown.
The bottom left pic is the max render of the same mesh before export (the max viewport looks the same but without shadows).
The bottom right is the show tool viewport when the opacity channel in max is unchecked before export.
As you can see the fringe tuffs of hair in the max render show the alpha mapping, while in the Show Toll they do not.
Does anyone know what i'm doing wrong?
I'm using a .png so that I can get tuffs of hair on a model.
The modle is a 1200 poly head with 2 material ID's, one for the skin and one for the hair, both of the material ID's have their own texture map. The model is a single mesh object with a multi sub-object texture on it.
Inside 3dsmax the alpha mapping shows up fine.
But within the Show tool the alpha map does not work all. If you even have the opacity channel ticked in max when you export to .DTS the Show tool then no longer displays any mesh and has a poly count of 0, even though the .dts filesize suggets the mesh is contiained there.
Show Tool view of mesh shown with alpha channel not working (exported with opacity slot unchecked)
TSE view showing the same .DTS mesh not showing at all, only showing the jaw bone.
I hope that this image shows the problem clearly
The top right box is the basic max texture properties showing that the .pg is in the diffuse channel and the opacity channel is checked, it makes no difference whether the .png is in the opacity channel as well. The circled data shows that the show tool does not recognize any polys in the mesh. and as you can see in the background, only the nodes are shown.
The bottom left pic is the max render of the same mesh before export (the max viewport looks the same but without shadows).
The bottom right is the show tool viewport when the opacity channel in max is unchecked before export.
As you can see the fringe tuffs of hair in the max render show the alpha mapping, while in the Show Toll they do not.
Does anyone know what i'm doing wrong?
#2
If there is anything in the opacity channel (even if the channel is only ticked) then when the .dts is loaded in the Show Tool no polys are shown adn the poly count says 0.
01/17/2005 (6:24 pm)
I tried that.If there is anything in the opacity channel (even if the channel is only ticked) then when the .dts is loaded in the Show Tool no polys are shown adn the poly count says 0.
#3
01/17/2005 (8:05 pm)
Sounds strange, perhaps you should upload your file somewhere so that someone can check it out and give you a better idea what to try.
#4
and ill upload it up to the games site for you
eul0gy
01/18/2005 (10:30 am)
Foster do you want the .max file or the Dts ? and ill upload it up to the games site for you
eul0gy
#5
01/18/2005 (11:41 am)
Max file, the DTS is pretty worthless for anyone to use to troubleshoot with.
#7
this has the head in max 5 /7 formats and the relating textures
www.forkinthebathroom.com/head.rar
eul0gy
01/18/2005 (2:01 pm)
Any version of max u use fosterthis has the head in max 5 /7 formats and the relating textures
www.forkinthebathroom.com/head.rar
eul0gy
#8
Just make one channel with the face texture (no transperancies) one channel with the hair not transperant and one channel with the hair transperant (opicity turned on with the PNG in both the diffuse and the the Opicty map slots) Mark the third as 2 sided.
Of course the FACE channel will get apllied to the element of the shape that makes up the face. The Solid HAIR channel will get applied to the element that is the HAIR (solid part). Opaque hair channel will only get assigned to the tussils in the hair.
Basically you have ONE object in the scene with 3 materials. If you assign 3 standard materials to one shape that makes up a Multi_sub_object material. So DONT make your cause it just complicates things.
Hope that helps can't be positive thats all the problems since I think you said your using torque shader engine.
Matt
01/18/2005 (5:10 pm)
Well I don't want to steal any glory from someone else but basically you got your material set up wrong.Just make one channel with the face texture (no transperancies) one channel with the hair not transperant and one channel with the hair transperant (opicity turned on with the PNG in both the diffuse and the the Opicty map slots) Mark the third as 2 sided.
Of course the FACE channel will get apllied to the element of the shape that makes up the face. The Solid HAIR channel will get applied to the element that is the HAIR (solid part). Opaque hair channel will only get assigned to the tussils in the hair.
Basically you have ONE object in the scene with 3 materials. If you assign 3 standard materials to one shape that makes up a Multi_sub_object material. So DONT make your cause it just complicates things.
Hope that helps can't be positive thats all the problems since I think you said your using torque shader engine.
Matt
#9
As you can see in the picture you have shown above (with the main block of the hair mesh solid, without opacity mapping) the hair does not blend with the skin well (looking at the back of the head especially).
The hair texture always has transparent bits, there are no completely solid hair meshes (the hair mesh overlays over the head mesh whch has a basic hair texture on it). The main clump is transparent near the start and end to blend with the skin (When I make the final models and texturing the hair will have transparent bits all along it to see the basic texture of the hair on the skin beneath, I did this to add depth to the hair). This pic shows the effect of this in the bottom left.
I seperated the mesh into two channels one for the skin mesh and one for the opacity mapped hair meshes.
I Set up the hair channel with opacity turned on with the .png map in both the diffuse and opacity maps, and with it marked as two sided. But then it would not show any polys in the show tool or torque (as shown in initial post) and there were no exporting error messages.
What version of max did you use to export the mesh? I used max7.
I will go away and experiemnt with exporting from max 5 and see if it works from there.
EDIT:
It seemed to work much better exprting from max5 with the same settings as in max7 (i.e. 2 standard textures in a multi sub-obejct material as before), the mesh shows up with the mapping working. Was the export problems a max 7 exporter bug, or something different between the files (max 5 and max 7 versions of the head) that i have not noticed?
But new problems became apparent, but i'm not sure if they are fixable, it's to do with the 2-sided mesh lighting and the sorting of the alpha mapped hair:
*When the hair mesh is set to 2-sided it does not light properly, if at all.
*And the fringe hair polygons and some of the back ones sort in the wrong order, even adding "SORT::" to the beginning of the mesh name only makes it worse, it messes up the lighting even more, and does not even sort properly either.
Are these general torque engine bugs, or something that i'm doing wrong?
01/19/2005 (8:56 am)
Mathew, Thank you for taking your time, It's good to see that it can work.As you can see in the picture you have shown above (with the main block of the hair mesh solid, without opacity mapping) the hair does not blend with the skin well (looking at the back of the head especially).
The hair texture always has transparent bits, there are no completely solid hair meshes (the hair mesh overlays over the head mesh whch has a basic hair texture on it). The main clump is transparent near the start and end to blend with the skin (When I make the final models and texturing the hair will have transparent bits all along it to see the basic texture of the hair on the skin beneath, I did this to add depth to the hair). This pic shows the effect of this in the bottom left.
I seperated the mesh into two channels one for the skin mesh and one for the opacity mapped hair meshes.
I Set up the hair channel with opacity turned on with the .png map in both the diffuse and opacity maps, and with it marked as two sided. But then it would not show any polys in the show tool or torque (as shown in initial post) and there were no exporting error messages.
What version of max did you use to export the mesh? I used max7.
I will go away and experiemnt with exporting from max 5 and see if it works from there.
EDIT:
It seemed to work much better exprting from max5 with the same settings as in max7 (i.e. 2 standard textures in a multi sub-obejct material as before), the mesh shows up with the mapping working. Was the export problems a max 7 exporter bug, or something different between the files (max 5 and max 7 versions of the head) that i have not noticed?
But new problems became apparent, but i'm not sure if they are fixable, it's to do with the 2-sided mesh lighting and the sorting of the alpha mapped hair:
*When the hair mesh is set to 2-sided it does not light properly, if at all.
*And the fringe hair polygons and some of the back ones sort in the wrong order, even adding "SORT::" to the beginning of the mesh name only makes it worse, it messes up the lighting even more, and does not even sort properly either.
Are these general torque engine bugs, or something that i'm doing wrong?
#10
As far as sort goes I use a Heirachry and several objects but that wont work in your case. I didn't have to sort anything in the above picture.
OK so I looked at it closer I didnt realize there was 2 layers to the hair. Thats definatly going to cause sort issues and that is in the engine. The hair getting darker is cause instead of 1 face you got 2 when you render 2sided. THe solution usually is just fade the alpha a little more. Add some grey to your alpha channel.
Over all I probably would not set that up like that. You can't SORT a skinned mesh or do any kind of tricks with the heirachy to make the zbuffer act right.
If I were you I would change the textures to blend from face to hair. You could just use one 512w x 1024h texture and make it work.
I wish I could be more help.
Matt
01/19/2005 (10:21 am)
NO I used MAX 7 and the exporter in this case works perfectly. Its just how you got material setup. As far as sort goes I use a Heirachry and several objects but that wont work in your case. I didn't have to sort anything in the above picture.
OK so I looked at it closer I didnt realize there was 2 layers to the hair. Thats definatly going to cause sort issues and that is in the engine. The hair getting darker is cause instead of 1 face you got 2 when you render 2sided. THe solution usually is just fade the alpha a little more. Add some grey to your alpha channel.
Over all I probably would not set that up like that. You can't SORT a skinned mesh or do any kind of tricks with the heirachy to make the zbuffer act right.
If I were you I would change the textures to blend from face to hair. You could just use one 512w x 1024h texture and make it work.
I wish I could be more help.
Matt
Associate Logan Foster
perPixel Studios