Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, dr_panther, Quad), 935 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
PSSM and LOD #420007
03/18/13 11:55
03/18/13 11:55
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
I'm trying to get shadows casted from the 3rd lod of my model, by setting shadow_lod=3;
The model is called character_0.mdl, and the 3rd lod model is called character_3.mdl. However, PSSM shadows still use the first lod for shadows, so I get an horrible performance.
@sivan also checked this and noticed it really does not work, shadows changes together with model lod change.


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: PSSM and LOD [Re: painkiller] #420048
03/19/13 07:27
03/19/13 07:27
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
PSSM is a shader. It has no "shadow_lod". But you can certainly implement LOD steps in the PSSM script, or we can do that in a future version.

Re: PSSM and LOD [Re: jcl] #420074
03/19/13 12:33
03/19/13 12:33
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
Originally Posted By: jcl
PSSM is a shader. It has no "shadow_lod". But you can certainly implement LOD steps in the PSSM script, or we can do that in a future version.


on shadows.c code I found this:

Code:
viewSplit[i]->lod = shadow_lod;



That should do the trick, shouldn't it? If not, could you please explain how we can modify the PSSM script to get that working?


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: PSSM and LOD [Re: painkiller] #420129
03/20/13 10:52
03/20/13 10:52
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
No, it does not do the trick. The distance that determines the LOD stage is not the distance to the camera for split views. Implementing LOD steps in the script would require a render event that determines the entity's camera distance and switches its model accordingly.

Implementing it directly in the engine is probably a more elegant way, and I've put that on my list.

Re: PSSM and LOD [Re: jcl] #420160
03/20/13 15:27
03/20/13 15:27
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
Originally Posted By: jcl
No, it does not do the trick. The distance that determines the LOD stage is not the distance to the camera for split views. Implementing LOD steps in the script would require a render event that determines the entity's camera distance and switches its model accordingly.

Implementing it directly in the engine is probably a more elegant way, and I've put that on my list.


okay, thanks laugh


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: PSSM and LOD [Re: painkiller] #420710
04/01/13 11:36
04/01/13 11:36
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
I've been able to get this working by removing NOLOD from line 95 in shadows.c and and setting viewShadow lod to shadow_lod, so it should look like this:

Code:
viewShadow->flags |= SHOW|UNTOUCHABLE|NOSHADOW|NOPARTICLE|NOSKY;
viewShadow->lod = shadow_lod;



With this code I can get lod offsets for shadows working nicely


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: PSSM and LOD [Re: painkiller] #420730
04/02/13 07:13
04/02/13 07:13
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Thanks! Be aware though that the distance for switching the LOD steps is not the distance to the camera, but the distance to the PSSM views in that case. So for a correct LOD the LOD steps have to be calculated with a different distance.


Moderated by  jcl, Nems, Spirit, 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