POV-Ray : Newsgroups : povray.general : Ingenious snow placement? : Re: Ingenious snow placement? Server Time
2 Aug 2024 14:14:40 EDT (-0400)
  Re: Ingenious snow placement?  
From: Tim Nikias
Date: 8 Dec 2004 12:11:31
Message: <41b735c3@news.povray.org>
I've started the implementation of a more "professional" approach than
"brute force".

Like I mentioned in my original post, I use the topview of an object to do a
pre-selection. I've actually written a small macro for this (quite simple,
actually), which just needs the object and it will spit out a proper topview
to work in conjunction with the following macros.

Using this topview image, I subdivide the image into quadratic cells. Each
cell is checked if it intersects the topview image, and if it does, it gets
marked. Similiar to my LSSM, I memorize the "active" edges using prime
factorization. If the edges aren't active at all, I finally check if the
center itself is in the topview part and if the entire cell is actually
active and the edges lie within the object.

Up to this part the script is ready. What I'll script next: an even
distribution of particles will be dropped into active cells. These will also
pass through several layers of objects to make sure that overlapping
structure get their attention. If edges are active, these will receive an
added, more detailed bunch of particles to make sure that at least the edges
are covered properly.

But these particles aren't meant to be the final layer. They are only
"seeds", around which I check the geometry and place additional, more
detailed particles to properly cover the entire surface. The "seeds" and/or
the final layer will be adjustable with some macros, e.g. removing particles
which lie on too steep surfaces.

And finally, I'll come up with some neato macro which will move across the
final layer and try to accumulate snow against walls etc, but that's still
just a fuzzy idea which I keep safe for later. ;-)

Any comments or suggestions from fellow scripters?

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

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