My adventures with Bidirectional path tracing (Update ->) vertex connection and merging

My adventures with Bidirectional path tracing (Update ->) vertex connection and merging

Post just about everything that isn't directly related to Spring here!

Moderator: Moderators

Post Reply
User avatar
scifi
Posts: 848
Joined: 10 May 2009, 12:27

My adventures with Bidirectional path tracing (Update ->) vertex connection and merging

Post by scifi »

(Update VCM renderer)

Image

(Old post)

A bidirectional path tracer implemented from scratch using NVIDIA optix, took me 3 months to learn all of this.

Has some issues but iam having some fun with it.
Realtime ray tracing with 20 fps on a nvidia GTX 860M!, i can translate spheres, and instantiate them realtime xD

And for those that do not know what ray tracing is, look it up!

Image

Image

Its like using Physics used in the real world to display graphics, where you trace both rays from a light source and the eye and sample color from each intersection with geometry in the scene.

And yes this looks like CRAP, i hope it will look much better :wink: with more time.
Last edited by scifi on 11 Feb 2016, 04:46, edited 3 times in total.
User avatar
scifi
Posts: 848
Joined: 10 May 2009, 12:27

Re: My adventure with Bidirectional path tracing

Post by scifi »

Theres a wild stanford dragon in my scene!

Image
MetalSucker
Posts: 98
Joined: 22 Sep 2014, 20:29

Re: My adventures with Bidirectional path tracing

Post by MetalSucker »

There's a very interesting camera grainy-ness fuzzy thing to it that looks vintage, not sure where that comes from, whether it's the actual rays or some post-rendering thing, the real time aspect is great!
johnshadow23
Posts: 5
Joined: 04 Jan 2016, 04:36

Re: My adventures with Bidirectional path tracing

Post by johnshadow23 »

The 'fuzzes' come from the path finding the light, or not finding it, meaning it's still dark. This mainly is because of the random nature of path tracing. Also why your spheres have lines on them is because you have a low epsilon. epsilon is 0.00000001. Also is there s tutorial for this XXD.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: My adventures with Bidirectional path tracing

Post by PicassoCT »

Its really really something :D
User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Re: My adventures with Bidirectional path tracing

Post by Karl »

johnshadow23 wrote:The 'fuzzes' come from the path finding the light, or not finding it, meaning it's still dark. This mainly is because of the random nature of path tracing. Also why your spheres have lines on them is because you have a low epsilon. epsilon is 0.00000001. Also is there s tutorial for this XXD.
Drop the Shovel. This thread belongs buried. ITS THE CURRENT YEAR
johnshadow23
Posts: 5
Joined: 04 Jan 2016, 04:36

Re: My adventures with Bidirectional path tracing

Post by johnshadow23 »

_-_ lol, still it's good to pick things back up. I vote he, or some body makes a tut.
User avatar
scifi
Posts: 848
Joined: 10 May 2009, 12:27

Re: My adventures with Bidirectional path tracing

Post by scifi »

I have necroed this thread with an update!

My friends, my adventure with global illumination has continued over the years, and now ive implemented vertex connection and merging!!!!

Iam proud to present this monstrosity of a renderer that runs at 3.5 frames per second and i can rotate it!!! it has more than a milion triangles on my Nvidia Laptop GPU 860m. :mrgreen:

Image
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: My adventures with Bidirectional path tracing (Update ->) vertex connection and merging

Post by PicassoCT »

Please post pictures of the hole in the desk, where the glowing gpu tryied to escape back to its silicon brothers from your bootcamp.

Great work
User avatar
scifi
Posts: 848
Joined: 10 May 2009, 12:27

Re: My adventures with Bidirectional path tracing (Update ->) vertex connection and merging

Post by scifi »

PicassoCT wrote:Please post pictures of the hole in the desk, where the glowing gpu tryied to escape back to its silicon brothers from your bootcamp.

Great work
Thx!, especially being a laptop GPU.

The cool thing about it, it's that its totaly dynamic in the sense that you can easily move around and even instantiate stuff, in the future i might work in making it faster and allowing for texture's to be used with the renderer, i think its totaly doable, i might make a video of it.

The scalability towards large amounts of triangles is quite cool, and theres a directional, environment and point light sources in that scene as well, so everything works quite well together.
User avatar
albator
Posts: 866
Joined: 14 Jan 2009, 14:20

Re: My adventures with Bidirectional path tracing (Update ->) vertex connection and merging

Post by albator »

Last time i checked, it comes with tenth of examples that you can tune right away and that you can display right after you compile the bins. All in real time (ok, depends on the resolution you use)
You can even run it on CPU (optix prime) if you want to integrate it in your C++ code. You don't need to use program in CUDA. (you still need a NVIDIA GPU though...)
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: My adventures with Bidirectional path tracing (Update ->) vertex connection and merging

Post by PicassoCT »

Question:

When in motion - does it have the same graininess as in this video?
https://www.youtube.com/watch?v=jUIOQm4UIuo

If yes, could a simple blur fragment by motion direction of already rendered pixels help?

Also can you warp the lightphysics, producing lenses and blackholes?
User avatar
scifi
Posts: 848
Joined: 10 May 2009, 12:27

Re: My adventures with Bidirectional path tracing (Update ->) vertex connection and merging

Post by scifi »

albator wrote:Last time i checked, it comes with tenth of examples that you can tune right away and that you can display right after you compile the bins. All in real time (ok, depends on the resolution you use)
You can even run it on CPU (optix prime) if you want to integrate it in your C++ code. You don't need to use program in CUDA. (you still need a NVIDIA GPU though...)
Yes ive worked with Intel Embree and Nvidia Optix, in fact i did two implementations using those frameworks to accelerate ray traversal mostly, i might release them on a github or something, even though their documentation will be lacking.
In terms of resolution im rendering 1024 x 1024 pixels with depth 8 for path's being emitted for each pixel index.

Yes Optix can use and leverage the CPU, but it's mostly used for calling compiled CUDA from PTX files and run those instructions on the GPU. You can even Mix an Optix context with a Cuda context to get that extra programability. Optix can be used as a post processing engine together with a opengl application, it's quite cool in fact.
PicassoCT wrote:Question:

When in motion - does it have the same graininess as in this video?
https://www.youtube.com/watch?v=jUIOQm4UIuo

If yes, could a simple blur fragment by motion direction of already rendered pixels help?

Also can you warp the lightphysics, producing lenses and blackholes?
Yes noise is indeed the biggest drawback when it comes to global illumnination algorithm's, especially because on mathematical therms, the variance of the pixel estimators is essentially shown as noise in the images, and if you want to cut an algorithm's quality to make it faster you usually cut and simplify terms on the estimator which result on more noise.

Granted mine doesn't have that much noise, because i consider a frame as the full execution of a high quality render, in that video he cut the quality by extreme amounts maybe not even rendering every single pixel in the screen as he rotates/moves the camera something that i could do yes to obtain a steady fps, i render all pixels and obtain at least a depth of 8 in traversing the ray's trough my scene.

it still has some degree of noise because light ray's reach surfaces and give them different contributions so there are areas on the scene with more ray's hiting them than others.

If i understood you correctly yes you can warp light ray's, since essentialy the goal of all these algorithm's is to have path's reach light sources from the camera eye and vice versa, and then get a color contribution from those path's.

The way these path's are created and interacted with scene geometry can be altered to create blackholes in a sense, so it's dependent on what you want to do to a ray when it hits a geometry for example, currently i reflect it or refract it when it hit's a geometry that i want and then i just store in that ray the type of intersected material, i could create a sort of black whole object and warp ray's as they hit that surface.

A simple post processing shader bluring can work versus emiting more samples, it would reduce render fidelity but i could stop the bluring once enough samples have been made.

There are multiple ways to reduce noise that i havent even looked into.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: My adventures with Bidirectional path tracing (Update ->) vertex connection and merging

Post by PicassoCT »

You could do a camera-position look ahead render with a extremely reduced pixelrate and blend the pixels you got towards this, and then to the final pixel
User avatar
albator
Posts: 866
Joined: 14 Jan 2009, 14:20

Re: My adventures with Bidirectional path tracing (Update ->) vertex connection and merging

Post by albator »

PicassoCT wrote:Question:


Also can you warp the lightphysics, producing lenses and blackholes?

Light physics like lambertian (or any model you like) diffusion, reflexion, refraction, transmission (the 3 with index changing) as well as diffraction: yes
You model them all when a ray hits a surface and modeling the physics in a monte carlo way is really straight forward.

If you want to model lenses, you can as well. It is implemented in most examples.

However, if you want to model (gravitational) field, you cannot (physX - not optiX - can only do spherical field as far as I checked but it is not enough for moving gravitational object impacting your moving ray of light). Meaning you wont be able to model light deviation due to multiple gravitational object in motion. I guess you could model one object using a lenses but I am not sure that was your question... (ie. with respect to the news from last weak)
johnshadow23
Posts: 5
Joined: 04 Jan 2016, 04:36

Re: My adventures with Bidirectional path tracing (Update ->) vertex connection and merging

Post by johnshadow23 »

Yes I helped revive a topic! woot!!! :o Question, will you make a tutorial? I have found No tutorials Explaining how to do simple path tracing, ( I don't care if it's bidirectional or not). I know The basic of it (I keep getting error with it in my coding though), and if you could do a tutorial explaining how to do it real time that would be the best! 8) Also can you make an actual game in this? It would be cool to see! Hope to see where this goes, Please keep updating this, I will be watching for the updates! :o
johnshadow23
Posts: 5
Joined: 04 Jan 2016, 04:36

Re: My adventures with Bidirectional path tracing (Update ->) vertex connection and merging

Post by johnshadow23 »

Thanks Very helpful! :o
Also any tips on how to make it bidirectional?
Post Reply

Return to “Off Topic Discussion”