POV-Ray : Newsgroups : povray.general : Override textures and materials? : Re: Override textures and materials? Server Time
1 Jun 2024 20:06:19 EDT (-0400)
  Re: Override textures and materials?  
From: Kenneth
Date: 17 Jan 2016 18:05:02
Message: <web.569c1d0740a8aed333c457550@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

>
> There are some differences between explicitly specifying "texture{}",
> and not specifying any texture at all.

Hmm, I have to admit that my example code (and scheme) were a wee bit too
simplistic(!), in regards to your various scenarios, which I hadn't thought
through in any detail  :-(  I also used really simple colors, and no CSG, so I
didn't notice the 'hidden errors' in the scheme.
>

>
> There is also a third difference, which I'll leave as an exercise to the
> reader to verify experimentally, and which is of vital importance to the
> original problem:
>
> If you specify "texture{}", the default texture applied to the object
> will be subject to any subsequent transformations applied to that
> object, whereas if you specify no texture at all, a default texture
> applied to the object will remain entirely untransformed (and a texture
> inherited from a parent CSG object will only be subject to
> transformations of that parent).
>
> Thus, defining all textures as empty and using a gradient default will
> most likely not achieve the desired results, as many objects will
> probably include some transformation or the other.
>

If I'm understanding you correctly, you're right: for my scheme to work at all,
I had to arrange an object's texture and transformation in a particular order,
which I forgot to mention :-0 ....

I had to write the main scene's objects like this (with more detail than in my
original post):

sphere{0,1
       translate <1,3,5>
       texture{TEX_1]
       }

and NOT like this:

sphere{0,1
       texture{TEX_1}
       translate <1,3,5>
      }

That's a BIG difference (especially concerning the 'real' textures, which
naturally need to be locked to the transformed object.) Yet, the 2nd example
screwed up the 'location' of the 'color blend' texture for that object, so I
couldn't write it that way either.

All in all, not a very well-thought-out scheme, sorry to say...


Post a reply to this message

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