Jump to content

Ray Tracing and Path Tracing


Recommended Posts

Hey guys, i have been reading all about Ray Tracing and Path Tracing, and i know what both of them mean, but i'm confused about certain stuff.

Is Path Tracing an upgrade to Ray Tracing? Or is it is own algorithm that replaces Ray Tracing? and do we have it in Mantra or not? I know that Path Tracing mainly provides solutions to GI problems, is that already implemented in Mantra?

I need some clarifications regarding this, Thanks!

Link to comment
Share on other sites

hey,

yes pathtracing is sort of an extension of raytracing

Mantra is a pathtracer (if you render with PBR engine), raytracer (if you render with raytrace engine), or reyes (if u use micropolygon engine)

for GI in Mantra you will typically use pathtracing (default) or there is also photon map based solution available (driven by GI lights, faster render, less accurate)

 

 

Edited by davpe
Link to comment
Share on other sites

But houdini docs say that there are little differences between raytracer and PBR engines, and from what i know, GI is really different when it comes to raytracing and pathtracing... or do i understand wrong?
Cuz the same GI parameters are accessible through both engines (Diffuse Limit and all).

Link to comment
Share on other sites

well, i think you are a bit confused about what raytracing means. Pathtracing IS raytracing, its just a specific implementation of it, not a separate thing. There are other methods how to calculate GI, like photon maps, and that's very different from pathtracing. But it's also based on raytracing, only the implementation is different. The difference between raytrace and pbr engines in Mantra is mostly how it handles shaders. In most cases, the rendered beauty pass should look the same with raytrace engine and pbr.

Reasons for raytrace engine existence in Mantra is mostly a) compatibility reasons  b ) texture baking doesn't work with pbr c) setting up various non-physical and custom weird shaders can be sort of difficult with pbr.

On general note, I dunno how far in the past you remember, but before raytracing you had only rasterization (also called scanline or micropolygon rendering), which is great for rendering things like hair, volumes, tons of displaced geometry with motion blur, DOF, etc., but unfortunately can't handle very well accurate shadows, reflections/refractions and that sort of things. You could forget about any GI with rasterization. For some sort of natural looking lighting you had to place many many lights in the scene and use different tricks to manually produce something like GI. For reflections, only thing you had in store were simple specular highlights and reflection maps, and nobody knew what ambient occlusion is. Shadows were special pre-computed maps that had bunch of settings to make them look more less plausible, but honestly it was quite cumbersome to work with.

Raytacing is actually so great for image rendering, that as soon as computers were able handle it, pretty much all render engines have adopted it. GI was one of the last significant additions to raytracing and from there on, software developers were trying different ways achieve the best speed/precision/user friendliness ratio for their renderer. Some peeps needed it to be quite fast, ready to sacrifice some precision - and there you have photon maps. Some time later other folks said, no no, this sucks, we want maximum precision for our top productions, and we don't care that much about render speed - and there you have pathtracing. At it's beginnings it was ridiculously slow. In realtime engines you've got tricks like screen space effects, importance volumes, pre-baked GI, etc. that help to make things run real fast, but these are also low precision raytracing algorithms. Pretty much everything nowdays in terms of 3d rendering IS raytracing. Pathtracing is just one of many possible ways how to use it.

This is just a very vague explanation with unhealthy amount of simplification. Rendering algorithms is a huge topic that you could read a pile of books about to fully understand it (I haven't, so my apologies if some of the things I wrote are not entirely correct)

anyways, hope it helped you to clarify some basic things. 

cheers, D.

 

Edited by davpe
Link to comment
Share on other sites

That's one great explanation! Thanks for taking the time and the effort man to clarify things for me, much appreciated!

I'm new to Lighting and Rendering, and i always like to understand things from the ground up, to understand how the tools i use work before diving deep into them. Most of what you said, i have read some way or another, but things weren't that clear to me.

I didn't know micropolygon rendering is rasterisation (even though now it makes sense, cuz rasterisation is all about drawing 3D polygons on 2D images as far as i know), but i dunno why it's good for hair and volumes and stuff like that tbh.

I guess i could start dealing with the fact that i'm using PBR unless i need sth really specific with Raytracing (dun need to know further details so far), i just thought that there was a huge leap from raytracing to pathtracing when it came to GI, but when i tried the same scene with both, the differences are insignificant, so i guess it's not that much of a leap or sth.

If you can point me towards a course/tutorial/book that might help me understanding all these technical stuff from the ground up, i'd be grateful.

Link to comment
Share on other sites

yeah, like in 99% of cases you want to use pbr. raytrace mode pretty much only if you need to have shader data wired into Cf output, instead of using F or layer, for some reason (those are pbr).

rasterization being more efficient with hair, detailed displacements and that kind of stuff is a sampling thing. when raytracing hair, or any kind of really small geometry details, you have to use a lot of samples to properly draw those details without any sort of flickering. rasterization works differently and is more efficient for that kind of tasks (don't  ask me details here :) ). but nowdays raytracers are good enough to handle this fine too and its benefits heavily outweight slower sampling. 

but if you have something like sparks with long motion trails for instance, you will still do MUCH better with micropolygon engine, as it's only about motion blur with very simple shading (depends on the scene but talking about 1 min with micropoly vs 1 hour with pbr, that kind of difference). in cases like this Mantra is really an ass saver bcs few renderers today still offer rasterization (i guess only renderman).

same deal with large scale volumes. you'd have to use shadow maps and no GI which makes lighting it a bit harder, but otherwise simple shading and a shitload of displaced geometry with motionblur makes it also an ideal candidate for rasterization. render time difference can be again a matter of minutes instead of hours per frame, so it's worth considering. 

unfortunatelly i don't really know about any good lighting tutorials that would go into such kind of details. you can watch some rendering masterclasses available on sidefx web page. those might contain some good info in detail. 

btw it's worth noting Mantra is kinda specialty renderer and sort of lives outside the mainstream. that is a good thing for some heavy duty stuff, or renders that rely on complex procedural shading, but can be also a bad thing as it's much harder to get into it , and expects you to do many decisions yourself that other renderers are trying to handle automatically. that means it gives a lot of room to optimize, and do stuff other renderers can't do, but it's also easy to set it up very wrong, and get insane render times and bad quality at the same time. not great, esp. when you starting out and dont know whether this is a normal behaviour or something's off. even setup correctly, Mantra is designed to be rather robust and flexible, than easy to use and fast running. just saying this as you mentioned starting out with lighting and Mantra is not a typical representative of contemporary renderers so to speak :) also it's not planned to be developed to the future (will be replaced with Karma once that's mature enough). so these might be some factors to consider.

cheers.

you can also check out this article for some Mantra tips:

https://vfxbrain.wordpress.com/2016/03/16/mantra-tips/

Edited by davpe
Link to comment
Share on other sites

I understand now. I'm already reading everything about Mantra in Houdini docs (the one most underrated place to get info from imo :D).

And i didn't jump into Karma yet or Solaris or anything new, just waiting for them to become stable enough and fully documented and widely-used before i make that move.

Can't thank you enough, that helped a lot.

Cheers.

Link to comment
Share on other sites

One more thing, I didn't really care to learn another engine since i know to each their ups and downs and i wanted to learn the craft first before mastering one tool or another, but since you said Mantra is a bit different than traditional engines, if you would suggest i would learn one more engine besides Mantra, what would that be?
Most people i see use Houdini jump either to Redshift or Arnold, i hear Redshift is very fast once u have a good GPU and also has this GPU to CPU Ram switch thing when ur VRAM is maxed out (but maybe not good with complex scenes, that's where Mantra kicks in), so they kind of complete each other. Also, Arnold is really good with volumes and stuff (but i think Mantra is too). Maybe Renderman cuz it's in Houdini already?

Would love to hear your opinion.

Link to comment
Share on other sites

47 minutes ago, Omar Wanis said:

One more thing, I didn't really care to learn another engine since i know to each their ups and downs and i wanted to learn the craft first before mastering one tool or another, but since you said Mantra is a bit different than traditional engines, if you would suggest i would learn one more engine besides Mantra, what would that be?
Most people i see use Houdini jump either to Redshift or Arnold, i hear Redshift is very fast once u have a good GPU and also has this GPU to CPU Ram switch thing when ur VRAM is maxed out (but maybe not good with complex scenes, that's where Mantra kicks in), so they kind of complete each other. Also, Arnold is really good with volumes and stuff (but i think Mantra is too). Maybe Renderman cuz it's in Houdini already?

Would love to hear your opinion.

this is really hard to answer. as you said yourself, every renderer has it's ups and downs. first of all, i was not trying to discourage you from learning Mantra. I use mantra very often, but it depends what you want to do with it and how much render power you have.

if you wanna render animations using your home computer then speed will be the most important thing to look at, and Redshift would make a lot of sense. renderman is great, quite similar to mantra actually, but also quite slow. personally, i'm not a fan of arnold to be honest. it's slow too, poorly implemented in houdini, costs $800 i think and it doesn't offer anything more than renderman, which is free. then you have v-ray which is pretty good all around renderer, it can run on both cpu and gpu, and its quite fast.

I'd recommend you to take a look at all of them, try a demo and you will see what suits you best. there are no bad choices really, only personal preferences.   

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...