POV-Ray : Newsgroups : povray.general : How to use an object as the texture? : How to use an object as the texture? Server Time
18 Apr 2024 09:51:29 EDT (-0400)
  How to use an object as the texture?  
From: Kima
Date: 19 Feb 2020 20:40:00
Message: <web.5e4de2dc99ee2d4fecc0fada0@news.povray.org>
I started with

#declare t1 = object {
    torus{ 0.5,0.15 scale <1,1,1>
       texture{ pigment{ color rgb<0,1,0>}
                finish { phong 1}
              }
       rotate<90,0,0>
     }
}

lathe{
  cubic_spline 8,
     < 0.00, 0.00>,
     < 0.60, 0.00>,
     < 0.72, 0.44>,
     < 0.31, 0.93>,
     < 0.49, 1.26>,
     < 0.48, 1.35>,
     < 0.43, 1.56>,
     < 0.16, 1.60>
  texture{
    pigment{ color rgb<1,0,0> }
    finish { phong 1}
  }
}

I planned to use the t1 object as a pigment to create a texture_map made of t1
as a pigment + the lathe texture.

However, I was stopped at the first step when I tried to use t1 object as a
pigment:

lathe{
  cubic_spline 8,
     < 0.00, 0.00>,
     < 0.60, 0.00>,
     < 0.72, 0.44>,
     < 0.31, 0.93>,
     < 0.49, 1.26>,
     < 0.48, 1.35>,
     < 0.43, 1.56>,
     < 0.16, 1.60>
  texture{
    pigment{ object { t1 } }
  }
}

The lathe appeared as blue with no sign of t1 object on it. Where does the blue
color come from?

In general, how can I put an object with curvature (here, torus) as the texture
on an object with curvature (here, lathe)?


Post a reply to this message

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