POV-Ray : Newsgroups : povray.general : Meshes and Textures : Re: Meshes and Textures Server Time
12 Aug 2024 03:26:10 EDT (-0400)
  Re: Meshes and Textures  
From: Ken
Date: 28 Mar 1999 09:50:21
Message: <36FE4098.46BDB4DF@pacbell.net>
Rick wrote:
> 
> Yes, go, simplifiy!!, prefrable in terms the layman can understand :)
> 
> Rick

 Ok let us look at it this way. All pigment patterns in pov are 1 x 1 x 1
units in size. When you apply a pigment to a 1 x 1 x 1 scaled object that
is centred at the origin (xyz = 0) then it will be completely covered by
one repetition of the pattern (unless it is scaled). If you apply the same
pigment pattern to a 1 unit object that is say offset from the origin by
0.5 the pigment pattern will only apply to 1/2 of the object and the rest
of the object will be covered by the second repetition of the pigment
pattern.

  Think of it this way - you have a picture in your hands that is 1 x 1.
You need to paste it on to a wall that is 1 x 1. Unfortunately the picture
is stuck physically at xyz 0 but your wall is off center. Now you are going
to need a half of a second picture to cover what the first would not.

  We can get around this by translating our pigments to align with the
location of the object it's to be attached to. If the object is rotated
and not sitting at the origin and we apply the pattern without taking
this into account then when we move the object it is now covered by a
different part of the pattern. This is because they are not aligned at
origin together with respect to their rotations and transformations.

  To solve his triangle problem he needs to rotate and translate each
pigment he has applied to the individual triangles so they match in
location and the direction they are pointing. If he doesn't then when
he goes to move the object or scale it they will not act in unison and
the pattern will predictably change from one location to another. I is
a useful trick when one does not want identical looking objects but a
pain if not accounted for when you want identical objects in different
locations.

  If that is still fuzzy then I will try to provide some graphic
examples for you all later on. It should be easy with gradient
pattern to visually explain the phenomena but if you are that
curious a little experimentation on your own would probably nail
the concept home faster than what I could do for you.


-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

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