POV-Ray : Newsgroups : povray.off-topic : Guess the algorithm Server Time
11 Oct 2024 09:19:30 EDT (-0400)
  Guess the algorithm (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Ross
Subject: Re: Guess the algorithm
Date: 19 Nov 2007 11:51:32
Message: <4741bf14$1@news.povray.org>
"Invisible" <voi### [at] devnull> wrote in message
news:47416e37$1@news.povray.org...
> scott wrote:
>
> > My immediate thought was that you take the nVidia "Cascades" demo and
> > invert it so you are inside the geometry, not outside it...
>
> Yeah, that demo sounds quite interesting. Pitty my graphics card is
> insufficiently expensive to run it...
>

2007 Happily awaits your arrival ;)


Post a reply to this message

From: Alain
Subject: Re: Guess the algorithm
Date: 19 Nov 2007 12:00:23
Message: <4741c127$1@news.povray.org>
Orchid XP v7 nous apporta ses lumieres en ce 2007/11/18 14:14:
> Alain wrote:
> 
>> It's looks like it's based on tubes. You travel a tube and it 
>> encounters other tubes at various angles. Any triangle that is inside 
>> any tube is removed. All edges are smoothed, a little like for a blob.
> 
> Yeah, but it looks a little more complex than that. There are large 
> chambers that don't appear to be "tube-like", and there are passages 
> that aren't quite circular, and so on. (Maybe the tube diammeter varies 
> or something?)
> 
> Well anyway, it looks like it could be *awesom* with true 
> light-sourcing, global illumination, and maybe some volumetric light 
> scattering. ;-)
Most large chambers are the intersection of several conduits. When over 5 
twisting tubes intersect, you loose the apearance of tubes. On ocasions, I saw 
some bits of "floating" objects in those large chambers.
Some passages are actualy made of 2 or more almost parallel tubes, and some of 
those may be flattened.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you've tried rendering hair with 
each strand as an object.
Quietly Watching


Post a reply to this message

From: Orchid XP v7
Subject: Re: Guess the algorithm
Date: 19 Nov 2007 13:14:02
Message: <4741d26a@news.povray.org>
>> Yeah, that demo sounds quite interesting. Pitty my graphics card is
>> insufficiently expensive to run it...
> 
> 2007 Happily awaits your arrival ;)

And what's that meant to mean?


Post a reply to this message

From: Orchid XP v7
Subject: Re: Guess the algorithm
Date: 19 Nov 2007 13:16:58
Message: <4741d31a$1@news.povray.org>
Alain wrote:

> Most large chambers are the intersection of several conduits. When over 
> 5 twisting tubes intersect, you loose the apearance of tubes. On 
> ocasions, I saw some bits of "floating" objects in those large chambers.
> Some passages are actualy made of 2 or more almost parallel tubes, and 
> some of those may be flattened.

Mmm, seems plausible. You'd have to have some fairly high-order 
smoothing to blur out the details though. Also, are the tunnels entirely 
random? Do they all run more or less parallel with perturbed paths? Are 
the statistics random or carefully tuned?

Time to experiement, I think... ;-)


Post a reply to this message

From: Alain
Subject: Re: Guess the algorithm
Date: 19 Nov 2007 22:16:22
Message: <47425186$1@news.povray.org>
Orchid XP v7 nous apporta ses lumieres en ce 2007/11/19 13:17:
> Alain wrote:
> 
>> Most large chambers are the intersection of several conduits. When 
>> over 5 twisting tubes intersect, you loose the apearance of tubes. On 
>> ocasions, I saw some bits of "floating" objects in those large chambers.
>> Some passages are actualy made of 2 or more almost parallel tubes, and 
>> some of those may be flattened.
> 
> Mmm, seems plausible. You'd have to have some fairly high-order 
> smoothing to blur out the details though. Also, are the tunnels entirely 
> random? Do they all run more or less parallel with perturbed paths? Are 
> the statistics random or carefully tuned?
> 
> Time to experiement, I think... ;-)
There are tunels that seems perpendicular to the one you travel, but most 
intersect at a sharp angle.
Possibility: generate the main tunel.
Randomly generate a cluster of points around it's path, in a radius about twice 
the radius.
For each point, select a random direction and curvature. Possibly add some 
radius variance.

At times, you bet filled whireframe, and the mesh resolution is fairly low at 
"high" quality. If you deselect "Disable hair effect", you get small sticks at 
the triangles angles that seems to corespond to the normals.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you've gained twenty pounds 
sitting at the computer, but can't tell because your beard covers your stomach.
Taps a.k.a. Tapio Vocadlo


Post a reply to this message

From: scott
Subject: Re: Guess the algorithm
Date: 21 Nov 2007 09:01:12
Message: <47443a28@news.povray.org>
> 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'
rock_tunnel 2.jpg


 

From: Nicolas Alvarez
Subject: Re: Guess the algorithm
Date: 21 Nov 2007 10:35:29
Message: <47445041$1@news.povray.org>

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

From: Darren New
Subject: Re: Guess the algorithm
Date: 21 Nov 2007 11:44:46
Message: <4744607e@news.povray.org>
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

From: Orchid XP v7
Subject: Re: Guess the algorithm
Date: 21 Nov 2007 13:15:46
Message: <474475d2$1@news.povray.org>
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

From: scott
Subject: Re: Guess the algorithm
Date: 22 Nov 2007 02:50:19
Message: <474534bb@news.povray.org>
>> 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

<<< Previous 5 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.