POV-Ray : Newsgroups : povray.general : Ingenious snow placement? Server Time
2 Aug 2024 12:15:58 EDT (-0400)
  Ingenious snow placement? (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: ABX
Subject: Re: Ingenious snow placement?
Date: 7 Dec 2004 15:16:13
Message: <6q3cr01uapbu32tg7tggfa5nic4bspij5d@4ax.com>
On Tue, 7 Dec 2004 20:41:13 +0100, "Tim Nikias"
<JUSTTHELOWERCASE:timISNOTnikias(at)gmx.netWARE> wrote:
> Anyone have any ideas or suggestions?

I remember

http://www.irtc.org/ftp/pub/stills/2002-02-28/tmworld.jpg
http://www.irtc.org/ftp/pub/stills/2002-02-28/tmworld.txt

as well as "Winter" topic

http://www.irtc.org/stills/2002-04-30.html

ABX


Post a reply to this message

From: Ross
Subject: Re: Ingenious snow placement?
Date: 7 Dec 2004 15:42:42
Message: <41b615c2$1@news.povray.org>
"Tim Nikias" <JUSTTHELOWERCASE:timISNOTnikias(at)gmx.netWARE> wrote in
message news:41b60788@news.povray.org...
> So, what I have: two meshes of the same tree. One is with all the tiny
> branches, the other with just the big ones. What I want to do is place
> spheres for a blob onto the less intricate tree, and then use it in
> conjunction with the detailed tree. Thus, I get snow on the bigger
branches
> for the detailed tree.
>
> Now, does anyone have any ingenious SDL-Code which would place the spheres
> on the tree via trace()? I could go about, generate a field with millions
of
> particles and then just drop them, those that stick will stay, the rest
will
> get deleted, but I'd rather use a more sophisticated approach, which
should
> be faster. My initial idea was to generate a top-down image of the tree,
> white=tree and black=empty space, and before actually shooting trace(), I
> check this image if there's any tree beneath it. With an even distribution
I
> could thus quickly generate all the spots on the tree, but I'd have to
> generate thousands of starting points of which again thousands will get
> discarded once I test them against the image.
>
> Anyone have any ideas or suggestions? I don't mind scripting the thing
> myself, I just need a good algorithm which will work faster than
> brute-force.
>
> Regards,
> Tim
>

http://graphics.stanford.edu/courses/cs448-01-spring/papers/fearing.pdf
or his website
http://www.cs.ubc.ca/nest/imager/contributions/fearing/snow/snow.html

i've been wishing i knew where to start for about 2 months now. as the
author notes, top down doesn't work real well. You want to go from the
ground up, since snow has a habit of drifting and avoiding obstacles as it
falls. so even if ground doesn't have any direct exposure to the sky, it
still might have a thin layer of snow. I'd really like to implement this for
POV, it is one thing i'd really like to do...

i mean, it wouldn't be very hard to pick N number of points on the snow
target (the object which snow will cover) and use some algorithm for
determining the snow density at that point. I don't know how to create a
mesh of those points though. I also don't know how to do the "flake dusting"
he talks about. But oh well, one can dream.


-ross


Post a reply to this message

From: Tim Nikias
Subject: Re: Ingenious snow placement?
Date: 7 Dec 2004 16:01:20
Message: <41b61a20@news.povray.org>
> http://www.oyonale.com/ressources/english/sources12.htm

Judging from the description, this is just the "Create dozens of positions
and drop them" Approach, which I'm actually wanting to avoid. Additionally,
the website says specifically that it only covers the first layer of
objects, e.g. it's like a spray-paint from a certain direction. That's not
very suitable for my scene.

But thanks anyway (even though I knew of Gilles' Snow-Macro)

Regards,
Tim

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


Post a reply to this message

From: Tim Nikias
Subject: Re: Ingenious snow placement?
Date: 7 Dec 2004 16:04:49
Message: <41b61af1$1@news.povray.org>
> http://www.irtc.org/ftp/pub/stills/2002-02-28/tmworld.jpg

Uses the "Brute Force method" I want to avoid because of the fine details
which would require tons of particles to hit them.

> http://www.irtc.org/stills/2002-04-30.html

"Frosted" (3rd Place) just shoots tons and tons of spheres at the flower,
and does so sequentially again and again to achieve several layers. Again,
just brute force, and also not suitable for a tree to carry some snow.

Thanks for the pointer anyway! :-)

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


Post a reply to this message

From: Tim Nikias
Subject: Re: Ingenious snow placement?
Date: 7 Dec 2004 16:05:55
Message: <41b61b33@news.povray.org>
> http://graphics.stanford.edu/courses/cs448-01-spring/papers/fearing.pdf
> or his website
> http://www.cs.ubc.ca/nest/imager/contributions/fearing/snow/snow.html

Ah, looks interesting, but requires some more reading to see if this will be
feasible within POV-Ray SDL. And even if it's not feasible, might have some
interesting ideas which I can cannibalize... :-)

Thank you!

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


Post a reply to this message

From: Ross
Subject: Re: Ingenious snow placement?
Date: 7 Dec 2004 16:20:34
Message: <41b61ea2$1@news.povray.org>
"Tim Nikias" <JUSTTHELOWERCASE:timISNOTnikias(at)gmx.netWARE> wrote in
message news:41b61b33@news.povray.org...
> > http://graphics.stanford.edu/courses/cs448-01-spring/papers/fearing.pdf
> > or his website
> > http://www.cs.ubc.ca/nest/imager/contributions/fearing/snow/snow.html
>
> Ah, looks interesting, but requires some more reading to see if this will
be
> feasible within POV-Ray SDL. And even if it's not feasible, might have
some
> interesting ideas which I can cannibalize... :-)
>
> Thank you!
>
> -- 
> "Tim Nikias v2.0"
> Homepage: <http://www.nolights.de>
>
>

Good luck. Post some news if you implement any of his ideas, i'd be
interested in hearing.


Post a reply to this message

From: Tim Nikias
Subject: Re: Ingenious snow placement?
Date: 7 Dec 2004 17:27:07
Message: <41b62e3b$1@news.povray.org>
> Good luck. Post some news if you implement any of his ideas, i'd be
> interested in hearing.

Well, the technique he explains is more or less suited for triangle-based
scenes, as it uses (and needs) surfaces of geometry to work. An
implementation of this should be possible for a heightfield (and I'm sure
I'll try it eventually :-), but converting this from triangle-based to a
geometric-based algorithm might be rather tricky.

How would I go about and find the top-surfaces of a given object? Running
across it and collecting data is the first idea that comes to mind. But if I
would be able to do so easily, I would already have my "quick-and-dirty"
solution to place some snow on my tree.
Still, the approach seems well worth some thought: instead of dropping snow
from the sky, it checks the surfaces how easily something from the sky would
hit a single surface. Thus, you don't have to drop tons of snowflakes from
the sky and look where they end up, you just check the surfaces and generate
some statistics. And since you're checking *every* surface, there won't be a
spot left which would have been missed if you had used too little
snow-particles.

Ah well, some more thoughts need to be spent on this, but if I write a set
of macros for this, I'll sure release them. Like I always do. :-)

Regards,
Tim

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


Post a reply to this message

From: Gena
Subject: Re: Ingenious snow placement?
Date: 8 Dec 2004 02:21:27
Message: <41b6ab77$1@news.povray.org>
Couple months ago I had the same task. I wanted to place
snow either on blob trees generated by TOMTREE or on mesh
trees generated by POV-Tree. 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. The value of each shift equals
to blob radius but it's customizable. It works fine. Maybe snow
looks too smooth. Probably I will work a little bit more on it and 
release that POV-Tree version in the future. Though don't ask
me when :)

Gena.


Tim Nikias wrote:
> So, what I have: two meshes of the same tree. One is with all the tiny
> branches, the other with just the big ones. What I want to do is place
> spheres for a blob onto the less intricate tree, and then use it in
> conjunction with the detailed tree. Thus, I get snow on the bigger branches
> for the detailed tree.
> 
> Now, does anyone have any ingenious SDL-Code which would place the spheres
> on the tree via trace()? I could go about, generate a field with millions of
> particles and then just drop them, those that stick will stay, the rest will
> get deleted, but I'd rather use a more sophisticated approach, which should
> be faster. My initial idea was to generate a top-down image of the tree,
> white=tree and black=empty space, and before actually shooting trace(), I
> check this image if there's any tree beneath it. With an even distribution I
> could thus quickly generate all the spots on the tree, but I'd have to
> generate thousands of starting points of which again thousands will get
> discarded once I test them against the image.
> 
> Anyone have any ideas or suggestions? I don't mind scripting the thing
> myself, I just need a good algorithm which will work faster than
> brute-force.
> 
> Regards,
> Tim
>


Post a reply to this message

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 2 Messages Goto Initial 10 Messages

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