POV-Ray : Newsgroups : povray.general : Mapping Textures on irregular shapes : Re: Mapping Textures on irregular shapes Server Time
17 May 2024 17:52:30 EDT (-0400)
  Re: Mapping Textures on irregular shapes  
From: Josh
Date: 1 May 2020 12:55:01
Message: <web.5eac540972e01857dc1270cd0@news.povray.org>
Alain Martel <kua### [at] videotronca> wrote:
> Le 2020-04-30 à 20:10, Josh a écrit :
> > "Josh" <nomail@nomail> wrote:
> >> I've found a way to create and use a df3 file as an isosurface. Works well. I'm
> >> trying now to add noise to it and it makes the shape disappear. Any ideas? The
> >> shape shows up fine without the +f_noise3d(x,y,z)*2 statement... Does anyone
> >> know what is happening?
> >>
> >> #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 }
> >>      }
> >> }
> >>
> >> Josh
> >
> > Just to clarify, I've tried adding f_noise3d, subtracting it, nothing seems to
> > allow me to perturb the surface of my df3 shape like I can if my function is
> > just a simple sphere...
> >
> > Josh
> >
> >
>
> Play with the coordinates passed to the function and see what happen.
>
> A starting point :
> function { Fnct01(x+sin(y*2+z*3),y-cos(x*7),z+cos(y*5)) }

That produced interesting results. It split the shape up and duplicated it a
bunch of times. I'll have to think about it.

In the meantime, does anyone know what the isosurface function would be for a
rounded box?

Thanks!

Josh


Post a reply to this message

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