POV-Ray : Newsgroups : povray.general : Mapping Textures on irregular shapes : Re: Mapping Textures on irregular shapes Server Time
17 May 2024 16:30:49 EDT (-0400)
  Re: Mapping Textures on irregular shapes  
From: Bald Eagle
Date: 30 Apr 2020 20:50:01
Message: <web.5eab717d72e01857fb0b41570@news.povray.org>
"Josh" <nomail@nomail> wrote:

> > #include "functions.inc"
> > #declare Fnct00 = function {
> >     pattern { density_file df3 "aster1.df3" interpolate 0
> >     }
> > }
> > #declare Fnct01 = function (x,y,z) {
> >     0.025-Fnct00(x,y,z)
> > }
> > #declare BaryteGreen = srgb <0.6157,0.7686,0.3725>;
> > #declare Iso00 = isosurface {
> >     function { Fnct01(x,y,z) + f_noise3d(x,y,z)*2}
> >     contained_by { box { -5,5 } }
> >     threshold 0
> >     accuracy 0.0005
> >     max_gradient 6
> >     all_intersections
> >     texture {
> >       pigment { color BaryteGreen }
> >       finish { ambient <0.03,0.02,0.0> diffuse 0.8,0.4 phong 0.7 }
> >     }
> > }

You're in the realm of "very tricky" - and I get lost there all the time.   ;)

My best suggestion is to apply the shotgun approach and try to diagnose the
problem in a number of ways.

You should be able to decrease the accuracy in the simple df3 scene until it's
still ok but not abhorrent - that will speed things up.
Maybe employ the evaluate equations in the isosurface docs and see if that helps
any too.

Make sure your camera is far enough away so you're not "in" the isosurface, use
a simple color, and a sky_sphere to make sure you're lighting the whole object.

Then you can try keywords like open and inverse
make the box bigger (slow)
use a wider thinner box - take only a slice, and see what shows up
change the threshold
use function { Fnct01(x,y,z) + f_noise3d(x,y,z)*2 - 0.01}

write a pseudo-isosurface code block to cycle through X, Y, and Z and have the
function evaluate those, and plot tiny spheres if the function evaluates to +/-
some small value close to 0 pick a good step value for your loops so it doesn't
take FOREVER
--------->  X, Y, and Z - NOT x, y, and z
graph a strip of Fnct01(X, 0, 0) in the same way.
try graphing Y and Z as well

See if any of that works.   That's usuallly everything I go through.

and bookmark:   http://www.econym.demon.co.uk/isotut/index.htm
You'll use it a LOT


Post a reply to this message

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