Gamestudio Links
Zorro Links
Newest Posts
Support and Resistance Zones/Cluster
by sdh309795gaas
Today at 05:22
Zig Zag function
by sdh309795gaas
Today at 04:12
What are you working on?
by Reconnoiter
Yesterday at 23:05
Square Root Rule & Additional Investment
by MatPed
Yesterday at 13:49
Optimal parameters for a basket of assets
by brax
Yesterday at 12:25
AUM Magazine
Latest Screens
Triton Wing
ZeaL
Computer Repair Simulator
Collider (working title)
Space Rider
Who's Online
9 registered (Dico, Dalla, sdh309795gaas, jyd, ddrrbb, Superku, Nanitek, jrath, 1 invisible), 417 Guests and 5 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Marce, pascalx, SpaceNL, onlinejack, johnnyp
17716 Registered Users
Page 2 of 3 < 1 2 3 >
Topic Options
Rate This Topic
#465941 - 05/18/17 10:58 Re: Double sided shader that works with PSSM [Re: sivan]
3run Offline
Expert

Registered: 05/05/09
Posts: 4887
Loc: 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).


Edited by 3run (05/18/17 12:16)
_________________________
Looking for free stuff?? Take a look here: http://badcom.at.ua

Top
#465946 - 05/18/17 15:19 Re: Double sided shader that works with PSSM [Re: 3run]
sivan Offline
Expert

Registered: 03/07/11
Posts: 3102
Loc: 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

Top
#465947 - 05/18/17 15:20 Re: Double sided shader that works with PSSM [Re: sivan]
sivan Offline
Expert

Registered: 03/07/11
Posts: 3102
Loc: 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

Top
#465994 - 05/19/17 12:02 Re: Double sided shader that works with PSSM [Re: sivan]
3run Offline
Expert

Registered: 05/05/09
Posts: 4887
Loc: 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!


Edited by 3run (05/19/17 13:06)
_________________________
Looking for free stuff?? Take a look here: http://badcom.at.ua

Top
#466022 - 05/21/17 17:09 Re: Double sided shader that works with PSSM [Re: 3run]
sivan Offline
Expert

Registered: 03/07/11
Posts: 3102
Loc: 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

Top
#466024 - 05/21/17 20:08 Re: Double sided shader that works with PSSM [Re: sivan]
3run Offline
Expert

Registered: 05/05/09
Posts: 4887
Loc: 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

Top
#466205 - 05/31/17 21:33 Re: Double sided shader that works with PSSM [Re: 3run]
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1742
Loc: 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


Edited by Reconnoiter (05/31/17 21:35)

Top
#466219 - 06/01/17 18:45 Re: Double sided shader that works with PSSM [Re: Reconnoiter]
sivan Offline
Expert

Registered: 03/07/11
Posts: 3102
Loc: 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

Top
#466238 - 06/02/17 13:04 Re: Double sided shader that works with PSSM [Re: sivan]
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1742
Loc: Netherlands
Okay thanks for the info.

Top
#466572 - 06/21/17 18:48 Re: Double sided shader that works with PSSM [Re: Reconnoiter]
jumpman Offline
Serious User

Registered: 04/17/02
Posts: 1057
Loc: ny
Hey everyone, is there a way to change the shadow color of gamestudios PSSM shadow? Or can it only be black?
_________________________
A8 Pro 8.47

Top
Page 2 of 3 < 1 2 3 >


Moderator:  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | resources | magazine | manual | support faq | bugs | beta features

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) 3dgamestudio.net