Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
strange stencil shadows behavior #414800
01/07/13 22:48
01/07/13 22:48
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline OP
Serious User
txesmi  Offline OP
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Hello,
I'm working in a pipeline that uses render_stencil bitmap and found this strange behavior in translucent models:



The box in the first plane is running this action:

Code:
action actTranslucent ()
{
	set ( my, TRANSLUCENT | SHADOW );
//	set ( my, TRANSLUCENT | SHADOW | CAST );
	
	my.material = mtlObject;
	
	var alphaSpeed = 5;
	my.alpha = random(100);
	
	while (1)
	{
		my.alpha += alphaSpeed * time_step;
		
		if ( ( my.alpha > 100 ) || ( my.alpha < 0 ) )
		{
			my.alpha = clamp ( my.alpha, 0, 100 );
			if ( my.alpha == 100 )
			{
				reset ( me, TRANSLUCENT );
//				reset ( me, CAST );
//				set ( me, SHADOW );
			}
			alphaSpeed = -alphaSpeed;
			wait(-1);
			
			set ( me, TRANSLUCENT );
//			set ( me, CAST );
//			reset ( me, SHADOW );
		}
		
		wait(1);
	}
}



When a 24 bits textures entity becomes transparent with TRANSLUCENT flag, it does not cast stencil shadows (as expected) but it renders projected shadow shapes from the actual render_stencil bitmap over its mesh. Same happens with 32bits textured entities. Look at the second screen where a recognizable projected shape is visible over the translucent entity mesh and written in the render_stencil bitmap.

The problem is soluted, as expected, setting and resetting the SHADOW flag when the entity becomes opaque or viceversa, but CAST (+SHADOW) flag does not work properly in translucent entities.

Bug or not I feel it very strange and wanted to report it.

Salud!

PD: the box model is a single and closed mesh.

Re: strange stencil shadows behavior [Re: txesmi] #414859
01/09/13 11:56
01/09/13 11:56
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
The stencil shadow should normally ignore transparent meshes. We'll look into the problem.

Re: strange stencil shadows behavior [Re: jcl] #420490
03/27/13 15:54
03/27/13 15:54
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
Sorry to bring this up again - we initially thought we had found the bug, but it was something else. On revision of the bug list we could not reproduce the problem anymore. So the problem could be dependent on some setting of the project. Can you upload a test project where the wrong shadows are visible?

Re: strange stencil shadows behavior [Re: jcl] #420508
03/28/13 09:04
03/28/13 09:04
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline OP
Serious User
txesmi  Offline OP
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
It is possible that not. I onrmally delete al the unsuccesfull tests. I will look for it anyway.

Thanks for attention.
Salud!

Re: strange stencil shadows behavior [Re: txesmi] #420527
03/28/13 15:30
03/28/13 15:30
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline OP
Serious User
txesmi  Offline OP
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Sorry, i don't have it.

Re: strange stencil shadows behavior [Re: txesmi] #420625
03/30/13 11:56
03/30/13 11:56
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
Ok - if you ever encounter that problem again, or anybody else, please post here. Once we can reproduce the problem it's probably easy to find the reason.


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