POV-Ray : Newsgroups : povray.general : Mapping Textures on irregular shapes : Re: Mapping Textures on irregular shapes Server Time
3 May 2024 03:42:29 EDT (-0400)
  Re: Mapping Textures on irregular shapes  
From: Josh
Date: 3 May 2020 20:00:00
Message: <web.5eaf5ad572e01857dc1270cd0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Josh" <nomail@nomail> wrote:
>
> > Beautiful! Thanks so much, that works great!
>
> Now here's a neat trick to help you puzzle out some things as well.
> Plug your function into a pigment statement, and you can plot a 2D slice in
> order to see all the isolines in that plane.
> It's also a LOT faster than repeatedly rendering the [developmental] isosurface
> until you get the equations right, and you can see a BIG area in case your
> isosurface pieces are somehow outside of the contained_by shape.
>
> #declare Map = pigment {function {YourFunction (x,y,z)}}
> #declare S2 = 10;
> #declare Square2 = union {
>  triangle {<-1, 0, -1>*S2, <-1, 0, 1>*S2, <1, 0, -1>*S2}
>  triangle {<1, 0, -1>*S2, <-1, 0, 1>*S2, <1, 0, 1>*S2 }
>  texture {Map}
> }
> object {Square2 translate -y*4}
>
> .... or just use a whole plane {}

Thanks so everyone for the advice and hints, I am well on my way now. I have a
couple of questions not directly related to the questions that started this
thread...

1) (How) can I overlay pigment textures? I am envisoning something like the
following where I overlay a bozo pigment on top of an agate pigment, with
transparency on the bozo color map... Ideally, where the bozo map is not
transparent it would replace the pigment of the agate color map, not add to
it...

pigment
{
  agate
  color_map
  {
    [0 Gold]
    [1 Brown]
  }
  bozo
  color_map
  {
    [0 Transparent]
    [1 Red]
  }
}

2) How can I change the seed for builtin functions that use random like agate,
granite, bozo, f_noise3d so that they produce different results?

3) If I have 15 asteroids defined like #declare aster1 = isosurface { ...
transform { Axis_Rotate_Trans( <1, .2, 0>, 360*clock) }}, how would I setup
povray to iterate through them and render a seperate animation for each
asteroid? I'm fine just writing an external program to iterate on them if
needed, but if it's easy I'd like to see the povray way...

Thanks so much!

Josh


Post a reply to this message

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