POV-Ray : Newsgroups : povray.general : Layering detail textures Server Time
18 Apr 2024 13:04:07 EDT (-0400)
  Layering detail textures (Message 11 to 12 of 12)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Thomas de Groot
Subject: Re: Layering detail textures
Date: 11 Oct 2012 03:24:15
Message: <5076741f$1@news.povray.org>
On 10-10-2012 23:45, Christian Froeschlin wrote:

> I added a feature request in the bug tracker so the issue
> doesn't get lost. It does pop up from time to time.
>
> http://bugs.povray.org/task/256
>

That is a good idea. There should indeed be provision for this kind of 
feature.

Thomas


Post a reply to this message

From: Tek
Subject: Re: Layering detail textures
Date: 12 Oct 2012 12:25:01
Message: <web.5078441f207c714e4b0aa1fd0@news.povray.org>
"Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> wrote:
>
> The reason the elements are individually textured is that, though they may use
> the same texture, the orientation of that texture is important w/r/t the
> individual object, and cannot be placed on the whole model.
>
> The problem is that I want to apply a series of overlays to the object as a
> whole, to simulate the effects of age, decals, spray-paint etc...  doing this to
> individual objects would make the csg ten times as complicated - making it
> impossible for me to construct the object procedurally, and use different
> overlays for different situations - and involve complex transformations of
> textures on the micro-level.
>

The texture transformations needn't be complex, internally POV represents them
as just a matrix. You just need to know the transformation for your object, then
you can do transform { ... inverse }.

For example if you're doing a recursive object, just keep track of the
transform:

#macro Object(ParentTransform)
   #local ObjectToParent = transform { rotate 20 scale .2 translate .1*y };
   #local ObjectToWorld = transform { ParentTransform ObjectToParent };
   object {
      TheObject

      texture { LocalTexture }
      texture { GlobalTexture transform { ObjectToWorld inverse } }

      transform { MyTransform }
   }
   // recurse
   Object(ObjectToWorld)
#end

But I agree it would be much nicer if POV could provide a more general solution
for handling layered textures (I'm always annoyed that it doesn't let you layer
over a texture_map).


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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