POV-Ray : Newsgroups : povray.general : Ingenious snow placement? Server Time
2 Aug 2024 12:23:14 EDT (-0400)
  Ingenious snow placement? (Message 11 to 12 of 12)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Tim Nikias
Subject: Re: Ingenious snow placement?
Date: 8 Dec 2004 12:00:13
Message: <41b7331d$1@news.povray.org>
> I tried many solutions and came
> up with a custom POV-Tree program which generates two blobs:
> tree model and snow which has the same geometry as a tree but
> each blob was vertically shifted.

Something like this was on my mind at first as well, but I wanted to have
some method with which I could place snow on any kind of object. I've now
started with scripting something which I actually had already scripted a few
years ago (in a rather crude fashion), but then my PC died and took the HD
with it... *sigh* That's how my Nickname, "Tim Nikias v2.0" came to be,
actually.

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


Post a reply to this message

From: Tim Nikias
Subject: Re: Ingenious snow placement?
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

<<< Previous 10 Messages Goto Initial 10 Messages

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