Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (monk12, Quad), 830 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Double sided shader that works with PSSM [Re: sivan] #465941
05/18/17 08:58
05/18/17 08:58
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Thank you! Can I rip it off the mapbuilder for personal use and to share it with those who is looking for shadowmapping? Do we need to give you any credits? laugh

Edit: ripped off the scsm, tried to run Scsm_Start in main loop, no errors, but no shadows (included all .fx files mentioned in both .c and .h files). Tried settings SHADOW flag for level_ent and even tried to set FLAG6 (saw in somewhere in your code, I guess in mapent.c ?) but no luck. Where can I find materials related to scsm to apply them for level blocks etc? Plus there is still issue with no moving shadows after terrain and grass models (which are animated via shader).

Last edited by 3run; 05/18/17 10:16.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Double sided shader that works with PSSM [Re: 3run] #465946
05/18/17 13:19
05/18/17 13:19
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
materials are set dynamically in MBmaterials.c according to actual shadow_stencil value (can be -1, 1, 8)

Code:
else //if (shadow_stencil == (var)-1)
				{
					// MB materials got shader to have self shadows
					effect_load(mtl_detail		,"sc_obj_sprite_MB.fx");				// obj_animGrass1_MB (no shadow response, bad with height fog) or sc_obj_sprite_MB
					effect_load(mtl_shrub		,"sc_obj_sprite_MB.fx");
					effect_load(mtl_grass 		,"sc_obj_grass1_MB.fx");
					effect_load(mtl_obstacle	,"sc_obj_model_MB.fx");
					effect_load(mtl_tree			,"sc_obj_tree1_MB.fx");
					effect_load(mtl_mapent		,"sc_obj_level_MB.fx");
					effect_load(mtl_terrmdl		,"sc_obj_model_MB.fx");
					effect_load(mtl_building	,"sc_obj_model_MB.fx");
					
					// 3DGS materials can be used to not to have self shadow
//					effect_load(mtl_terrain		,"sc_obj_model_MB.fx");					// not used, in action own shader
					effect_load(mtl_model		,"sc_obj_model_MB.fx");
					effect_load(mtl_sprite		,"sc_obj_sprite_st_MB.fx");	
					effect_load(mtl_flat			,"sc_obj_level_MB.fx");
					effect_load(mtl_shaded		,"sc_obj_level_MB.fx");
					effect_load(mtl_sky			,"sc_obj_sky_MB.fx");
					
//					mtl_tree.flags |= ENABLE_TREE;											// ENABLE_RENDER or ENABLE_TREE
//					mtl_tree.event = sc_tree_billboard_event;
					
					// RTS unit materials 
{}
#ifdef PLAY02_PS
					effect_load(mtl_bonesanim	,"sc_obj_bones_MB.fx");	// FIL	 	// slower SM3.0 shader with pixel shader - capability of player colour display
#else
					effect_load(mtl_bonesanim	,"obj_bones_MB.fx");		// FIL		// no pixel shader
#endif					
				}



but as I mentioned in the MapBuilder thread yesterday, there is a bug in loading settings from a file, so next week it is going to be fixed.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Double sided shader that works with PSSM [Re: sivan] #465947
05/18/17 13:20
05/18/17 13:20
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
of course you can rip it off, just give me credits.
I think earlier I made a separate demo and shared in the forum...


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Double sided shader that works with PSSM [Re: sivan] #465994
05/19/17 10:02
05/19/17 10:02
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
I'm getting black screen :<

Didn't load any settings, since they are set to default values in scsm header. Applied all shaders via effect_load, as in your example. Compiles with no errors, all .fx files are included. Maybe you remember facing this issue? I'm pretty sure that it's easy to fix, I'm just missing something. Also, what about not moving shadows for animated (via shader) grass and tress?

Edit: also another question, were you able to get shadows working for animated sprites?


Best regards!

Last edited by 3run; 05/19/17 11:06.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Double sided shader that works with PSSM [Re: 3run] #466022
05/21/17 15:09
05/21/17 15:09
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I used animated sprites (as far lods of characters) with shadows. I don't know why you get black geometries, some material settings could be wrong. I can help next week I'm really tired now, I have finished today morning a one day long ultra-marathon in a team...


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Double sided shader that works with PSSM [Re: sivan] #466024
05/21/17 18:08
05/21/17 18:08
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Sounds awesome man! Did your team win?

It would be great if you could help us out with this. Having some shaders seperated from your project MapBuilder could be helpful for those who are still torment gamestudio grin

Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Double sided shader that works with PSSM [Re: 3run] #466205
05/31/17 19:33
05/31/17 19:33
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Howdy, Sivan does your MapBuilder's shadowmapping work in combination with the shade-c (evo)?
(I am using shade-c (evo) now and while the sun shadows are fairly sharp it drains fps alot)

Quote:
Having some shaders seperated from your project MapBuilder could be helpful for those who are still torment gamestudio grin
, yes please be our knight in shiny armor smile

Last edited by Reconnoiter; 05/31/17 19:35.
Re: Double sided shader that works with PSSM [Re: Reconnoiter] #466219
06/01/17 16:45
06/01/17 16:45
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
no they are incompatible, moreover evo uses a deferred renderer I have no experience with.

I wanted to update Mapbuilder this week, but I have been very-very busy, so it should happen next week only...

my shadowmapping was developed for my RTS game, so its main purpose was to have something fast beside acceptable quality, preferably using only one depth view. it can be okay with high resolution beside keeping shadow area small, but near sharp edges some defects are often visible. so for a 1st or 3rd person game a pssm is better, but since using the stencil buffer with 3dgs results in bugs (related to transparency, mirror views, or terrain lod I don't know), a shader only version would be a better choice. I think I made earlier such a test project...


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Double sided shader that works with PSSM [Re: sivan] #466238
06/02/17 11:04
06/02/17 11:04
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Okay thanks for the info.

Re: Double sided shader that works with PSSM [Re: Reconnoiter] #466572
06/21/17 16:48
06/21/17 16:48
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
Hey everyone, is there a way to change the shadow color of gamestudios PSSM shadow? Or can it only be black?

Page 2 of 3 1 2 3

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