|
|
> Take a look at this:
>
> http://www.nullsoft.com/free/monkey/
>
> Anybody got any ideas what the cave-building algorithm is? (As in, I'd
> like to copy it...)
How about this?
Thought I'd have a play about at lunch and this is the best I came up with
(the black hole is a weird error due to a too low max_gradient).
I got some of the ideas form that nVidia presentation I posted, plus some
random noise. The core geometry is three "cylinders" that rotate around the
z-axis in a circle at different rates.
Here's the functions to get the xy coords of the rotating tubes:
#declare fn_P1x = function(z) { 6*cos(z/19) }
#declare fn_P1y = function(z) { 6*sin(z/19) }
#declare fn_P2x = function(z) { 6*sin(z/11.2 + 2.6) }
#declare fn_P2y = function(z) { 6*cos(z/11.2 + 2.6) }
#declare fn_P3x = function(z) { 6*sin(z/17.12 - 8) }
#declare fn_P3y = function(z) { 6*cos(z/17.12 - 8) }
And here's the main isosurface function (it's all a bit messy):
#declare fn_X = function(x,y,z)
{
6 / sqrt( pow((x)-fn_P1x(z),2) + pow((y+6)-fn_P1y(z),2) ) - 1
+4 / sqrt( pow(x-fn_P2x(z),2) + pow(y-fn_P2y(z),2) ) - 1
+7 / sqrt( pow(x-fn_P3x(z),2) + pow(y-fn_P3y(z),2) ) - 1
-1 *(noise(x/4,y/4,z/4)-.5)
}
Use a contained_by { box { <-20,-20,0>, <20,20,500> } } and view it from -z
down the z axis.
Post a reply to this message
Attachments:
Download 'rock_tunnel 2.jpg' (77 KB)
Preview of image 'rock_tunnel 2.jpg'
|
|
|
|
>> Take a look at this:
>>
>> http://www.nullsoft.com/free/monkey/
>>
>> Anybody got any ideas what the cave-building algorithm is? (As in, I'd
>> like to copy it...)
>
> How about this?
>
> Thought I'd have a play about at lunch and this is the best I came up
> with (the black hole is a weird error due to a too low max_gradient).
>
There are other tiny black holes at the back.
Can you easily get a path through the tunnels, for example to move the
camera through it? :) How long did the render take?
Post a reply to this message
|
|
|
|
scott wrote:
> How about this?
Mmmmm. Bronchia. Not shiny enough, tho.
Is this still off-topic, when you're posting POV code? :-)
--
Darren New / San Diego, CA, USA (PST)
It's not feature creep if you put it
at the end and adjust the release date.
Post a reply to this message
|
|
|
|
Wow! I just looked at this again at home, and I can see the whole
tunnel! What I viewed it at work, there was a large black hole, with a
narrow pink bit around the edges of the picture.
Jesus my monitor has an absurd gamma factor...
Post a reply to this message
|
|
|
|
>> How about this?
>>
>> Thought I'd have a play about at lunch and this is the best I came up
>> with (the black hole is a weird error due to a too low max_gradient).
>>
>
> There are other tiny black holes at the back.
Yeh, they're all max_gradient errors. I was using 1 during testing, but
even upping it to (IIRC) 5 in the final render they were still there.
> Can you easily get a path through the tunnels, for example to move the
> camera through it? :)
Yep, I would just choose one of tunnels and move the camera along the centre
line, should work assuming no huge noise part overlaps the centre of the
tunnel. A better way would be to find the maximum value of the isosurface
at each xy slice and put the camera there.
> How long did the render take?
About 20 mins, but a smaller one with less AA and lower max_gradient should
be way quicker.
Post a reply to this message
|
|