POV-Ray : Newsgroups : povray.binaries.images : 'Accidental' isosurface Server Time
1 Jun 2024 15:19:35 EDT (-0400)
  'Accidental' isosurface (Message 21 to 30 of 68)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: CShake
Subject: Re: 'Accidental' isosurface
Date: 21 Nov 2009 23:46:26
Message: <4b08c222@news.povray.org>
waggy wrote:
> CShake wrote:
>> Well, I'm seeing that the actual surface generation and rendering is
>> probably best left to people like you who seem to get good results, so I
>> figured I might as well go another direction with it.
>>
> Wow!  That's gorgeous!  I can imagine some good uses for it.
> 
> To see about making an animated fly-through, I zoomed way in by using trace() to
> place the camera on a surface a few iteration levels above the look_at point on
> the iteration ten (10) surface here rendered.  Since I picked starting and
> target points more-or-less at random, I have no idea where this surface is, and
> there is only a single light source placed at the camera location.  I also
> shrunk the contained_by (too much, it turned out) to avoid overheating the CPU
> when the sun goes nova.
> 
> Are we having too much fun yet?
> 
> ~David
> 
> 
>   Trace Time:       1 hours 45 minutes 26 seconds (6326.522 seconds)
>               using 8 thread(s) with 47526.303 CPU-seconds total
> 
> 
> ------------------------------------------------------------------------
> 

Here's another one, grayscale generated in c++ in 5 minutes or so 
(5000x5000), used as an image_pattern in povray with a color map 
applied, rendered at 2500x2500 (15 seconds), then resized down for 
upload (and to smooth a bit).
The hardest part is finding where to zoom in actually, there are a lot 
of places with nothing, then others with lots of curved lines going the 
same way.


Post a reply to this message


Attachments:
Download 'mbslice_colored3.jpg' (281 KB)

Preview of image 'mbslice_colored3.jpg'
mbslice_colored3.jpg


 

From: Tim Cook
Subject: Re: 'Accidental' isosurface
Date: 22 Nov 2009 00:18:17
Message: <4b08c999$1@news.povray.org>
I dare you to render this thing as glass.

--
Tim Cook
http://empyrean.freesitespace.net


Post a reply to this message

From: PM 2Ring
Subject: Re: 'Accidental' isosurface
Date: 22 Nov 2009 04:15:01
Message: <web.4b090044ce81d185f4c648ed0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> scott wrote:
> > I think it would be easiest (ie not take 400 years) if you made a
> > program in a faster language (eg C++) to write a df3 file, and then used
> > POV to render the df3 file as an isosurface.
>
>   Why does it have to be an isosurface? If you created a mesh out of it,
> it would probably render about a thousand times faster, in which case
> you could start adding fancy texturing, lighting and other effects
> without having to wait until the Sun dies.

Hi, Warp.

How do you turn a df3 density file into a mesh? Or do you mean convert the voxel
data into a mesh before feeding it to povray? Is there an easy way to do this? I
know how to turn a heightfield into a mesh, but not a solid 3D object like the
Mandelbulb, with its many internal holes.


Mandelbulb. (174410 bytes)
http://i2.photobucket.com/albums/y43/PM2Ring/Mandel3danim2a.gif



Post a reply to this message


Attachments:
Download 'mandelbulbg9rls90.jpg' (149 KB)

Preview of image 'mandelbulbg9rls90.jpg'
mandelbulbg9rls90.jpg


 

From: abram
Subject: Re: 'Accidental' isosurface
Date: 22 Nov 2009 11:15:01
Message: <web.4b096336ce81d1854861b0db0@news.povray.org>
"waggy" <hon### [at] handbasketorg> wrote:

> I modified the (illegal, but still renders) recursive function formulation
> posted by Warp and managed to get a straight SDL isosurface.  This is the result
> of six iterations.  The render time isn't too terribly bad if you can find a
> good combination of accuracy and max_gradient.  Due to the object's fractal
> nature, the reported maximum gradient doesn't help, though.

So is this a function that you have defined within povray for the isosurface or
are you using a df3 file?

Instead of fiddling with user-definable functions within povray I added a new
function to povray's fnintern.cpp which allowed me to render mandelbulbs with
povray.

The patch:
http://softwareprocess.es/x/x/mandelbulb/fnintern.cpp.patch

How I call it:
http://softwareprocess.es/x/x/mandelbulb/mandelbulb.pov

And a description of how I got here:
http://softwareprocess.us/index.cgi/Mandelbulb

I really think the functional approach is superior to the voxel approach since
getting 1000x1000x1000 voxels is time consuming and space consuming.

But if you did define your own function in isosurface I'd love to see it.

abram


Post a reply to this message


Attachments:
Download '1povaa.640480.png' (182 KB)

Preview of image '1povaa.640480.png'
1povaa.640480.png


 

From: CShake
Subject: Re: 'Accidental' isosurface
Date: 22 Nov 2009 11:32:22
Message: <4b096796$1@news.povray.org>
abram wrote:
> So is this a function that you have defined within povray for the isosurface or
> are you using a df3 file?
> 
> Instead of fiddling with user-definable functions within povray I added a new
> function to povray's fnintern.cpp which allowed me to render mandelbulbs with
> povray.
> 
> The patch:
> http://softwareprocess.es/x/x/mandelbulb/fnintern.cpp.patch
> 
> How I call it:
> http://softwareprocess.es/x/x/mandelbulb/mandelbulb.pov
> 
> And a description of how I got here:
> http://softwareprocess.us/index.cgi/Mandelbulb
> 
> I really think the functional approach is superior to the voxel approach since
> getting 1000x1000x1000 voxels is time consuming and space consuming.
> 
> But if you did define your own function in isosurface I'd love to see it.
> 
> abram
> 
> 
> ------------------------------------------------------------------------
> 
Very nice!

I was hoping that someone would take that approach, I looked into the 
source but didn't understand it quite well enough to make my own patch.

On that note, I wonder if it would be feasible to add some sort of 
user-defined recursive function to the fractal class (z=z^n+c for this, 
but replace that ^n part with whatever you want), much like 
julia_fractal takes the function name as a parameter. It would make POV 
into a very usable fractal generator, since the raytracing side of it is 
so well defined already, and most of the other fractal tracers are 
homebrew contraptions that are struggling to get good shading but have 
the math down.


Post a reply to this message

From: Warp
Subject: Re: 'Accidental' isosurface
Date: 22 Nov 2009 13:16:14
Message: <4b097fee$1@news.povray.org>
PM 2Ring wrote:
> How do you turn a df3 density file into a mesh?

  You don't turn a df3 density file into a mesh. You calculate a mesh
from the original fractal.

  (Granted, it's not a trivial task, requiring using something like the
marching triangles algorithm, but still beneficial in terms of rendering
speed.)


Post a reply to this message

From: clipka
Subject: Re: 'Accidental' isosurface
Date: 22 Nov 2009 13:53:32
Message: <4b0988ac$1@news.povray.org>
abram schrieb:

> Instead of fiddling with user-definable functions within povray I added a new
> function to povray's fnintern.cpp which allowed me to render mandelbulbs with
> povray.

Good stuff!

However, regarding the return value, note that the "threshold" parameter 
in the isosurface statement is a /borderline/ value; with your 
implementation, the default value will cause the isosurface to misbehave 
in situations where "insideness" needs to be tested. This can easily be 
fixed by using an isosurface threshold of e.g. -0.5, but I think it 
would be more elegant to have the function return -1 and 1, respectively.

I'd also be curious whether rendering speed might be improved by 
choosing different return values, that might give POV-Ray a hint how 
close it might be to the surface. Anyone some experience with that?


Post a reply to this message

From: waggy
Subject: Re: 'Accidental' isosurface
Date: 22 Nov 2009 14:15:00
Message: <web.4b098d69ce81d185f99d05c80@news.povray.org>
"abram" wrote:

> So is this a function that you have defined within povray for the isosurface or
> are you using a df3 file?

It's a pair of functions, one to do the iterations, and another to return a
value suitable for making an isosurface.  The plan was to add additional
functions better suited to use as a pattern, media, etc.

> Instead of fiddling with user-definable functions within povray I added a new
> function to povray's fnintern.cpp which allowed me to render mandelbulbs with
> povray.

I agree, and thanks for making the patch available.  I may take a whack at
modifying it to use  PM 2Ring's trigless algorithm.

> I really think the functional approach is superior to the voxel approach since
> getting 1000x1000x1000 voxels is time consuming and space consuming.
>
> But if you did define your own function in isosurface I'd love to see it.

OK.  I've avoided posting it since it's an illegal recursive function and can
crash 3.7.  It seems to work only when there is just one recursive function
defined, and this recursive function does not call any other user-defined
function.  There are posts to this site showing how to unroll these type of
functions using macros to make everything legal, and I may try that, as well.

However, to make a good isosurface I found it necessary to modify the return
value so it is no longer strictly a step function returning a value proportional
to just the iteration number.  It seems this is needed so the isosurface's
surface normal can be calculated correctly, and it also speeds rendering and
works with lower max_gradient and larger accuracy values.  I probably don't have
the quite the right formulation yet, but what's below works pretty well.

~David Wagner

P.S. Attached are some Easter eggs courtesy of the Basic scene template.

// Persistence of Vision Ray Tracer Scene Description File
// File: mandelbulb.inc
// Vers: 3.6.1, 3.7
// Desc: Mandelbulb Functions
// Date: 11/18/09
// Auth: David Wagner


//Making the return value a float by adding how close to the radius of
convergence REALLY helps!
//Returns 0 to mb_imax+2?  Taking off 3 seems to work best.
//This new version seems to have interior surfaces, too.

#declare mb_fn_iterator_frac = function(mb_i,mb_imax, mb_in, x,y,z,
mb_ix,mb_iy,mb_iz) {
   select(mb_i > mb_imax | pow(mb_ix,2) + pow(mb_iy,2) + pow(mb_iz,2) >4, 0,
      mb_fn_iterator_frac(mb_i+1,mb_imax, mb_in, x,y,z,

         x + pow(pow(mb_ix,2) + pow(mb_iy,2) + pow(mb_iz,2) , mb_in/2)
             * sin( atan2( sqrt(pow(mb_ix,2) + pow(mb_iy,2)), mb_iz) * mb_in)
             * cos( atan2(mb_iy,mb_ix) * mb_in),

         y + pow(pow(mb_ix,2) + pow(mb_iy,2) + pow(mb_iz,2) , mb_in/2)
             * sin( atan2( sqrt(pow(mb_ix,2) + pow(mb_iy,2)), mb_iz) * mb_in)
             * sin( atan2(mb_iy,mb_ix) * mb_in),

         z + pow(pow(mb_ix,2) + pow(mb_iy,2) + pow(mb_iz,2) , mb_in/2)
             * cos( atan2( sqrt(pow(mb_ix,2) + pow(mb_iy,2)), mb_iz) * mb_in)
         ),
      mb_i + 1/(pow(mb_ix,2) + pow(mb_iy,2) + pow(mb_iz,2) -3 )
      )//end select
   };

#declare mb_fn_iso = function(x,y,z, mb_fn_n, mb_fn_iterations) {
   ( mb_fn_iterations - mb_fn_iterator_frac(0,mb_fn_iterations-1, mb_fn_n,
x,y,z, x,y,z) -0.5 )
   / mb_fn_iterations
   };

/*
  The iteration number is negated so the inside is defined correctly.
  Taking off 0.5 here may be a mistake now that the iteration is no longer an
integer...
    but it seems to work best for isosurfaces.
*/

/*
//Use the include file as follows:

#include "mandelbulb.inc"

#local mb_n=8;           // Mandelbulb Power
#local mb_iterations=6;
#local mb_zoom=2;        // Use higher values for tighter views.

isosurface {
  function { mb_fn_iso(y, x, z, mb_n, mb_iterations) }
  threshold 0.0
  contained_by { sphere { <0,0,0>, 1.2 } } //Power 8

  //For power 8
  accuracy     pow(2,-mb_iterations  )  /32 /mb_zoom
  max_gradient pow(2, mb_iterations/2)  *32 *mb_zoom

texture{pigment{color White}}
finish{ambient 0 diffuse 0.9 phong 0.1 specular 0.0}
}
*/


Post a reply to this message


Attachments:
Download 'mb_pattern_basic_set.png' (134 KB)

Preview of image 'mb_pattern_basic_set.png'
mb_pattern_basic_set.png


 

From: waggy
Subject: Re: 'Accidental' isosurface
Date: 22 Nov 2009 16:30:02
Message: <web.4b09ac35ce81d185f99d05c80@news.povray.org>
Well, now here's an accidental isosurface at today's Astronomy Picture of the
Day.

http://antwrp.gsfc.nasa.gov/apod/ap091122.html

It kinda looks like someone hit a lower-power mandelbulb with a turbulence warp.

That inspired me to try mandelbulbs with fractional powers.  Attached is a power
2.3 mandelbulb, 20 iterations, rotated off-axis, and rendered as media.


Post a reply to this message


Attachments:
Download 'mb2-3i20_media.png' (193 KB)

Preview of image 'mb2-3i20_media.png'
mb2-3i20_media.png


 

From: clipka
Subject: Re: 'Accidental' isosurface
Date: 22 Nov 2009 22:46:09
Message: <4b0a0581$1@news.povray.org>
waggy schrieb:

> That inspired me to try mandelbulbs with fractional powers.  Attached is a power
> 2.3 mandelbulb, 20 iterations, rotated off-axis, and rendered as media.

Tried that, too, with solids. Doesn't look too pretty though, as such 
variants exhibit a distinctive discontinuity at one side. Apparently 
you'd need more than 360 degrees in a circle to give them rotational 
symmetry...


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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