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.
 
Evil Bill

June 27, 2001, 01:50 PM

First!

Damn, those are good pics! Looks like an artist impression of something!

Steve

 
Paul

June 27, 2001, 01:51 PM

Guten Tag. Das is zier gut!

It's been a few years since my German class, but nice job! Very impresive. ( ... and your English grammar is pretty good too)

 
Ohad Eder Pressman

June 27, 2001, 01:57 PM

Very impressing, I'm personally greatly impressed by the models and the fact that their procedurally generated.

well done.

 
David Olsson

June 27, 2001, 02:02 PM

Very nice, I absolutly love procedural geometry.

 
Lars W.

June 27, 2001, 02:13 PM

Damn good shots, espacially the surfacestructure seems very real. The objects in the picture remind me of viruses, like they are used to be shown i TV :-)

Immer wieder schön zu sehen, das auch hierzulande sich Leute mit der Materie beschäftigen.

Lars

 
Nick

June 27, 2001, 02:38 PM

Yuck! Disgusting, I wouldn't eat those toroidal pumpkins if I were you! ;)

Serious now: very nice job! It's really impressive that this is all possible with procedurally generated geometry. The images on you site look really cool too, very close to real photographs actually. Keep up the good work!

 
hdmx

June 27, 2001, 02:58 PM

Especially the lower right one looks like a photo. Stunning.

Sag mal, wo studierst du denn? Vielleicht schaust du dir mal die Sachen von Prof. Deussen (TU Dresden) an, der beschäftigt sich vorallem mit der Generierung von Pflanzen (http://www.inf.tu-dresden.de/ST2/cg/gallery/gallery.html).

hdmx

 
neur

June 27, 2001, 03:19 PM

make them realtime and i'll worship you ;)

 
danthalas

June 27, 2001, 03:29 PM

Man, this IOTD Rocks!!!

 
MK42

June 27, 2001, 03:33 PM

I really like your procedurally generated models. They look unique and are better than 'yet another cornell box' which is the usual test for these kinds of systems. Do you use any other sampling tricks?

Ich muss natürlich auch noch ein paar deutsche Sätze loswerden :) Mach Dir wegen Deinem Englisch keine Sorgen ... Dat passt schon!

- MK42

 
James

June 27, 2001, 03:34 PM

Simply astounding work. I love the shag carpet on your screen shots page. I seriously hope you are at least a grad student (or the rest of us should all be ashamed.) :)

 
Alex Herz

June 27, 2001, 03:37 PM

hu..I was shocked first..though it was made with a geforce3 or so..
till I read the comment of course...

This is one of the IOTDs I like most..thogh it should be realtime realy..

Alex

 
goltrpoat

June 27, 2001, 03:48 PM

global illumination in realtime.. yeah.. fifty years from now, maybe

 
Mateo

June 27, 2001, 04:10 PM

I don't care if it took since the 60s to render, it's still stunning...

 
lycium

June 27, 2001, 04:21 PM

yeah!! ray tracing!! :>

very very nice work! this kinda takes the wind out of my sails though :/ your procedurally generated objects are quite inspiring, i might not have to resort to loading triangle meshes to get nice objects... i particularly like the spikes and hair you put on the surfaces.

as for the "distribution of the MonteCarlo directions", which directions are those? shadow ray directions, reflection directions, diffuse reflection directions?

 
morgan

June 27, 2001, 05:13 PM

It took me a while to realized these things are all made out of spheres-- clever; and creepy looking! Nice images on the page.

-m

 
Martin Mittring

June 27, 2001, 05:25 PM

which directions are those? shadow ray directions, reflection directions, diffuse reflection directions?

the filter uses the
"normals of the surface", wich are the same as the "diffuse reflection directions"


Bye the way:

Thanks for your nice comments - They are very rewarding

 
Hannu K.

June 27, 2001, 05:33 PM

Best looking goo I've seen here!

 
loonie

June 27, 2001, 05:39 PM

yep very good.. i like the objects..
made out of spheres ? uhmm i wonder how :)

 
Martin Mittring

June 27, 2001, 06:33 PM

this is the code to generate the geometry (if you are interested)
(I hope it still workes - I haven´t used it for a long time)

It would be nice to see my creation everywhere - like the utah teapot
;)


// inner wormring
for(float f=0.0f;f<50.0f;f+=0.25f*3.0f*0.5f*3.0f)
{
Vector3dC mid=Vector3dC(sin(f*0.25f)*0.4f,cos(f*0.25f)*0.3f+0.08f,cos(f*0.25f)*0.15f+1.0f);
float r=(sin(f*0.6f)+1.1f)*0.08f;

m_ObjectList_unsorted.push_front(new CRaySphere(mid,r));
}

// worms around the wormring
for(float f=0.0f;f<50.0f;f+=0.25f*0.022f*0.4f)
{
float k=f+sin(f)*4.3f;

Vector3dC mid=Vector3dC(sin(k*0.25f)*0.4f,cos(k*0.25f)*0.3f+0.08f,cos(k*0.25f)*0.15f+1.0f);
Vector3dC mid2=Vector3dC(sin(k*0.25f+0.1f)*0.4f,cos(k*0.25f+0.1f)*0.3f+0.08f,cos(k*0.25f+0.1f)*0.15f+1.0f);
float r=(sin(k*0.6f)+1.1f)*0.08f;

Vector3dC direction=mid-mid2; direction.Normalize();
Vector3dC v1,v2;

direction.GetOtherBaseVec(v1,v2);

float s=sin(f*12.0f*2.0f)+cos(f*46.0f)*0.3f;
float c=cos(f*12.0f*2.0f)+sin(f*22.0f)*0.3f;

m_ObjectList_unsorted.push_front(new CRaySphere(mid+v1*r*s+v2*r*c,0.015f+(sin(f*42.0f)+sin(f*330.0f)*0.4f+0.4)*0.008f));
}

void Vector3dC::GetOtherBaseVec( Vector3dC &a, Vector3dC &b )
{
if(p[2]<-0.5f || p[2]>0.5f)
{
a.p[0]=p[2];
a.p[1]=p[1];
a.p[2]=-p[0];
a.Normalize();
b.CrossProd(*this,a);
}
else
{
a.p[0]=p[1];
a.p[1]=-p[0];
a.p[2]=p[2];
a.Normalize();
b.CrossProd(*this,a);
}
}




 
Martin Mittring

June 27, 2001, 06:58 PM

Sorry, but I forgot to mention:
these picture were made before I added the global illumination.
The geometry consists of many spheres.
There are up to 3 light sources with soft shadows.
The middle goo uses the accessability shader
(measures the distance to other obects)

I think this could be done in real time (not the middle one, but the right down). The material could be made with some vertex and pixel shaders, and the geometry could be done with particle rendering (spheres with alpha-value(used as z) for simulating the z-buffer).
The soft shadows could be made with typical techniques.

 
Aphex

June 27, 2001, 07:28 PM

Hey nice pics... reminds me of an old project I did way back when I was younger... i'll post it someday ;-) We used stochastic sampling of a poisson disk to distribute the rays (16 or 32) and got nice results for shadows, reflections, refractions, blur, etc.

To tackle the grain, we weighed the samples using different filters. See the pic at:

http://www.intercom.es/ibooks/dani/rayman/samples/pack3/glass.jpg

As an example. We tried gaussians, cones, etc. and the results were quite good... read "an introduction to raytracing" for a complete survey.

As an improvement, we tried an approach which would have really solved the problem (but never took off due to time constraints):

1 - send N rays, filter, save the result
2 - send N+1 rays, filter, save the result
3 - compare chromatically a and b
4 - while difference > threshold ->
N=N+1
goto 2

I mean, build a succesion of colors calculated from iterative finer tracings. The succesion converges to the right color quite fast (especially in zones where the multiple rays add no additional information)... kinda like adaptive supersampling for antialiasing, but funnier

cheers,

dani

 
lycium

June 27, 2001, 07:39 PM


auch schön zu sehen, wie viele flipcoders dazu auch deutsch sind ;)


thnx for the object generation code!

 
lycium

June 27, 2001, 07:45 PM

i know i'm lurking, but...

"...reminds me of an old project I did way back when I was younger... i'll post it someday ;-) We used..."

was it now you alone (when you were younger), or with some friends/co-workers? :)

 
Duncan

June 27, 2001, 11:23 PM

Nifty.

 
shrike

June 27, 2001, 11:40 PM

That is impressive looking. How many triangles are involved in those pictures? How long was the average rendering time?

 
MK42

June 28, 2001, 03:04 AM

Cool!

You'd think it would be much more complex ... do you think it would be smart to add some sort of 'sphere is inside inner wormring' test?

- MK42

 
MK42

June 28, 2001, 03:06 AM

Actually, depth sprites could be used for the spheres (on GF3 you can have 'textures' with depth information).

- MK42

 
L.e.Denninger

June 28, 2001, 04:26 AM

>That is impressive looking. How many triangles are involved in those pictures?

None. They are traced using functions describing their appearance; this is the way most raytraced geometry is made. Ofcourse raytracers can also trace polygons, but unless you want a perfectly flat surface it's mostly better by defining objects implicitly.

 
EvilOne

June 28, 2001, 04:29 AM

Simply amazing!

In letzter Zeit wird der 'fast' vergessenen Kunst des Raytracing doch wieder mehr Aufmerksamkeit geschenkt - zum Glück!

 
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.