Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, Ayumi, Quad, PeWi), 488 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
2 pssm shadow problems #411215
11/14/12 13:32
11/14/12 13:32
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline OP
Expert
sivan  Offline OP
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
hi

I found 2 - as I know previously not mentioned - problems after started with pssm shadows:

1) I think I made my "fish shader", by adding 3 lines to animTree.fx, to have nicer tree leaves (and it really works well normally), the alphatest results in disappearing shadows in certain camera angles (if alphablend true it works without errors):
Code:
technique animTree
{
	pass 
		{
			ZWriteEnable 		= True;		
			AlphaTestEnable 	= True;
			AlphaBlendEnable 	= False;
		   
			VertexShader = compile vs_2_0 animTree_VS(); 
		}
}

is it possible to use it after the alpha support will be added in next update to pssm shadows or I need a pixel shader to be applied?

2) if I use mirrorWater.fx, shadows are clipped on very short and at a certain far distance. the close clipping is disturbing, the far one is not a big problem. if the same level is without water, everything is okay.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: 2 pssm shadow problems [Re: sivan] #411282
11/15/12 09:31
11/15/12 09:31
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
I can not confirm the animTree problem here, maybe it's in combination with something else. Can you upload the project or send it to Support? We'll work over the PSSM shader for the next update anyway and will look into the matter.

Re: 2 pssm shadow problems [Re: jcl] #411289
11/15/12 10:39
11/15/12 10:39
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline OP
Expert
sivan  Offline OP
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
you are right, when I run a simple test level I see no errors...

both problems are appear only in my editor, but even beside removing all other shaders, so the reason must be something tricky...

thanks for checking it anyway.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: 2 pssm shadow problems [Re: sivan] #411371
11/15/12 22:12
11/15/12 22:12
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline OP
Expert
sivan  Offline OP
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
okay, I think I found the reason, the errors were not really my fault, the answers are within shadows.c in this part:

Code:
while(!level_ent) wait(1); 	// wait until the level is loaded
level_ent->flags |= SHADOW;	// enable shadow on level geometry
// calculate a minimum sun distance for placing the sun slightly outside the level
sun_angle.roll = 1.1*maxv(vec_length(level_ent->max_x),vec_length(level_ent->min_x));



1) I normally use a NULL level, initialize terrain settings when created (including set(my,SHADOW);), but run PSSM later, during test mode only. this error was caused by wrong terrain SHADOW settings, so the first lines could cause it.

2) this error emerged in case of high pssm_splitweight values, and was much worse in case of large levels. probably water entity also increased level size, and Sun distance is level size dependent. if I use a constant or as a better solution a clip_far dependent one, everything becomes fine.

I can upload a little demo if you are interested mainly because of case 2), but I think it is not essential.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: 2 pssm shadow problems [Re: sivan] #411389
11/16/12 07:36
11/16/12 07:36
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Ok, I think the problem seems clear - shadows are wrong when the loaded level has a wrong size, such as a NULL level.

Make sure to load a level with correct size when running PSSM. Otherwise there can be other problems too, for instance slow rendering due to a wrong ABT.


Re: 2 pssm shadow problems [Re: jcl] #411392
11/16/12 09:06
11/16/12 09:06
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline OP
Expert
sivan  Offline OP
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
okay, NULL level is more practical for development, but I can make a wmb at least of my ground and water terrain, thanks.


Free world editor for 3D Gamestudio: MapBuilder Editor

Moderated by  old_bill, Tobias 

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