What is the best way to create a space Universe?

Blitz3D Forums/Blitz3D Beginners Area/What is the best way to create a space Universe?

Akira(Posted 2004) [#1]
I am creating a space game and I need some advice on what the best method is for rendering things at a distance, given the apparent optimal camera range is 1000.

I already have a system where the camera and player's ship never goes beyond 1000 units from 0,0,0.

How can I display large objects (like the Sun, Planets and maybe space stations) beyond the 1000 unit camera range?

Should I position all distant large objects just inside the edge of the 1000 unit camera range and scale them to give them the appearance of being further out? Is this a good idea, or is there a better way?

TIA,

Akira


WolRon(Posted 2004) [#2]
I'm sure you can go well beyond 1000 in a space sim since most of space is empty.


_PJ_(Posted 2004) [#3]
The camera range is really down to scale. It could be set to 10,10000 or 100,100000 and should still be okay. This depends of course on your meshes and the 'speed' of objects that move.

If your objects are to be 'unapproachable', they can be kept at a relative distance, so always appear far away.

Ultimately, it depends a lot on what sort of a game you are making. Are these objects just scenery or are they active?

I did make a similar thread a while ago, but with the new forum layout, I cant find it right now........

(I think the Topic Title was 'Space Scale')


Tri|Ga|De(Posted 2004) [#4]
You can try my Outer Space Maker.

You'll find it in the toolbox under 3D World Editors.

Maybe this can help you!


Akira(Posted 2004) [#5]
Wolron/Malice, thanks for the replies. I'll look at increasing the camera range and see how it goes.

-----------------------------------

TGD, I had a look at your OSM and it looks pretty good.

Unfortunately I don't think it is suited to the dynamic type of universe I am trying to create, although it should give me a few ideas on how to implement some things.

I noticed that you used a camera range of 5000. I'll need to play with OSM a bit more to see how the range of 5000 handles larger planets at a distance as the default planet size (20, I think) is far too small for what I need.


_PJ_(Posted 2004) [#6]
Within Galactic Source Code I have a 'Sun' Sprite which is unapproachble and needs to appear in the same area of space relative to the player's craft (therefore the camera) at all times.

To do this, I simply parented the Sun Sprite to the skybox, the skybox had code to ensure that it did not rotate with the ship.


Akira(Posted 2004) [#7]
Interesting idea, although I want to be able to approach the Sun so that method wouldn't work for me.

Is Galactic Allegiance a true 3D space environment or is it a collection of separate sectors joined together by worm holes and jump gates?


_PJ_(Posted 2004) [#8]
At present, plans are for it to be split into sectors to maintain a sense of scale. The means of travel between sectors is currently under discussion.

Each sector will effectively be planetary local space. That is, include a single planeet, its moons and man-made structures in the vicinity.


Ross C(Posted 2004) [#9]
You could have a sort of exponetial scale. until say 100 units, each unit = 10 metres. From 100 blitz units to 500, each unit = 100 metres. From 500 to 1000, blitz unit = 1000 metres...etc etc. You would need some code to constantly update positions based on there range and probably have to scale things a bit. But if it was all managed correctly. You could have a HUGE space world :)


Ion-Storm(Posted 2004) [#10]
Beware of Floating Point Problems.


Akira(Posted 2004) [#11]
Malice, sounds similar to the way X2 handles it's universe. I gave up on X2 because I didn't like the feeling that you were essentially flying from room to room. Freelancer was just as bad as everything existed pretty much on the same Y plane. Afterall, what's the point of being in Space if the Universe is essentially flat or comprised of virtual rooms?

Ross, that sounds like it would be a nightmare to manage. =8@

Thanks for the tip Ion, I will.


Gauge(Posted 2004) [#12]
Invite my ex girlfriend over and take a picture?


wizzlefish(Posted 2004) [#13]
If I were you, create a SkyBox and move it with the camera. On the skybox, create a sun, planets, etc. Since it moves with the camera, you'll never reach the end of space. And space is...well, space! So there should be a lot of empty places where nothing is.

And you might want to generate random comets, meteors, etc. to give it a little touch.

Outer space places are so much better than earth terrains. On earth, there are limits. I can't figure out how to stop my character from going of the edge!

Good luck.


Akira(Posted 2004) [#14]
Optomistic, thanks for the ideas but I want to be able to approach the planets and suns in the universe I am creating.

I am in the process of creating a system like I mentioned in my initial post, where objects are stopped before they pass out of the camera range, then they are scaled down to create the illusion of being at a greater distance than they really are.

As a test case, I have created a camera with a range of 5,500 units, and a moon (small planet) that is 1500 units in diameter. In this test, the moon gradually scales down to the point of disappearing completely at a 'virtual' distance of around 3,175,000 units away from the camera.