Additive alpha lighting
by Phil Carlisle · in Torque Game Engine · 12/27/2003 (4:43 pm) · 6 replies
Hi Guys.
Well, after a little bit of twiddling around, i got a simple bit of specularity on my ships. Looks kinda nice.
So I'm onto another issue I spotted when I was working on this.
Additive alpha meshes right now are lit. Which means that the additive effects are generally lost.
Are there any particular reasons why I shouldnt just hack in a change that basically just disables lighting for any additive textures?
I cant really think of any particular case where you'd want additive alpha textures AND lighting.. anyone think of one?
Cheers.
Well, after a little bit of twiddling around, i got a simple bit of specularity on my ships. Looks kinda nice.
So I'm onto another issue I spotted when I was working on this.
Additive alpha meshes right now are lit. Which means that the additive effects are generally lost.
Are there any particular reasons why I shouldnt just hack in a change that basically just disables lighting for any additive textures?
I cant really think of any particular case where you'd want additive alpha textures AND lighting.. anyone think of one?
Cheers.
About the author
Recent Threads
#3
Well, it seems there IS a way to get it workin, after digging through the maxsdk docs, the "self-illumination" spinner value of the material isnt the one that they used for the self-illumination of the material (certainly didnt work before).
I did a bit more digging, and reading the maxsdk docs, it definitely used the GetSelfIllum(matid); function. So I thought "hmm, might be the material type?" so I went through the list and hey ho, but theres a TRANSLUCENT shader! hmm.. wonder if that has self-illumination? maybe not..
Oh, look.. if you turn off the colour value for that material type, it changes to a spinner!
Whack that up (the self-illumination in torque only works if the value is > 0.99f, and I'm assuming its normalised to 0..100 as 0..1.0f so I whacked it up to 100 in the spinner and voila! works!
Now it might not be useful for everyone. In fact, it probably isnt.. but for space games, its a must have :)
12/28/2003 (4:59 am)
Man I roxxor several hundredweight of boxxors! :)Well, it seems there IS a way to get it workin, after digging through the maxsdk docs, the "self-illumination" spinner value of the material isnt the one that they used for the self-illumination of the material (certainly didnt work before).
I did a bit more digging, and reading the maxsdk docs, it definitely used the GetSelfIllum(matid); function. So I thought "hmm, might be the material type?" so I went through the list and hey ho, but theres a TRANSLUCENT shader! hmm.. wonder if that has self-illumination? maybe not..
Oh, look.. if you turn off the colour value for that material type, it changes to a spinner!
Whack that up (the self-illumination in torque only works if the value is > 0.99f, and I'm assuming its normalised to 0..100 as 0..1.0f so I whacked it up to 100 in the spinner and voila! works!
Now it might not be useful for everyone. In fact, it probably isnt.. but for space games, its a must have :)
#4
- Brett
01/02/2004 (6:58 am)
Guess I'm curious as to what exactly you arrived at here. Maybe my american english is missing the meaning of your british english (a guess because you have a "u" in color) ;-)- Brett
#5
Basically, you need to use a translucent texture (i.e. instead of blinn or metallic) and then use the self-illumination value to set it to 100 and youre alpha texture wont be affected by OGL lighting.
Try doing an alpha blended mesh, then turn the lighting down to 0 :)
01/02/2004 (10:35 am)
Hey Brett.Basically, you need to use a translucent texture (i.e. instead of blinn or metallic) and then use the self-illumination value to set it to 100 and youre alpha texture wont be affected by OGL lighting.
Try doing an alpha blended mesh, then turn the lighting down to 0 :)
#6
- Brett
01/02/2004 (10:37 am)
Y'know, I see issues with using 2-sided textures and not being lit by OGL. Oh wait.. that's a side issue that Ben needs to fix!!- Brett
Associate Kyle Carter
Stop going to bed when I finish dinner!