Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (alibaba, howardR, basik85278), 756 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
PSSM Shadows with transparency entitie Problem #464181
01/27/17 07:40
01/27/17 07:40
Joined: Feb 2011
Posts: 124
Germany Nrw Herford
HenWoll Offline OP
Member
HenWoll  Offline OP
Member

Joined: Feb 2011
Posts: 124
Germany Nrw Herford
Hi everyone,
Since I dont wanted to spam the [what are you working thread ]
so I start here a new Thread and hope you can help me

I have a strong alpha channel problem with entities when im using PSSM shadows, I have already tried almost all flags, but I get the entites not on ignore the Shadow, The only flag that triggered something was the overlay flag, But it had the appearance that I had the shadow simply inverted around.

I have remove already Shade-c from the Projekt for tested pssm Shadows.


I have also searched the forum afterwards but I have not found any really similar posts.Which surprised me a bit since I seem to be the only one

The 2 models on the view are put on invisible (100% alpha) muzzle fire & reload sprite,To the left of the building you can see an orange lansflare which is also affected by it


and here the same screenshots with the overlay flag


I hope you understand my problem.

here the default main code

Code:
function main() {

   video_mode = 10;
//   video_set(sys_metrics(0),sys_metrics(1),0,1);
   video_set(1024, 768,0, 2);
  	  shadow_stencil = 8; // activate external shadows
  shadow_lod = 1; // works also for PSSM
//   def_move();
  for(you = ent_next(NULL); you; you = ent_next(you)) 
    set(you,SHADOW);


// adjust camera and bias, activate PSSM 
  camera.clip_far = 11000;
  camera.clip_near = 1;
  pssm_fbias = 0.004;
  pssm_run(4);
	mat_shadow.alpha = 25; //transparency of dynamic shadows		
	shadow_mode = IGNORE_SPRITES+IGNORE_PASSABLE+IGNORE_PASSENTS+IGNORE_PASSENTS;

	shadow_threshold = 80;	// 80
	shadow_offset = 2.5;

	mouse_map = mouse;
	max_entities = 2000;
	camera.arc = 70; // set camera.arc to a proper value for shooter games
	fps_max = 80; // limit the frame rate to 75 fps (not really needed)


	wait(1);



so and here the flags from the muzzle fire model

Code:
function set_weaponMuzzle()
{
	//set(my,PASSABLE | LIGHT );
set(my,PASSABLE | TRANSLUCENT | BRIGHT |LIGHT|ZNEAR|OVERLAY|PASS_SOLID);
//set(my,PASSABLE | TRANSLUCENT | BRIGHT | PASS_SOLID |OVERLAY|LIGHT| NOSHADOW| FLAG2|SHADOW| ZNEAR);
//	set(my,PASSABLE | TRANSLUCENT | BRIGHT | ZNEAR);
	my->alpha = 0;
//	my->ambient = -50;
	
	while(player)
	{
		if(weapon_active > 0 && my->alpha > 0)
		{
			
			my->alpha -= 50 * time_step;
			my->lightrange = 150;
		}
		else
		{
			my->alpha = 0;
			my->lightrange = 0;
		}
		wait(1);
	}
}


Re: PSSM Shadows with transparency entitie Problem [Re: HenWoll] #464182
01/27/17 10:42
01/27/17 10:42
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
Hi,
do you use mirror shader in the level?
I while ago I reported a bug related to transparent/overlay shadows (using the stencil buffer like the pssm shadows) when mirror is created in the scene. I think it has not been resolved properly, but don't remember exactly, it was at least 2 years ago.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: PSSM Shadows with transparency entitie Problem [Re: sivan] #464184
01/27/17 11:21
01/27/17 11:21
Joined: Feb 2011
Posts: 124
Germany Nrw Herford
HenWoll Offline OP
Member
HenWoll  Offline OP
Member

Joined: Feb 2011
Posts: 124
Germany Nrw Herford
I bet this is a really simple error of me here,

Quote:
Hi,
do you use mirror shader in the level?
I while ago I reported a bug related to transparent/overlay shadows (using the stencil buffer like the pssm shadows) when mirror is created in the scene. I think it has not been resolved properly, but don't remember exactly, it was at least 2 years ago.


i tested this without any Shaders, ore somthing,
Here is a simple Level with the same Bug
But thanx for the awneser










Last edited by BlackJack; 01/27/17 21:39.
Re: PSSM Shadows with transparency entitie Problem [Re: HenWoll] #464202
01/27/17 16:16
01/27/17 16:16
Joined: Oct 2008
Posts: 681
Germany
Ayumi Offline
User
Ayumi  Offline
User

Joined: Oct 2008
Posts: 681
Germany
We have solved the problem via skype.

Set in shadow.c NOFLAG1.
viewShadow->flags |= SHOW|UNTOUCHABLE|NOSHADOW|NOPARTICLE|NOLOD|NOSKY|NOFLAG1;

All entities to be ignored get flag1 and it works.


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