Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Camera Depth Range help

Author
Message
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 17th May 2023 23:12 Edited at: 17th May 2023 23:14
frustrated, frustrated, frustrated, frustrated

No matter what I do I have to have my camera view so far my programs slow down in 3d.

That is if I am using a sky box and this is getting very frustrating.

I thought I was lucky to find these two commands but they do not work, so they are bugged, I tested them fully in every way and they do not work.

SetObjectDepthRange()
SetObjectDepthReadMode()

When I set my Sky Box to a size of

SetObjectScale(SkyBox, 1000, 500, 1000)

I have to set my view to over 7000 to even see it.

So then I use the

SetObjectDepthRange()

and set it to 1,8000 and that sounds about correct for a reasonable view rate.

Nothing.

Then I set my sky box to view always no matter what with .

SetObjectDepthReadMode()

And nothing.

Sounds to me the read mode is bugged or the commands do not work.

If anyone knows anything about this please explain.

Thank you.
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 18th May 2023 06:21
I think what you are looking for is SetCameraRange.
SetObjectDepthRange refers to the depth buffer as far as I know and it can only have values between 0.0 and 1.0.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 18th May 2023 06:33
I am setting my camera range and that is the problem, I can only set it real high to see the sky box, there is no in-between.

So if I set my

Setcamerarange() to 1,1000 I can not see my skybox, If I set it to 80000 I then can see my sky box.

So is there a way to tell a object to be drawn at all times no matter what range the camera is in?
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 18th May 2023 08:13
Ok so I learned something.

Answer here

Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 18th May 2023 11:19
Hi

If you use a skybox (like a sphere uvmapped), perhap's you could fix this object to the player (or get the position of the player each frame). So you don't need to have a camerarange too far, only a camerarange to see the skybox, and the fps will be good.




AGK2 tier1 - http://www.dracaena-studio.com
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 18th May 2023 14:00
Thank you Blendman

I will look at your code and play with it.

Login to post a reply

Server time is: 2024-04-23 18:37:12
Your offset time is: 2024-04-23 18:37:12