POV-Ray : Newsgroups : povray.general : Distributing patch objects : Distributing patch objects Server Time
31 Jul 2024 12:21:40 EDT (-0400)
  Distributing patch objects  
From: Ben Chambers
Date: 14 Feb 2007 01:17:25
Message: <45d2a975$1@news.povray.org>
I currently have a grass object defined as a mesh which I tile 
repeatedly over an area.  The placement of the object is random within 
this area, meaning some areas are more densely covered than others (a 
very nice effect, I think).  However, the problem comes at the edge of 
the area I want covered.

I have a box {MIN, MAX} that I place the grass mesh in multiple times. 
Originally, I adjusted the boundaries of the area I used so that no 
grass would be outside of this box.  This was quite fast, as my scene 
would render in less than a minute (it took about 3 minutes to parse, 
but there's a lot of other stuff going on as well).  Unfortunately, it 
meant that portions along the side were very likely to not have any 
grass at all.

My next attempt was to have a more generous area to place the grass in, 
letting portions of the mesh fall outside of my bounding area.  I then 
ran a check at parse time to see if the mesh did indeed cross over the 
boundary; if it did, then it would be clipped to the boundary area.  If 
it fell inside the boundary completely, no clipping would occur.

This was much more satisfactory, and had exactly the effect I wanted, 
but took more than 45 minutes to render (compared to less than 1, 
before).  I was surprised that clipping caused such a problem.

I have not yet reduced the problem to a simpler scene, but has anyone 
else encountered a problem similar to this?

...Chambers

PS I should note that I am using the current 3.7 beta; I'll try to make 
the attempt with 3.6 later and see what effect that has on things.


Post a reply to this message

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