POV-Ray : Newsgroups : povray.binaries.images : Skip-a-ray SDL raytracer Server Time
2 Aug 2024 04:22:42 EDT (-0400)
  Skip-a-ray SDL raytracer (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Grassblade
Subject: Skip-a-ray SDL raytracer
Date: 24 Oct 2007 15:25:01
Message: <web.471f9b31e04cdb41654d6f060@news.povray.org>
I used the SDL raytracer found in the help file
(http://www.povray.org/documentation/view/3.6.1/123/) to refine an idea
more or less suggested by Bruno Cabasson.
Top picture skips a ray if (square of) distance in colour-space is smaller
than an user supplied threshold.
Middle pic is the result of the unadulterated SDL raytracer.
Bottom pic is the difference of the two.
The supplied Skip-a-ray pic requires about 65-70% of the time to render.


Post a reply to this message


Attachments:
Download 'compositepic.png' (386 KB)

Preview of image 'compositepic.png'
compositepic.png


 

From: triple r
Subject: Re: Skip-a-ray SDL raytracer
Date: 24 Oct 2007 22:25:01
Message: <web.471ffd6e72fb445f88727a860@news.povray.org>
"Grassblade" <nomail@nomail> wrote:
> I used the SDL raytracer found in the help file
> (http://www.povray.org/documentation/view/3.6.1/123/) to refine an idea
> more or less suggested by Bruno Cabasson.
> Top picture skips a ray if (square of) distance in colour-space is smaller
> than an user supplied threshold.
> Middle pic is the result of the unadulterated SDL raytracer.
> Bottom pic is the difference of the two.
> The supplied Skip-a-ray pic requires about 65-70% of the time to render.

Wow.  Not sure how it would work in a busier example or compiled in, but
sure saves time here.

 - Ricky


Post a reply to this message

From: dlm
Subject: Re: Skip-a-ray SDL raytracer
Date: 25 Oct 2007 04:59:28
Message: <47205af0$1@news.povray.org>
"Grassblade" <nomail@nomail> wrote in message 
news:web.471f9b31e04cdb41654d6f060@news.povray.org...
>I used the SDL raytracer found in the help file
> (http://www.povray.org/documentation/view/3.6.1/123/) to refine an idea
> more or less suggested by Bruno Cabasson.
> Top picture skips a ray if (square of) distance in colour-space is smaller
> than an user supplied threshold.
> Middle pic is the result of the unadulterated SDL raytracer.
> Bottom pic is the difference of the two.
> The supplied Skip-a-ray pic requires about 65-70% of the time to render.
>

Neat.
I would be hard-pressed to tell the difference.
So the slight differences all show up at the edges.
Presumably these are glancing rays?
So this is effectively like shifting gear on AA, with jaggies showing up at 
some edges.
DLM


Post a reply to this message

From: Bruno Cabasson
Subject: Re: Skip-a-ray SDL raytracer
Date: 25 Oct 2007 10:15:02
Message: <web.4720a3bf72fb445fe8ba46670@news.povray.org>
"Grassblade" <nomail@nomail> wrote:
> I used the SDL raytracer found in the help file
> (http://www.povray.org/documentation/view/3.6.1/123/) to refine an idea
> more or less suggested by Bruno Cabasson.
> Top picture skips a ray if (square of) distance in colour-space is smaller
> than an user supplied threshold.
> Middle pic is the result of the unadulterated SDL raytracer.
> Bottom pic is the difference of the two.
> The supplied Skip-a-ray pic requires about 65-70% of the time to render.

The fact is  that, basically and in principle, you can't predict whether or
not an object happens to occlude another at the next pixel or next ray. My
suggestion was about the fact that in ALREADY RENDERED images, entire areas



It appears now that the answer is no.

But I am still wondering if a first 'geometrical' pass at render-time could
help collect data (like direction-object correspondance) that could be used
FOR SUBSEQUENT RENDERS and save ray-object intersection tests and

assumptions about ray-object intersectons. This is not very applicable for
anims, of course.

Bruno.


Post a reply to this message

From: Grassblade
Subject: Re: Skip-a-ray SDL raytracer
Date: 25 Oct 2007 15:20:01
Message: <web.4720ec1b72fb445f45deea430@news.povray.org>
"triple_r" <rre### [at] hotmailcom> wrote:
> "Grassblade" <nomail@nomail> wrote:
> > I used the SDL raytracer found in the help file
> > (http://www.povray.org/documentation/view/3.6.1/123/) to refine an idea
> > more or less suggested by Bruno Cabasson.
> > Top picture skips a ray if (square of) distance in colour-space is smaller
> > than an user supplied threshold.
> > Middle pic is the result of the unadulterated SDL raytracer.
> > Bottom pic is the difference of the two.
> > The supplied Skip-a-ray pic requires about 65-70% of the time to render.
>
> Wow.  Not sure how it would work in a busier example or compiled in, but
> sure saves time here.
>
>  - Ricky

Yeah, I wish I knew how to code in C so I could find out for myself. :-(


Post a reply to this message

From: Grassblade
Subject: Re: Skip-a-ray SDL raytracer
Date: 25 Oct 2007 15:30:01
Message: <web.4720edc572fb445f45deea430@news.povray.org>
"dlm" <me### [at] addressinvalid> wrote:
> "Grassblade" <nomail@nomail> wrote in message
> news:web.471f9b31e04cdb41654d6f060@news.povray.org...
> >I used the SDL raytracer found in the help file
> > (http://www.povray.org/documentation/view/3.6.1/123/) to refine an idea
> > more or less suggested by Bruno Cabasson.
> > Top picture skips a ray if (square of) distance in colour-space is smaller
> > than an user supplied threshold.
> > Middle pic is the result of the unadulterated SDL raytracer.
> > Bottom pic is the difference of the two.
> > The supplied Skip-a-ray pic requires about 65-70% of the time to render.
> >
>
> Neat.
> I would be hard-pressed to tell the difference.
> So the slight differences all show up at the edges.
> Presumably these are glancing rays?
> So this is effectively like shifting gear on AA, with jaggies showing up at
> some edges.
> DLM

That's a good question, jaggies shouldn't show up in principle, because of
the threshold. Yet the difference picture shows the outline of at least the
two bottom spheres. I'm not entirely sure where it comes from. Maybe if I
rendered with no AA it would go away. Or maybe I need a lower threshold,
but then render-time might go up.
And, yes, the algorithm acts like a sort of AA, but with different weights
from what we are used to.


Post a reply to this message

From: Grassblade
Subject: Re: Skip-a-ray SDL raytracer
Date: 25 Oct 2007 15:50:00
Message: <web.4720f10772fb445f45deea430@news.povray.org>
"Bruno Cabasson" <bru### [at] alcatelaleniaspacefr> wrote:
> "Grassblade" <nomail@nomail> wrote:
> > I used the SDL raytracer found in the help file
> > (http://www.povray.org/documentation/view/3.6.1/123/) to refine an idea
> > more or less suggested by Bruno Cabasson.
> > Top picture skips a ray if (square of) distance in colour-space is smaller
> > than an user supplied threshold.
> > Middle pic is the result of the unadulterated SDL raytracer.
> > Bottom pic is the difference of the two.
> > The supplied Skip-a-ray pic requires about 65-70% of the time to render.
>
> The fact is  that, basically and in principle, you can't predict whether or
> not an object happens to occlude another at the next pixel or next ray.
Well, actually making predictions based on past history is the job of
statistics. In general you can't have a 100% accurate predictor, though;
which I believe is what you wanted. So, yes, it is possible to get an
imperfect predictor on the first pass. But the math involved can get really
ugly.
 My
> suggestion was about the fact that in ALREADY RENDERED images, entire areas


>
> It appears now that the answer is no.
>
> But I am still wondering if a first 'geometrical' pass at render-time could
> help collect data (like direction-object correspondance) that could be used
> FOR SUBSEQUENT RENDERS and save ray-object intersection tests and

> assumptions about ray-object intersectons. This is not very applicable for
> anims, of course.
>
> Bruno.
Ah, OK, I misunderstood your idea, then. The logical conclusion is: Cool,
the idea I posted here is mine!!! ^_^
Regarding your idea, it was mentioned in the off-topic forum
(http://news.povray.org/povray.off-topic/thread/%3Cweb.471cbb5fa19b477d27eef15b0%40news.povray.org%3E/)
that in a raytracer by the name of Maxwell you can change lighting set-up
after rendering. This sounds very much like what you are suggesting, since
it requires storing somewhere previous render information. So it is
possible, but not in POV just yet. It's definitely the way to go for future
versions of POV-ray, IMHO. I may give it a go in the SDL raytracer,
actually, assuming I can figure out how it works exactly and if I can find
the time.


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Skip-a-ray SDL raytracer
Date: 25 Oct 2007 17:04:17
Message: <472104d1@news.povray.org>
"Grassblade" <nomail@nomail> wrote in message 
news:web.471f9b31e04cdb41654d6f060@news.povray.org...
>I used the SDL raytracer found in the help file
> (http://www.povray.org/documentation/view/3.6.1/123/) to refine an idea
> more or less suggested by Bruno Cabasson.
> Top picture skips a ray if (square of) distance in colour-space is smaller
> than an user supplied threshold.
> Middle pic is the result of the unadulterated SDL raytracer.
> Bottom pic is the difference of the two.
> The supplied Skip-a-ray pic requires about 65-70% of the time to render.


is this a similar technique as used here: 
http://www.cip.physik.uni-muenchen.de/~wwieser/render/povray/patches/prt-patch/ ?

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

From: Grassblade
Subject: Re: Skip-a-ray SDL raytracer
Date: 25 Oct 2007 18:05:00
Message: <web.472112e672fb445f45deea430@news.povray.org>
"Zeger Knaepen" <zeg### [at] povplacecom> wrote:
> "Grassblade" <nomail@nomail> wrote in message
> news:web.471f9b31e04cdb41654d6f060@news.povray.org...
> >I used the SDL raytracer found in the help file
> > (http://www.povray.org/documentation/view/3.6.1/123/) to refine an idea
> > more or less suggested by Bruno Cabasson.
> > Top picture skips a ray if (square of) distance in colour-space is smaller
> > than an user supplied threshold.
> > Middle pic is the result of the unadulterated SDL raytracer.
> > Bottom pic is the difference of the two.
> > The supplied Skip-a-ray pic requires about 65-70% of the time to render.
>
>
> is this a similar technique as used here:
> http://www.cip.physik.uni-muenchen.de/~wwieser/render/povray/patches/prt-patch/ ?
>
> cu!
> --
> #macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
> sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
> #end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
> _(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com

Yes! Well, not the page you linked to, but this other one is very similar:
http://www.cip.physik.uni-muenchen.de/~wwieser/render/povray/patches-35/ipt-patch/
Except it's needlessly complicated, and potentially introduces big artifacts
as the pics show. I'm disappointed to see the patch is only available on
Unix systems, though. One more reason to download Linux. Someday.


Post a reply to this message

From: triple r
Subject: Re: Skip-a-ray SDL raytracer
Date: 27 Oct 2007 18:20:00
Message: <web.4723b8f272fb445f88727a860@news.povray.org>
"Grassblade" <nomail@nomail> wrote:

> Unix systems, though. One more reason to download Linux. Someday.

Hey, today is someday!

 - Ricky


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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