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.

DarkBASIC Professional Discussion / Viewing frustrum of the camera - workaround

Author
Message
Philip
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 16th Aug 2003 12:25
Hi

In the game I am writing I want to use some very large objects. Planets, to be exact. (Yep, they're large alright). Now as I see it they're always going to be outside the viewing frustrum of the camera because the player, who is in space, can't get too close to the planets without "dieing".

My problem is how to let the player see the planets. I thought one workaround might be to have a routine which calculates the size of the planet as it would appear if it could be seen, and then dynamically copy the object onto the very edge of the viewing frustrum, with some code to make the planet look the right sort of size. So as the player got closer and closer to the actual position of the planet in 3d space, the copied object would progressively get bigger and bigger.

What do people think of this solution? Another boo-boo, or a good idea from a smart bear?

Phil
What do you mean, bears aren't supposed to wear hats and a tie?
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 16th Aug 2003 12:54
shrinking the overal size of your human intended size to a much smaller size then you probably have will allow for a few things.

reduce the set camera range as well as the fog range. If the fog range is just inside the camera range then they will apper to come from the haze of the fog.

If you worked to a scale of like one DB unit primitive equals ten feet then its possible to work with bsp style map components should you want to enter broken down space bases etc..

the smaller size helped me and I think it would be better for a game to have range in its commands yet still look very distant.

imagine a small spacecraft of 2x2 db units with a 1x1 creature as pilot moving at 4 db units a second looming up near a 1000 db unit moon.

Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 16th Aug 2003 19:09
If I was smart, I'd keep quiet, but I'm not, so I won't.

I personally read your post 2 or 3 times and I don't understand why you can just set the camera viewing distance to a very large value so that the planets are within camera range, but the camera is still very far away. Whats wrong with that solution?

Insiiiiiiiiiiiiiiiiiiiiiiiide!

Login to post a reply

Server time is: 2026-07-22 18:54:00
Your offset time is: 2026-07-22 18:54:00