POV-Ray : Newsgroups : povray.general : material coordinate systems : Re: material coordinate systems Server Time
31 Jul 2024 14:28:33 EDT (-0400)
  Re: material coordinate systems  
From: Charles C
Date: 28 Dec 2006 03:30:01
Message: <web.45937fd96829b09ea5fa4f50@news.povray.org>
You could put your rotation & translation into a transform variable & then
apply the inverse transformation to the materials which would also be
instanced.  Note though that there've been a number of posts on here
mentioning that the (more tedious) method you mentioned will be more
efficient in terms of render speed & memory usage.

Charles




"Calvin" <ash### [at] gmailcom> wrote:
> I've hunted a bit in the docs and the newsgroups, but was rather surprised
> to not be able to find a simple solution for this problem. I figured that
> someone might know a workaround, so I thought I would ask.
>
> What I want to do is to use world coordinates in a material, without needing
> to set the material at a root level. Normally this wouldn't be a problem,
> but I have a lot of objects with different materials inside a union, of
> which there are many instances. I want the material for each instance to
> use the world coordinate system, but there does not appear to be a way to
> do that.
>
> As an example:
>
> #declare myComposite = union {
>     object {
>         complicatedObject1
>         material{material1}
>     }
>
>     object {
>         complicatedObject2
>         material{material2}
>     }
> }
>
> object { // instance 1
>     myComposite
>     translate <...>
>     rotate <...>
> }
>
> object { // instance 2
>     myComposite
>     translate <...>
>     rotate <...>
> }
>
> I want both instances to use the same coordinate system in their materials,
> but that doesn't work with the current code.
>
> The only way I know how to do this is to reorganize the groups so that I am
> creating unions based on materials, and then to assign the material at the
> top level, but for repeated objects with complicated materials, this gets
> really tedious.
>
> Does anyone know any good workarounds for this?
> Thank you!


Post a reply to this message

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