Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Skin problem for Snowtrooper

Page: 1 of 1
 Mr. X
05-31-2004, 4:54 PM
#1
I'm using a metallic shader for a Snowtrooper skin but when I play as him the back view of his cape is unviewable. You can see his cape in frontal view threw his legs but you can't see any of it from behind. Any suggestions?
 Amidala from Chop Shop
05-31-2004, 11:47 PM
#2
You have to have something in the shader telling the game to apply it to both sides with the "cull" statement. I'm no shader expert but it is something like this:

{
cull disable
{
shader text blah blah
}
}
 Mr. X
06-01-2004, 11:27 AM
#3
Can you please give me an example I'm lost with that. Thnx for the help in advance.

BTW here are some screenies to show you what I mean.

Frontal View of skin close-up with cape in view.

http://img64.photobucket.com/albums/v196/Mr.XMGS2/shot1.jpg)

Rear view of skin close-up with cape not in view.

http://img64.photobucket.com/albums/v196/Mr.XMGS2/shot2.jpg)

Frontal view of skin far away with cape not in view.

http://img64.photobucket.com/albums/v196/Mr.XMGS2/shot4.jpg)

Rear view of skin far away with cape in view.

http://img64.photobucket.com/albums/v196/Mr.XMGS2/shot3.jpg)
 Amidala from Chop Shop
06-01-2004, 10:39 PM
#4
Every surface of a polygon has two sides, a front and a back. Typically, we only see the front or "out" side. For example, a solid block you only show the front side. In many applications we see both. For example, in water, you can see both front and a back. The same is true for things like grates and screens.

To "cull" means to remove. The value parameter determines the type of face culling to apply. The default value is cull front if this keyword is not specified. However for items that should be inverted then the value back should be used. To disable culling, the value disable or none should be used. Only one cull instruction can be set for the shader.


[cull front] The front or "outside" of the polygon is not drawn in the world. This is the default value. It is used if the keyword "cull" appears in the content instructions without a [side] value or if the keyword cull does not appear at all in the shader.
[cull back] Cull back removes the back or "inside" of a polygon from being drawn in the world.
[cull disable, cull none] Neither side of the polygon is removed. Both sides are drawn in the game. Very useful for making panels or barriers that have no depth, such as grates, screens, metal wire fences and so on and for liquid volumes that the player can see from within. Also used for energy fields, sprites, and weapon effects (e.g. plasma).

Design Notes
For things like grates and screens, put the texture with the cull none property on one face only. On the other faces, use a non-drawing texture.

models/players/jedi_hf/hair_02a_alpha_blonde
{
cull disable
{
map models/players/jedi_hf/hair_02a_alpha_blonde
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
depthWrite
rgbGen lightingDiffuse
}
}

I have seen that if one texture with a shader is over another texture with a shader, one of them becomes invisible. Maybe apply the shader to the body only and not the cape.
 Mr. X
06-01-2004, 10:56 PM
#5
Ok I made the shader very short-adding only the armor part to make look metallic, but for some reason the cape still is crazy. Should I add the cull command?

models/players/vanquisher/vanquisher_armor
{
q3map_nolightmap
q3map_onlyvertexlighting
{
map models/players/vanquisher/vanquisher_armor
blendFunc GL_ONE GL_ZERO
rgbGen lightingDiffuse
}
{
map gfx/effects/chr_inv
blendFunc GL_DST_COLOR GL_SRC_COLOR
tcGen environment
}
{
map models/players/vanquisher/vanquisher_armor
blendFunc GL_SRC_ALPHA GL_ONE
detail
alphaGen lightingSpecular
}
}
 Amidala from Chop Shop
06-02-2004, 9:55 PM
#6
Try it. Something like this:


models/players/vanquisher/vanquisher_armor
{
q3map_nolightmap
q3map_onlyvertexlighting
cull disable
{
map models/players/vanquisher/vanquisher_armor
blendFunc GL_ONE GL_ZERO
rgbGen lightingDiffuse
}
{
map gfx/effects/chr_inv
blendFunc GL_DST_COLOR GL_SRC_COLOR
tcGen environment
}
{
map models/players/vanquisher/vanquisher_armor
blendFunc GL_SRC_ALPHA GL_ONE
detail
alphaGen lightingSpecular
}
}
 Mr. X
06-03-2004, 12:24 AM
#7
Well, the cull disable command didn't work. I am gonna drop the skin and apply it to a model that doesn't have a thin cape. I am sorry I made you help me for nothing.
 Amidala from Chop Shop
06-03-2004, 1:09 AM
#8
I really think it' s because you are applying the shader to the body AND the cape. Try it with one or the other.
 Mr. X
06-03-2004, 1:17 AM
#9
I do I apply it to the body only if I don't even have the cape's image listed in the shader file? This might be something wierd with my game because I took my shader out and it still had funny culled effect. It might be a bad file in my game folders maybe. I'll mess around and report tomorrow.
Page: 1 of 1