• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
BlackJoker

Rendering huge (space) distance technique

10 posts in this topic

Hi, I know that this topic was discussed not one time, but after reading all of them I could found, I still have questions.

 

I try to make for now simple space simulator, but I faced with some issues regarding projection matrix:

 

1. - If I set very big zFar value, I will see model even if it is huge, but in that case I will have problem with picking, because it is not working if zFar is more than 16777216

 

2. - I can set ZFar separately in shader as I use logarithmic z-buffer, but it will still have picking issues because it just return true/false randomly.

 

3. If I set zFar to 16777216, It will definately decrease my view distance even if I scale my models down.

 

Taking into view all this issues, I want to know the best technique to rendering huge objects and to keep picking algorithm work correct.

 

I read about multi-layer rendering with multiples depth buffers, but I didnt find any example and I don`t know the concept in general.

 

Could anyone point me on the right way?

0

Share this post


Link to post
Share on other sites

 

Skybox is good for very-very far objects like stars and nebulas, but not for rendering huge objects like planets and so on, which is near camera. 

 

How it is implemented in space engine, for example. You see whole planet as huge as it is and as I understand it is not rendered as sprite or something like that.

Edited by BlackJoker
0

Share this post


Link to post
Share on other sites


How it is implemented in space engine, for example. You see whole planet as huge as it is and as I understand it is not rendered as sprite or something like that.

Just scale down the planet?

0

Share this post


Link to post
Share on other sites


Just scale down the planet?

 

And always change planet position during flight? Super. And what about when I will on planet? Scale part of the planet and move it too? 

 

 

 

I asked about multi depth buffer rendering. Do you know something about this?

0

Share this post


Link to post
Share on other sites

Hi BlackJoker

 

Scaling is a valid option. I have rendered planets and stars like this from very far away to ground level. You only need to start scaling and translating the planets when you are quite a way from the ground - so when you are standing on the planet it is OK. As you move away at some point you can reduce the planets scale and translate it closer to the viewer so that it looks the same.

 

I used this article to help me solve it: http://www.gamasutra.com/view/feature/131393/a_realtime_procedural_universe_.php?print=1

0

Share this post


Link to post
Share on other sites

Hi BlackJoker

 

Scaling is a valid option. I have rendered planets and stars like this from very far away to ground level. You only need to start scaling and translating the planets when you are quite a way from the ground - so when you are standing on the planet it is OK. As you move away at some point you can reduce the planets scale and translate it closer to the viewer so that it looks the same.

 

I used this article to help me solve it: http://www.gamasutra.com/view/feature/131393/a_realtime_procedural_universe_.php?print=1

 

 

It will work if you have no physics engine, but what if I want to calculate detail gravity interaction? Or what if want to make MMO? You suggest to move shared for all objects individually for each player???

 

I don`t want to do a mess from my world moving all objects around like in dance.

 

I take into view your suggestion but I also want to know about other variants, which, I beleive, present.

0

Share this post


Link to post
Share on other sites

You can't have an universal general solution for this - no rendering engine is able to render simply astronomic distances, no physics engine is able to calculate physics of a galaxy, not a star system, not even a whole planet.

 

So, you'll need to split the problem in to some manageable such as:

 

- render scene several times, once for objects near the observer (maybe 0 - 5 km). Most of small ships could be drawn in this scale

- 5km to some very big number, heavy use of culling of small objects. Most of small ships won't be visible, only huge capital ships, asteroids etc

- "sky" box for the rest

 

The problem isn't just the only z-buffer. You'll notice that floating point accuracy isn't much when going to open space. I'm saying that you can't except a camera to work correctly with just 3 floats for position, even doubles won't cut it. You'll need to use some kind of a grid structure in order to keep the camera in some manageable range from origo. 

 

Cheers!

2

Share this post


Link to post
Share on other sites


- render scene several times, once for objects near the observer (maybe 0 - 5 km). Most of small ships could be drawn in this scale
- 5km to some very big number, heavy use of culling of small objects. Most of small ships won't be visible, only huge capital ships, asteroids etc
- "sky" box for the rest

 

Exactly about rendering a few times for different distances I want to know more. So, do you have some examples or links to articles about that?

0

Share this post


Link to post
Share on other sites

Good luck - if you find something be sure to share it, I would like to know about this too!

 

Regarding the scaling option: This is no problem for the physics engine or the network code as you only scale and translate for rendering. 

 

You can have an additional matrix which combines the two operations passed into the shader. It should not effect the actual objects position as far as the physics engine or network code are concerned as they can operate on the object "as is".

 

Its just a trick to move the Z-values back into an acceptable range for the Z-Buffer. It may also require some Z-sorting to when planets obscure each other.

1

Share this post


Link to post
Share on other sites

Practically you'll just split your visible scene in slices and perform rendering for each slice. After that it is just a question to put those rendered slices together. Of course, you can and probably must use some scale tricks also with the further slices in order to keep the depth buffer happy. 

 

Cheers!

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0