POV-Ray : Newsgroups : povray.advanced-users : Bizzare space mapping problem : Re: Bizzare space mapping problem Server Time
27 Sep 2024 01:18:42 EDT (-0400)
  Re: Bizzare space mapping problem  
From: Alain
Date: 11 Sep 2007 07:43:44
Message: <46e67f70@news.povray.org>
scott nous apporta ses lumieres en ce 2007/09/11 06:40:
>> I'm attempting to solve a problem so fiddly that it's really quite 
>> hard to explain what I'm even trying to *do*!
>>
>> Basically, I want to make a 2D pattern with seemless repeats out of a 
>> normal POV-Ray 3D pattern. However, I can't seem to find a way to take 
>> a flat 2D grid and bend it into some kind of 3D form in such a way 
>> that the pattern has a uniform frequency everywhere.
> 
> A good trick I know from realtime 3D graphics is as follows:
> 
> Define 3 patterns for the X Y and Z planes.  At each point on the 
> surface you are rendering, take a weighted average of the 3 patterns 
> based on the magnitude of the normal vector in that direction.  So if 
> your surface normal is <1,0,0> or <-1,0,0> you would take 100% from 
> pattern X, and none from the others.  etc
> 
> This way you get a nice smooth blending that covers the entire shape 
> nicely and you don't get any areas where the pattern looks horribly 
> stretched.
> 
> It works very well for organic shaped things (eg rocks, animals) with 
> organic-type textures (wood/grass/granite).
> 
> Not sure how you would implement this in POV, but given the flexibility 
> of POV I'm sure someone could implement it (I think you need megaPOV to 
> use the normal data in a pattern).
> 
> 
There is the slope pattern that can take any arbitrary refference vector. That 
combined with the average pattern could be used to do something similar.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you are compulsive, neurotic, 
anti-social, paranoid and manic-depressive but basically happy.
Quietly Watching


Post a reply to this message

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