Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,534 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
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 Offline OP
Senior Member
CD_saber  Offline 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 Offline OP
Senior Member
CD_saber  Offline 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: CD_saber] #381640
08/30/11 15:15
08/30/11 15:15
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
If there is some sorting problem, there is doublicated geometry.

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 Offline OP
Senior Member
CD_saber  Offline 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: CD_saber] #382442
09/08/11 12:03
09/08/11 12:03
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
1. random(360)
2. your bumptest is the problem.

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 Offline OP
Senior Member
CD_saber  Offline 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 Offline
Expert
Joey  Offline
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 Offline OP
Senior Member
CD_saber  Offline 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!
Re: double sided geometry shader and lightning prob [Re: CD_saber] #382714
09/11/11 21:19
09/11/11 21:19
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
narf


Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1