A.D.A. Amiga Demoscene Archive

        Welcome guest!

  

  

  

log in with SceneID

  

Demos Amiga Demoscene Archive Forum / Coding / Voxel ball / tunnel / torus, how ?

 

Author Message
uzo
Member
#1 - Posted: 23 Jun 2010 17:51
Reply Quote
Hi,

I've been trying to get my head around voxelballs / tunnels etc. Greatly inspired by luminagia. At first I just thought it was some polar distortion on a voxelheightmap / landscape, but given a sphere, the angle of the viewer towards the surface also changes.

Also, Psylteflesk shows some voxel heightmap effects which are essentially inside a sphere.

I imagine this is all still just simple heightmap raycasting, but just can't get my head around this one. Any help would be greatly appreciated!
rload
Member
#2 - Posted: 24 Jun 2010 00:10
Reply Quote
Just because I wondered how to do this for a long time, I'll just tell you right away.

Make a normal voxel landscape except cast the rays in a full circle (360 degrees) rather than in a fan like you would with a landscape (like 60 degrees or so). Map this on a tunnel.
uzo
Member
#3 - Posted: 24 Jun 2010 15:14
Reply Quote
Ok, thanks for your tip. Still this leaves me confused as to both Luminagia and Psylteflesk. Here the perspective angle certainly isn't a forward 4dof raycaster. The perspective is seemingly 6dof, or at least adjusted for the rendered surface. I have a double twisty up and running, so do get that concept, but I can't fully grasp what's behind a ball, or even as in the case of Psylteflesk, the inside of a sphere.

Any conceptual explanation would be greatly appreciated.
rload
Member
#4 - Posted: 24 Jun 2010 17:05
Reply Quote
Hmm.. maybe this can explain...

http://farm4.static.flickr.com/3554/3787456899_d1e 94b0dc0_o.jpg

The base image is a 360 degree panorama shot as can be made with photo software and a collection of images shot from a single point. Then this panorama is shown in a polar coordinate system.

Psylteflesk simply generates the panorama using a 360 degree field of view voxel instead of using a photo of a landscape. The landscape is similar to the one in "Anyone of these suckers". I'm not sure what you mean by "inside of a sphere" though.
uzo
Member
#5 - Posted: 24 Jun 2010 18:28
Reply Quote
Thanks again rload. I do understand the 360 to polar technique (I think the 360 can be directly rendered as a polar). But that doesn't explain these screenshots http://ada.untergrund.net/?p=demo&i=662 of psylteflesk ? What I mean is, they point inwards, as if we are in a sphere ?
rload
Member
#6 - Posted: 24 Jun 2010 23:21 - Edited
Reply Quote
when calculating the panorama which looks like a ball when shown on a polar look up table, the height of each bar is multiplied by sin(angle) to make it appear round.

h = sin( pi*iteration_along_ray/num_total_iterations ) * heightmap[ray.x, ray.y]

When it appears to be inside a sphere, the sin is substituted with a linear (ish) function IIRC.

h = some_other_linearish_function( iteration_along_ray/num_total_iterations ) * heightmap[ray.x, ray.y]

This results in the birds eye view of the scene instead of the sphere like view.

So shaping the function, shapes the output shown on the polar lookup table. The message is to just apply some trial and error until it looks like it is inside a sphere instead (it is just a birds eye view though, the bars never point inwards really) .
uzo
Member
#7 - Posted: 28 Jun 2010 19:22
Reply Quote
Hi rload, just wanted to thank you for the info. It clarified a lot for me and am experimenting as we speak.

 

  Please log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0