POV-Ray : Newsgroups : povray.general : Texture replacement : Re: Texture replacement Server Time
29 Jul 2024 12:27:05 EDT (-0400)
  Re: Texture replacement  
From: jhu
Date: 12 Jul 2011 01:15:09
Message: <web.4e1bd763a2b5a8f9f4bdd9650@news.povray.org>
David Given <dg### [at] cowlarkcom> wrote:
> Okay, here's a very noddy question:
>
> I have an object with complex textures attached to it. I wish to render
> the object with different, much simpler textures (a simple pigment, in
> fact). However, if I try to create an instance of the object with my new
> texture, I just get the error:
>
>     Parse Error: Cannot layer over a patterned texture.
>
> For various reasons I can't change the original object.
>
> Is there any way to get Povray to create a new instance of an object,
> discarding all the texture information and letting me replace it with
> new textures?
>
> --
> ┌─── dg@cowlark.com ─────
http://www.cowlark.com ─────
> │
> │ "I have a mind like a steel trap. It's rusty and full of dead mice."
> │ --- Anonymous, on rasfc

Perhaps you could use #if...#else...#end, something like this:

#declare use_simple_texture=1;

object{
  my_object
  #if (use_simple_texture=1)
    texture{simple_texture}
  #else
    texture{complex_texture}
  #end
}


Post a reply to this message

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