Skip to main content
gamedev.net
🔒 Locked

Voxel Objects!?!

Started by webmunkey Oct 7, 2001 at 12:09 PM 0 replies 250+ views
Original Post
webmunkey
webmunkey
Rendering voxel ojects in a heightfield engine. Okay, this is a problem that I have been pondering about for quite sometime, yet with litte to show for my ponderings. Here is the background situation: Right then, I have this fast ray-casting heightfield engine that renders from front to back. I scan a column, compute the rays and a scaled voxel height, and then, starting from the bottom of the screen, draw a vertical bar, then at the top of that vertical bar, I scan the next step, test for occluded surfaces, and plot a new vertical bar until either the max screen height is reached or the highest point is drawn. Due to the rendering from front-to-back nature of the engine, sticking an object in the view during the voxel rendering process causes voxels further back to occlude it which is wrong. Sticking it in afterwards causes no voxels to include it, even the ones in front of the object, which is wrong as well. So now the question arrises: how do I place an object into the rendering process so that it is properly occluded by the voxel heightfield? I know this is probably very confusing, but it is ceartinly an interesting problem. Any thoughts, suggestions, hell, even questions about heightfield engines would be greatly appreciated. Thanks... Cheers, Jesse
The sun is gone, but I have a light, The day is done, but I''m havin'' fun, I think I''m dumb... Maybe just happy... -Kurt
v71
v71
Use a sort of z-buffering , since you draw a constant ''block'' of voxel this block has the same depth for every pixel, then you store the value in this buffer, you don''t have to perform a test in this stage, when you re about to render the voxel object
before drawing the block building up the same object, perform a test and you''ll get a perfectly z-sorted environment,but this
doens''t come at no price, it involves a buffer clearing routine
and a test function but you will only need it when you draw the objects i hope its clear , sorry for my english

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.