Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Martin Mittring, posted on June 27, 2001




Image Description, by Martin Mittring



These pictures were rendered with my own raytracer (with Monte Carlo extensions). I wrote it just for fun. The geometry is generated procedually. Some pictures are edited afterwards to give the bright areas a glow.

I´m a computer science student. For one of my subjects (Renderig and Animation) I added RIB loading support. (renderman format). This is partly working.

You can find more pictures at: http://www.kosmokleaner.de/raygallery.html Sorry, but the explanations are in german.

Now some technical stuff (If you use this for our own work, please mention my name - and it would be nice to inform me about your work):

First I experimented with the distribution of the MonteCarlo directions. I use a spiral with some random values. Take a look at Picture 25 (130min). Then I developed a post filter. This filter blures all the pixels in a special range. Distance between two samples is measured with this function:

f = (x1-x2)^2 + (y1-y2)^2 + (z1-z2)^2 + ( (nx1-nx2)^2 + (ny1-ny2)^2 + (nz1-nz2)^2 )*const.

nx1,ny1,nz1 is the normal at sample 1
nx2,ny2,nz2 is the normal at sample 2
x1,y1,z1 is the position at sample 1
x2,y2,z2 is the position at sample 2

const is a tuneable value.

The blur is only done with the diffuse part of the global illumination (this is not perfect, I know ) and should only be done with the same materials.

The results are very good. You can get an image without grain (my shadow sampler still generates grain). But the best is: it is very very fast for much better results. You have to tune the blur constants, but this could be done in near real time.

It can be easyly extended to do futher sampling at pixels that don´t have enouth neighbours for good blurring.

Please forgive my english grammer - I´m from germany.


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Pants

June 28, 2001, 04:39 AM

Hi all.

This is a really nice picture. Very impressive!

One question I have though. In this picture, the spheres surrounding the center one are all elongated away from the center one. I dont know if this was intentional but my ray tracer is suffering from this very thing! How do I make a sphere render as a sphere no matter where it is!?!?

This ray tracing stuff is cool, but I need a solid base before I want to go forward...

Thanks

Pete

 
DynamiX

June 28, 2001, 04:46 AM

wirklich hübsche bilder .. könntest dich ja mal bei discreet nach einem Job umschauen ;)

 
Catfish

June 28, 2001, 05:21 AM

I'd imagine the warping effect appears because you're defining the viewpoint as a point, rather than a rectangle.

Just guessing...but it might work.

 
Pants

June 28, 2001, 05:26 AM

Yes, I have the ray origin at the origin and shoot the ray through each pixel of a imaginary picture in front of me. Isn't this how its normally done?

 
kewldude

June 28, 2001, 05:44 AM

Yes it is, and the spheres ARE supposed to look like that! The problem is that the FOV in the raytracer is probably not the same FOV as you have to the screen.

 
Pants

June 28, 2001, 05:57 AM

So my elopngated spheres are right? ok... Can you explain this to me in a bit more detail please?

"The problem is that the FOV in the raytracer is probably not the same FOV as you have to the screen."

Screen, does this mean physical monitor or picture or what? Surly if the sphere is drawn correctly in the center of my picture this means that my aspect ratio is correct...

Pete

 
kewldude

June 28, 2001, 06:19 AM

Figure some of it out by yourself, but consider this example, when I render stuff I would normally pick 90° fov, because this looks good in most cases, because my fov to the screen is 90°, that is the distance to the screen is equal to the screen width. Now if I pick 120° fov and I still have 90° fov to screen, then the screen width should be bigger or I should be sitting closer to the screen.

So, try lowering the fov and the problem will become less visible.

 
Pants

June 28, 2001, 06:25 AM

Cheers.

I'll go and figure it out for myself then...

Pete *Buying a Book* Pants

 
mattie

June 28, 2001, 10:11 AM

pete : i had the same problem and i believe the answer is quite simple : every object that lies before the view plane is distorted because of perspective calculations that are exagerated within this area (or how do you say that? :).
So just make sure there are no objects within this area, you won't have problems then. You might want to change your view angle a bit too.

 
Simon Veith Reinholt

June 28, 2001, 10:11 AM

That's a useful algorithm for making warts or boils for facial or body textures. :p

Neat! - Keep working those diseases..... "get some air into those wounds" (quote)

 
mattie

June 28, 2001, 10:14 AM

btw very nice pice :)
i wonder if this is possible for approximation with some vertex/pixel shader in realtime. Gonna try this out when i have a geforce 3 :)

also very good links on your site
i see a few i didn't have yet :)

congrats!

 
SigmundSEGV

June 28, 2001, 04:00 PM

I've only done a couple 3D engines so far, and I seem to have to re-figure this out every time. :)

Try drawing some triangles from the eye to the screen, (on paper that is:)


screen width /
|---------------|
|_| / ^
| / |
| / |
| / | eye-to-screen dist
| / |
| / |
|/ v
o



. . . what would happen to the "angle of your view into the world" as the eye is moved closer or further from the screen. . .

Hope this helps,

Bill

 
Aphex

June 29, 2001, 05:39 AM

i was alone, it was one of those literary things you do not to feel so alone, quite common in ray tracing projects ;-)

 
This thread contains 43 messages.
First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.