Jump to content

  • Log In with Google      Sign In   
  • Create Account


How do I make a voxel renderer?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 infectedbrain   Members   -  Reputation: 157

Like
0Likes
Like

Posted 11 June 2012 - 12:54 PM

What do i need to know, or what tools do i need, to program a voxel renderer. Do i need openGl or something different?

I want to make one for a school project. I just need to render a sphere in a voxel renderer but i have no idea where to begin.

Thanks in advance,
Dartos

Sponsor:

#2 Waterlimon   Crossbones+   -  Reputation: 2362

Like
0Likes
Like

Posted 11 June 2012 - 01:30 PM

You probably want to make a mesh out of the voxel grid, which requires openGL, directX or some higher level library/engine. You can also find libraries to create the mesh for you out of voxels.

It works so that it finds all voxels exposed to air (or other transparent block types), and adds the visible surfaces to the mesh using triangles. It might also use a smoothing algorithm of some sort so that the triangles it adds depend on the neighboring nodes (marching cubes).

Waterlimon (imagine this is handwritten please)


#3 Narf the Mouse   Members   -  Reputation: 318

Like
0Likes
Like

Posted 11 June 2012 - 07:40 PM

I made a voxel sphere once using a dynamic Octree versus the surface of a BoundingSphere.

Only had one view - From the front - But I could probably do better if I did it today.

Also, got about 2 SPF. DirectX 11 wasn't out and it was running on the CPU - And I wanted each box to be no bigger than a pixel.

Was quite spherical, though.

#4 Alpha_ProgDes   Crossbones+   -  Reputation: 4680

Like
0Likes
Like

Posted 11 June 2012 - 09:10 PM

So I'm torn because when posters such as yourself ask a question like this in this way, I think to myself "what he's trying to do is waaaaaaaaaaay past his skill level. He should start with something smaller/easier." However, I don't want to push you away from experimenting and learning new things.

So I'll ask this, what research have you done on voxels and voxel renderers?
Beginner in Game Development? Read here.
 
Super Mario Bros clone tutorial written in XNA 4.0 [MonoGame, ANX, and MonoXNA] by Scott Haley
 
If you have found any of the posts helpful, please show your appreciation by clicking the up arrow on those posts Posted Image
 
Spoiler

#5 infectedbrain   Members   -  Reputation: 157

Like
1Likes
Like

Posted 01 July 2012 - 09:17 PM

So I'm torn because when posters such as yourself ask a question like this in this way, I think to myself "what he's trying to do is waaaaaaaaaaay past his skill level. He should start with something smaller/easier." However, I don't want to push you away from experimenting and learning new things.

So I'll ask this, what research have you done on voxels and voxel renderers?


I know what a voxel renderer is and how it compares to a traditional polygon renderer. There is nothing wrong with asking an advance question. If I find it too hard to do I will simply not do it until I can. There is no reason to say "I'm not going to help you because I think you don't know enough." So please don't post things like that again. Its kinda hurtful.

#6 rdragon1   Crossbones+   -  Reputation: 1173

Like
0Likes
Like

Posted 01 July 2012 - 09:20 PM

I know what a voxel renderer is and how it compares to a traditional polygon renderer.


In that case, turn your voxels into polygons, then you can render them like you always have.

Marching cubes is the go-to first solution for that kinda thing.

#7 Krohm   Crossbones+   -  Reputation: 2961

Like
-1Likes
Like

Posted 02 July 2012 - 12:56 AM

Perhaps it's just me but I suggest to Don't start yet another voxel project.
Voxels have been around for ages. They never bought me in as a start and no matter how hard I look, I still don't see much reasons to use them. Not to render at least. For storage, for point clouds we could discuss but for rendering... I'll just pass.

Do i need openGl or something different?
...
I know what a voxel renderer is and how it compares to a traditional polygon renderer.

You need something to draw pixels to screen. But if you're asking this, you're probably just better starting from 101. The "kinda hurtful" things some users myself included post above is called "realistic outcome": we are warning you might just trash a couple of months of your life for some hard-to-quantify benefit.

#8 Martin Perry   Members   -  Reputation: 1054

Like
0Likes
Like

Posted 03 July 2012 - 11:07 AM

Simple voxel renderer is easy. Just use ray-casting and iterate over volume. Simple pixel shader is just enough. You can found bunch of examples via. google.

Second choice is to transfer volume into polygonal model. Here I recomend to start with Marching Cubes. Polygonal model is than rendered as classic geometry.

Bigger problem I have with voxels is not enough "real-world" models. Its fine for output from some mathematical simulation or CT/MRI etc... But found real models like house, car etc. is almost impossible.

#9 larspensjo   Members   -  Reputation: 1526

Like
1Likes
Like

Posted 05 July 2012 - 11:57 AM

If I understand the idea behind "Marching Cubes", it is not good enough. It will create nice surfaces between voxels, but what texture would you use when the surfaces span between two different material types?

Also, some voxels should stay blocky, like bricks, while some can be allowed to be smoothed. I would recommend to first generate a mesh from the visible surfaces, and then start experimenting with smoothing algorithms.

I wish you good luck, and I know you will learn a lot. It is quite fun.
Current project: Ephenation.
Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS