Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
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
1 registered members (1 invisible), 735 guests, and 2 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
DoF not dynamically adjusting #227465
09/14/08 15:30
09/14/08 15:30
Joined: Oct 2003
Posts: 2,194
Saturn
Metal_Thrasher Offline OP
Expert
Metal_Thrasher  Offline OP
Expert

Joined: Oct 2003
Posts: 2,194
Saturn
I think this is right forum to post this in, maybe not. If not I hope a mod will move this.
I'm using a DoF code by Slin. And I'm trying to have it dynamicaly adjust according to what the player is looking at. I do this through a c_trace. It's been a while, and long while, since I've used 3DGS. So maybe somebody could explain to me why this code dosen't work
Code:
 void calc_dof()
{
	PP_DoF_init(camera,500,1000,1000,30,2);
	while(1)
	{
		c_trace(camera.x, vector(camera.x, camera.y, camera.z-1000),0);
		
		PP_DoF_SetValues(target.x,target.x+500,1000,30,2);
		//beep();
		wait(1);
	} 


When I had the beep uncommented it was beeping, so I know the code is working to that extent, but the focus is not adjusting.

By the way the parameters for the DoF are this in Slin's code:
Code:
 		PP_DoF_SetValues(NearPlaneDist,FarPlaneDist,FarFadeoutDist,BlurRadius,DownsampleFaktor); 



-Johnny Thrash
Re: DoF not dynamically adjusting [Re: Metal_Thrasher] #227474
09/14/08 15:57
09/14/08 15:57
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
You trace directly at the bottom under the camera.

Code:
VECTOR target;
target.x = 1000;
target.y = 0;
target.z = 0;
vec_rotate( target, camera.pan );
vec_add( target, camera.x );

c_trace(camera.x, target,0);


Re: DoF not dynamically adjusting [Re: TWO] #227477
09/14/08 16:02
09/14/08 16:02
Joined: Oct 2003
Posts: 2,194
Saturn
Metal_Thrasher Offline OP
Expert
Metal_Thrasher  Offline OP
Expert

Joined: Oct 2003
Posts: 2,194
Saturn
Oh damn, thanks. That was stupid mistake. But still it isnt giving the effect I thought it would. The screen is blurry like it should be. But if I understand this right. By adjusting the near and far plane in the DoF parameters shouldn't it by all rights focus on the area between?


-Johnny Thrash
Re: DoF not dynamically adjusting [Re: Metal_Thrasher] #227908
09/16/08 18:56
09/16/08 18:56
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
It seems as if there is a problem with some hardware which causes this not to wok properly...

Re: DoF not dynamically adjusting [Re: Slin] #228272
09/18/08 13:08
09/18/08 13:08
Joined: Oct 2003
Posts: 2,194
Saturn
Metal_Thrasher Offline OP
Expert
Metal_Thrasher  Offline OP
Expert

Joined: Oct 2003
Posts: 2,194
Saturn
I have a really nice nvidia card. Like I said I get the blurry screen...but no appearent "depth". Was it just poorly designed code? I mean as far as different video cards go?


-Johnny Thrash

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