• 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
ChristOwnsMe

Sparse Voxel Octree Max Depth?

6 posts in this topic

I have been reading about sparse voxel octrees, and I was interesting in using one to render a large surface, where each point in space is 1 meter. If I wanted to render a surface that was, lets say, 100 miles across, I would have to have to have an octree that could represent 160934 units across(which would be 18 levels deep in the octree If I am not mistaken). Is this feasible? I would be procedurally generating the data in the octree as it was needed(as the camera gets closer to the surface). Thank you for any input or guidance.

0

Share this post


Link to post
Share on other sites

You don't need to make the tree deep enough to cover all data with a single root node. A regular grid of root nodes is just as feasable. In my case I wanted to represent a standard landscape so the area to be covered is much wider than high. I hit the 4GB mark at 20480 x 20480 x 4096, using a regular grid of 5x5x1 nodes, each being 12 levels deep. I *think* I can make that about 10 times larger with some optimizations I have in mind, but I currently don't have the time to study this topic any further.

 

Still 160000² sounds way outside of what current technology could handle, but maybe your procedural technique can make it feasable. Mine used 40 minutes just to generate a landscape at 20480².

0

Share this post


Link to post
Share on other sites

Its feasible, but you might want to consider a few things:

-Since you want a flat-ish object, using an octree isnt probably the best choice. Consider using a quadtree or multiple octrees. (An octree does work though, and is likely simpler than some hybrid solution in case you want to be able to have a floating island 10 km in the air)

 

-You should consider not making the leaf nodes so small. If possible, have the leaf nodes be regular grids of tiles/voxels. This is because if the size of the node related data is large compared to the actual tile/voxel data, being able to not store a single tile wont be very useful because there will be a lot more data because of the nodes. (For example if you have 1 byte tiles/voxels, and the node is 64 bytes, it doesnt make sense to make each leaf node contain 1 tile if you can instead have them contain a 16*16 grid of tiles)

Especially since your tree will likely just represent a big sphere/circle, the savings from having little tiles/leaf are small in terms of memory usage.

1

Share this post


Link to post
Share on other sites

Just make that your octree is actually a bi-tree or a BVH and the anisotroy issue is gone.

however, 160k*160k = 25 billion. so it wont enter memory. you'll have to stream data from disk and you can never see your entire world at once at full resolution.

its the same problem as the visualization of points data taken from 3D laser scanners. (30GB of points is common) there are MANY research papers on the subject. sometime people uses levels of details for when the distance of vision has to become very deep so most of the finer data can be ignored and left on disk.

the partitionning structure itself should not go down to 1 cell = 1 voxel, Like waterlimon said, what good can it brings ? if the leafs contains 100 to 1000 voxels its already a nice balance. Also you could imagine that the leaves contains even more, like say 10000 and then within a leaf, you use a grid that can be streamed in and out memory at will....

anyway how will you render all that ? a graphic card can handle around these numbers:

- 10000 draw calls per frame (single objects), or

- 1 million hardware instances, or

- 20 millions polygons in one object. (surely much more with 680 series using tesselation, I imagine around 90 million would still be real time)

- a 1 millions point primitives buffer

I suggest you take some look at the researchs that were covered about visualization of heavy point data, it looks like your problem, and partitioning structures are largely discussed in these papers.

0

Share this post


Link to post
Share on other sites

Thanks for the responses everyone. My goal is to make a planet eventually, so I thought octrees would work out the best, so one could go inside the planet as well. from a  distance, only very large voxels would be generated for the upper levels of the octree, but then as you got to the surface, you would eventually display 1 meter cubes. So what I am trying to say is I do NOT need to generate all of it at once. I thought I might be able to procedurally produce the detail ONLY when more detail is needed for a given depth in a given node of an octree.

 

 

Waterlimon

Thanks for that. This makes perfect sense. So each node in the octree could be a 16x16x16 grid of voxels, correct?

 

 

Lightness1024

For rendering, I was thinking of raycasting on the GPU into a sparse voxel octree. If I was at the surface, lets say, I would only be rendering as many cubes as you might see in a minecraft scene. And if I looked 100 miles to the east, I might see a mountain range rendered with very large cubes(as it is very far away). This is what I am going for.

Edited by ShadowMan777
0

Share this post


Link to post
Share on other sites
Yeah, something like that. Whatever gives the best performance and least visual artifacts.

You might want to implement it using plain old polygons though, raycasting is quite expensive and itll take a lot of work to get it all working properly.

Perhaps aim for geometrical detail where each surface is maybe a few pixels, with a tiny texture (virtual texturing of some sort?)
0

Share this post


Link to post
Share on other sites

I see. I feel like I need a GPU accelerated way to render the data at some octree level, so I was just playing around with good ways to do that. I don't need to render billions of cubes at one time. Just enough to make a surface scene look something like minecraft. And even approaching the surface will be rendering lower level detail blocks in all leaves until one is within 50 meters of the surface or so and a full detail 1 meter resolution has to be displayed. Thanks for all the advice. I shall research more.

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