POV-Ray : Newsgroups : povray.animations : How to fix texture to moving part : Re: How to fix texture to moving part Server Time
25 Apr 2024 17:11:55 EDT (-0400)
  Re: How to fix texture to moving part  
From: MichaelJF
Date: 7 Oct 2013 15:40:00
Message: <web.52530d075b3e3e64ef0c5fed0@news.povray.org>
"Janc" <jan### [at] telefonicanet> wrote:
> Hi, all!
> I have a code with a cylinder that tilt both sides like an inverted pendulum and
> it is textured with rust iron.
> The problem is that when it tilts, each picture has a diferent rust texture.
> This is the texture used in the cylinder:
> #declare Rust =
> texture {
>     pigment {
>         granite
>         color_map {
>             [0.0 rgb <0.4, 0.3, 0.18>]
>             [0.4 rgb <0.3, 0.0, 0.00>]
>             [0.5 rgb <0.3, 0.2, 0.04>]
>             [0.6 rgb <0.1, 0.1, 0.14>]
>             [1.0 rgb <0.4, 0.3, 0.14>]
>         }
>     }
>     finish { ambient 0.1 diffuse 0.3 }
> }
> cylinder{
>     <0, 0, 0>, <0, 50, 0>, 1
>     texture{Rust scale 10 finish{roughness 100 ambient 0.2 }
>     rotate Ang*z // Ang = tilting degree
> }
> Question: Is there any code so the cylinder has the same texture in all frames?
>
> Thanks in advanced for your help.

You have a missing bracket "}" to close the texture before the rotate I think.
So the texture is rotated and not the cylinder what seems to be your intent.

Best regards,
Michael


Post a reply to this message

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