POV-Ray : Newsgroups : povray.general : Ingenious snow placement? Server Time
5 Nov 2024 20:18:05 EST (-0500)
  Ingenious snow placement? (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Tim Nikias
Subject: Ingenious snow placement?
Date: 7 Dec 2004 14:42:00
Message: <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

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


Post a reply to this message

From: Florian Brucker
Subject: Re: Ingenious snow placement?
Date: 7 Dec 2004 15:03:19
Message: <41b60c87@news.povray.org>
Hi Tim!

Haven't tried it myself, but as most times, Gilles has been there already :)

http://www.oyonale.com/ressources/english/sources12.htm


HTH,
Florian
-- 
camera{look_at-y*10location<8,-3,-8>*10}#local a=0;#while(a<999)sphere{
#local _=.01*a-4.99;#local p=a*.01-5;#local c=.01*a-4.995;<sin(p*pi)*5p
*10pow(p,5)*.01>sin(c*c*c*.1)+1pigment{rgb 3}}#local a=a+1;#end
/******** http://www.torfbold.com ******** http://www.imp.org ********/


Post a reply to this message

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

Goto Latest 10 Messages Next 2 Messages >>>

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