|
double sided geometry shader and lightning prob
#381413
08/27/11 17:01
08/27/11 17:01
|
Joined: Jan 2002
Posts: 454 Germany
CD_saber
OP
Senior Member
|
OP
Senior Member
Joined: Jan 2002
Posts: 454
Germany
|
Good Evening, I've got some probem using the Improved Overlay Shader from the wiki ( http://www.opserver.de/wiki/index.php/ImprovedOverlay) The leaves of my tree-models have only one-sided faces, so I'm using the shader. The problem is, that the leaves are flickering (lighter and darker) when I move the camera (which I suppose, is kind of a light-sorting problem of the shader) Does anyone have a workaround or some better shader? Thanks in advance! CD_SABER
Ja, lach du nur du haariges Pelzvieh!
|
|
|
Re: double sided geometry shader and lightning prob
[Re: CD_saber]
#381636
08/30/11 14:33
08/30/11 14:33
|
Joined: Jan 2002
Posts: 454 Germany
CD_saber
OP
Senior Member
|
OP
Senior Member
Joined: Jan 2002
Posts: 454
Germany
|
How can it be that I'm the only person with this particular problem? Isn't anyone using one-sided-geometrie+material to limit the model's faces?
Ja, lach du nur du haariges Pelzvieh!
|
|
|
Re: double sided geometry shader and lightning prob
[Re: Slin]
#382353
09/07/11 13:30
09/07/11 13:30
|
Joined: Jan 2002
Posts: 454 Germany
CD_saber
OP
Senior Member
|
OP
Senior Member
Joined: Jan 2002
Posts: 454
Germany
|
Ahh, I found out that the material isn't the problem. -> but couldn't solve the problem...
What I have is: A tree model (1st Skin = trunk texture, 2nd skin = trunk normalmap, 3rd skin = leave texture (with alpha map)
Here is the tree's action:
------------------------------------------------------- action tree() { ////place the tree on the floor VECTOR temp; vec_set (temp, my.x); temp.z -= 2000; my.z -= c_trace (my.x, temp, IGNORE_ME + IGNORE_YOU + IGNORE_SPRITES + IGNORE_PASSABLE) + 10; my.pan = random(359);
my.material = mat_alphatrans_obj; ent_mtlset (my, bumptest, 1);
}
-------------------------------------------------------
The assignment of the shaders works, but when I move the camera, the leaves are flickering... (there is no duplicated geometry)
Can somebody help me? Or is there another solution for assigning a bump mapping to a tree model?
EDIT: The tree doesn't flicker if I change the skin order of the skins (skin1 = leaves skin, skin2 = ...) but then the bump mapping does not work... (I also set ent_mtlset (my, bumptest, 2);)
Last edited by CD_saber; 09/07/11 13:33.
Ja, lach du nur du haariges Pelzvieh!
|
|
|
Re: double sided geometry shader and lightning prob
[Re: Joey]
#382640
09/10/11 16:13
09/10/11 16:13
|
Joined: Jan 2002
Posts: 454 Germany
CD_saber
OP
Senior Member
|
OP
Senior Member
Joined: Jan 2002
Posts: 454
Germany
|
@Joey
Thank you for your response! But I do not underhand how the bumptest could be the problem. could you please explain this in detail? bumptest is just a copy of the 3dgs "mtl_bump".
Ja, lach du nur du haariges Pelzvieh!
|
|
|
Re: double sided geometry shader and lightning prob
[Re: CD_saber]
#382646
09/10/11 17:44
09/10/11 17:44
|
Joined: Jan 2003
Posts: 4,615 Cambridge
Joey
Expert
|
Expert
Joined: Jan 2003
Posts: 4,615
Cambridge
|
well, you can only have one material at a time. if you want bumpmapping and corrected sorting, you need to merge the two shaders. the mtlset effectively overwrites the previous shader assignment. i'm not even sure what is supposed to happen in that case, but if i had to solve the error, that's where i would start.
Last edited by Joey; 09/10/11 17:45.
|
|
|
Re: double sided geometry shader and lightning prob
[Re: Joey]
#382704
09/11/11 14:40
09/11/11 14:40
|
Joined: Jan 2002
Posts: 454 Germany
CD_saber
OP
Senior Member
|
OP
Senior Member
Joined: Jan 2002
Posts: 454
Germany
|
Problem solved by PAINKILLER (thanks again, mate!)
You just have to set the OVERLAY flag and my code works!
Ja, lach du nur du haariges Pelzvieh!
|
|
|
|