POV-Ray : Newsgroups : povray.newusers : Texture declarations and object grouping : Re: Texture declarations and object grouping Server Time
5 Sep 2024 10:31:50 EDT (-0400)
  Re: Texture declarations and object grouping  
From: Margus Ramst
Date: 5 Feb 2001 13:11:45
Message: <3A7EED78.3AF1188A@peak.edu.ee>
The Cegorach wrote:
> 
> Is there any advantage to grouping all of the columns around a
> particular building in one declared group, and defining their texture
> at that group level, as opposed to leaving the texture declaration
> within the declaration of "Column?"
> 

As Tom said, there might be some advantage in parse time (and memory usage).
However, bear in mind that the two methods usually do not yield identical
results.
If you declare the object with a texture and then create multiple copies of this
object, the texture of each copy is transformed (moved, rotated, scaled) along
with the copy itself.
If you first create the copies and then apply the texture to the whole group,
the texture location remains the same for all copies.

In other words, the first scenario is equivalent to:

object{
  MyObject
  texture{MyTexture}
  transform{MyTransform}
}

The second scenario is equivalent to:

object{
  MyObject
  transform{MyTransform}
  texture{MyTexture}
}

With most organic textures, like stones etc, it probably won't matter. But if
you need precise control over the placement of the texture relative to the
object (such as with an image_map), it makes sense to texture first and
transform later.

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg
Home page http://www.hot.ee/margusrt


Post a reply to this message

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