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 / Having a camera range AND big sky sphere

Author
Message
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 14th Mar 2003 12:59
Is there any way to have a camera range of say 2000 units but not affect a huge sky sphere or box that will be way beyond the camera range?

If sky sphere is say 5000 units away, you are forced to have a camera range of at least that many units which could slow things down.

Basically, is there a way to tell an object to ignore the camera range
Gronda, Gronda
malcom2073
23
Years of Service
User Offline
Joined: 12th Mar 2003
Location:
Posted: 14th Mar 2003 13:26
I think, you set the objects zdepth or something. Look in the help files, I think I saw something in there. If my DBP worked I could test it but I cant.

spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 14th Mar 2003 13:51
You are thinking of DISABLE OBJECT ZDEPTH

this forces an object to draw last. Used for guns to stop them poking through walls when you are up close. It is no good for this problem.

Thanks for repsonding though!

Anyone else???

Gronda, Gronda
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 14th Mar 2003 15:39
I suppose you could put a or sphere at the very end of the camera range and render a camera to it (a camera which is just beyond the plain, pointing at the skysphere).

Alternatively work out your own optimisation function to hide objects further than a certain distance from the camera with the exception of the skysphere.

Current Project: Retro Compo. Entry.
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 14th Mar 2003 16:49
Rob K: I was leaning to your idea anyway for normal objects, but still leaves a problem for matrices.

I am designing a BIG matrix game.

I think I will try and design a system of multiple matrices stitched together and as you walk from one matrix to another, it only shows the matrix you are on and the 8 surrounding ones. This way I could have one massive level but it won't slow down.

Anyhow, if anyone has an answer to first post, it would still be of interest!

Gronda, Gronda
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 14th Mar 2003 20:22
Sonic, you might want to try out my demo of Terrascape - downloadable from the Beta announcements forum or the forums on my web page.

The reason I suggest it is because Terrascape proves that the method to a really very large map is not by making your matrix bigger, but instead smaller.

If you have a small matrix, the update matrix command does not take very long to execute and can be done every few seconds - thus dynamically changeing the contents of your matrix by keeping the camera central to the matrix itself.

In essence, you move the matrix around the camera, rather than the camera around the matrix (although I still move my camera and simply reposition my matrix - it's easier to do AI that way).

So there you have it, the ultimate secret to massively huge matrixes

As for distance culling, personally I automatically solved that one with my matrix world - because in order to fill that massive matrix with objects (anyone can make a big map - the problem is filling it) you have to be pretty dynamic with your content too so I manually cull my objects in the code (and re-use them so 1 tree object can show several trees), therefor erradicating the need to use set camera range at all.

Pneumatic Dryll, Outrageous epic cleric of EQ/Xev
God made the world in 7 days, but we're still waiting for the patch.
Flashing Blade
23
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 14th Mar 2003 20:24
what about a sky spere of 2000 like u want and move it with the player/camera
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 17th Mar 2003 13:37
Yes, thankyou PneumaticDryll, you have answered my question. I had already downloaded your Terrascape demo thingy and was very impressed.

After a bit of faffing around at the weekend came to the conclusion that BIG matrices are a no,no. They slow the system down too much. If for example you have 4 matrices invisibly tiled, it makes virtualy no difference in speed than just one of the 1 matrices. But if you have 1 big matrix the same size as 4 smaller ones, system grounds to a halt. So I will go with having lots of small matrices but updated invisibly to the user who thinks it is one big matrix.

Gronda, Gronda

Login to post a reply

Server time is: 2026-07-10 19:48:26
Your offset time is: 2026-07-10 19:48:26