POV-Ray : Newsgroups : povray.general : How to use an object as the texture? : Re: How to use an object as the texture? Server Time
19 Apr 2024 00:48:23 EDT (-0400)
  Re: How to use an object as the texture?  
From: Bald Eagle
Date: 20 Feb 2020 16:10:00
Message: <web.5e4ef572be61ecc74eec112d0@news.povray.org>
"Kima" <nomail@nomail> wrote:

> Thanks for the links. I played with the codes to find a way, and finally ended
> up using 'wrap'. Everything seems to work perfectly, but I do not fully
> understand where the Object Pattern is fitted on the object. I should ask
> another question for this :)

In order to understand how patterns work, you need to think in terms of "how
does POV-Ray evaluate what to do with a pixel that represents <x, y, z> in 3D
space.

So when you define a object pattern, you define a 3-dimensional mask, just as if
you had a scene in it with nothing but your transparent object in a big white
empty space.  Now take out a can of spray paint and press down the nozzle.  If
the paint hits your object - right where the bounding box says it is - then it
gets painted.

So the object pattern is sort of set up as pattern (object_paint,
emptySpace_paint)

Maybe that way of thinking about it helps.

If it's still unclear, you can always show your object in the scene with a
regular pigment, maybe with some transparency or filter.  This is useful for
when things like difference {} get confusing.


Post a reply to this message

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