Forums

You are not logged in.

#126 2011-07-07 23:51:31

yogesh
Member
Registered: 2008-03-21
Posts: 15

Re: Point Cloud Uber Shader

Thanks daddysauce for providing the work flow,which would be quite helpful to more people who are new to 3delight.
I hope soon we will see more people sharing their tutorials and workflows.


As I heard usually ptc files are quite big in size so Is their any Mel script available which would delete the ptc file generated once the whole process is over to optimize space while rendering a sequence.

How can we convert it to brickmap and automate the whole process for an animation sequence.

Thanks again Daddysauce

Last edited by yogesh (2011-07-07 23:56:32)

Offline

 

#127 2011-07-09 00:36:02

janak
Member
Registered: 2009-12-11
Posts: 13
Website

Re: Point Cloud Uber Shader

Is it possible to get reflections from an HDRI map (tdl:ed or not?) in the glossy reflections? At the moment I'm only getting reflections from the geo that's been baked into the point cloud?

Thanks!

Offline

 

#128 2011-07-09 04:28:58

cleger
Member
From: Georgia
Registered: 2010-09-27
Posts: 192
Website

Re: Point Cloud Uber Shader

Put it in the environment channel (will have to be a .tdl).

Anything that doesn't hit geometry will take it from the HDRI.

Offline

 

#129 2011-07-11 09:41:23

janak
Member
Registered: 2009-12-11
Posts: 13
Website

Re: Point Cloud Uber Shader

Doh, my bad! Already had it going in there (just had too much blur). Would it be possible to set the "distance" to the HDRI? Since the reflections gets blurrier the further away they are it would be cool to be able to say how far away the "environement" is to control how blurred it gets? Makes sense? :-)

Offline

 

#130 2011-07-11 17:45:55

cleger
Member
From: Georgia
Registered: 2010-09-27
Posts: 192
Website

Re: Point Cloud Uber Shader

I'm not even sure if the PTC method with geometry does that. Although, I haven't used that part of it much. I'll keep that in mind.

Offline

 

#131 2011-07-16 03:49:10

janak
Member
Registered: 2009-12-11
Posts: 13
Website

Re: Point Cloud Uber Shader

Looks like it does. However I'm having problems getting the environment anything else than really blurred? In this image I have a tdl in the env slot and glossy reflections.

http://fatlittleindianboy.com/dump/ptcUber_test.jpg

Is there a way to bake out stuff that's not visible through camera into a point cloud? So that I don't get stuff like the checkered ground just being cut off like this?

Offline

 

#132 2011-07-16 21:19:22

cleger
Member
From: Georgia
Registered: 2010-09-27
Posts: 192
Website

Re: Point Cloud Uber Shader

Might be able to use coordinate spaces to change the way the background blurs?

Yes. With the two passes, in the first pass you bake out using a different camera, a camera that sees everything in the scene. The attributes just make it so that the backs of objects are baked out as well. It will still only bake out what the camera sees. Thus, in the baking pass you should use a camera that can see everything you want baked.

Offline

 

#133 2012-01-03 07:58:27

cleger
Member
From: Georgia
Registered: 2010-09-27
Posts: 192
Website

Re: Point Cloud Uber Shader

The original shaders posted on the first page have been updated. I've fixed some transparency and baking related issues I ran into in production. Also, I've broken the uber shaders into some of the more popular effects to have the option of a smaller, more specialized shader.

They are located and will be updated from here: http://blog.cameronleger.com/code/many- … d-shaders/

Offline

 

#134 2012-01-05 00:35:42

janak
Member
Registered: 2009-12-11
Posts: 13
Website

Re: Point Cloud Uber Shader

Cool, glad to hear that you're still working on and even better- sharing this stuff! I was just thinking the other day that with the new implementation of ptc rendering I should be able to use your excellent shaders for glossy ptc based reflections and stuff. Even more reason to try that out now!

Cheers!

Last edited by janak (2012-01-05 00:36:45)

Offline

 

#135 2012-01-05 04:57:42

cleger
Member
From: Georgia
Registered: 2010-09-27
Posts: 192
Website

Re: Point Cloud Uber Shader

Good luck. Let me know how the workflow goes, I've yet to try it.

I'll have yet another fix for atmosphere shaders and transparency later (getting around a bug).

Playing with SSS now, latest shader has presets for the materials described in the BSSRDF paper. Looks great.

Offline

 

#136 2012-01-05 07:36:47

clojster
Member
From: Prague
Registered: 2010-12-22
Posts: 108
Website

Re: Point Cloud Uber Shader

Hi Cameron,

thanks for sharing your shaders with us. Really nice!

Since you are testing SSS now - did you try your shaders with miss_fast_skin shaders? I don't know why, but it works with built-in PTC GI in 3delight, but with your shaders, objects with miss_fast_skin on them aren't included in GI and IBL computations. (They are baked into PTC though).

Also - would you share how to use PTC SSS? Do we need to assign subsurface geo to objects? What maya/mr shaders are supported? And how do you control parameters and looks of for example doing skin with PTC based SSS?

Cheers!

Offline

 

#137 2012-01-05 12:32:07

cleger
Member
From: Georgia
Registered: 2010-09-27
Posts: 192
Website

Re: Point Cloud Uber Shader

Hi!

I have not tried with miss_fast_skin. I'll make a note to try it with that. You're saying the SSS color from miss_fast_skin is baked, but not bounced onto other things? Also, is this with the atmosphere or light shader?

PTC SSS is really simple. The extra attributes that have to be used to compute SSS are not needed, these are specified in the shader. You can use it like any other effect in my shaders. I only ever use standard Maya shaders in my renders, except I have used mia_material_x without problems.

The values are a little different for SSS though. There are a few main "look" tweaks. IOR should almost always be 1.3, except when simulating marble it should be 1.5. The presets use numbers from the paper describing BSSRDF. You should be able to pick one of them and then only have to tweak scale, depending on your scene size. If you pick custom, you can use your own values. The default values in the custom section are those of the skin1 preset. If you want to see the values for the other presets you can look in the shader code for them.

Offline

 

#138 2012-01-06 01:58:43

clojster
Member
From: Prague
Registered: 2010-12-22
Posts: 108
Website

Re: Point Cloud Uber Shader

Well, SSS color from miss_fast_skin is baked, but doesn't RECEIVE any IBL or bounces from other objects. I'm not sure if it's bounced onto other things.
Surely even AO is not computed for miss_fast_skin.
I'm using atmosphere shader for baking and light shader for color bleed. I tried Uber shader and now also your new separate shaders.

The PTC SSS works like a charm, but how do you specify which objects are gonna be affected by it? Since it is light shader it's computed for all objects in the scene...

Offline

 

#139 2012-01-06 03:13:07

clojster
Member
From: Prague
Registered: 2010-12-22
Posts: 108
Website

Re: Point Cloud Uber Shader

ok, never mind the last question... I tried light linking and it works :)

Offline

 

#140 2012-01-06 03:48:05

cleger
Member
From: Georgia
Registered: 2010-09-27
Posts: 192
Website

Re: Point Cloud Uber Shader

In that case, I'll take a look at that and the various other MR shaders to see if there's a problem.

Offline

 

#141 2012-01-09 10:50:23

Map of Emergence
Member
From: Rome, Italy
Registered: 2011-01-08
Posts: 10
Website

Re: Point Cloud Uber Shader

Hi Cameron,
  finally I had some time to experiment with your shader, and I was pleasantly surprised how easy it was to use (for the very basic functionalities, at least; I just tested AO and color bleeding with the volume shader, by now).
I'll add my voice to the choir, then, in thanking you for the nice work and, above all, for sharing it.
Though, after taking a glance at your code, there are a few things I can't really get, both regarding the code itself and something you wrote on this forum thread and your website.

  ::
 
  The first thing is at line 661 of the volume shader (in the most recent version on your website), within the GI_AO condition:
 

Code:

aov_AO = Oi*1-occlusion(  //because we set aov_AO to 1 earlier, we subtract the occlusion from 1

I'd guess it should be, instead

Code:

aov_AO = Oi * (1-occlusion(

In fact, that should be the same operation you do within the basic AO condition; am I wrong?
Also, what do you mean exactly by "because we set aov_AO to 1 earlier, we subtract the occlusion from 1"?
As far as I interpreted it, line 661 means:

aov_AO = the inverse of occlusion amount, premultiplied by the shaded point's opacity.

where, I thought, the "inverse of occlusion" is just a convenient way to store the occlusion pass, for compositing purposes, without inverting it later on. Is there something I got wrong?

  ::
 
  Another thing I can't understand is at line 691, whithin GI (and GI_AO) composite's condition:

Code:

Ci += aov_GI * aov_AO; // Since we're doing AO and GI at the same time, multiply them onto each other, because we set aov_AO to 1 earlier, if there's no occlusion, it's multiplied by 1

I'm not exaclty sure that this is the way it should be. I might be wrong, as I don't have a deep knowledge of compositing but, as far as I know, AO shouldn't be multiplied just by the GI.
I would have expected something like:

Code:

Ci = (Ci + aov_GI) * aov_AO;

But that is just if I got what GI_AO is intended for, otherwise I'm totally missing the point (which is equally probable).
I Thought it was some sort of AO's alternative, as it performs the same operation. But I can't get what the purpose of such an alternative is. Can you please explain that? (If the reason regards rendertimes, just ignore this last question and see the next point).

  ::
 
  Regarding rendertimes, on the very first post of this thread you said

cleger wrote:

[...] AO added 60 seconds. GI added 72 seconds. Rendering those separately would give you two sets of normal images and GI and AO, at 372 seconds. [...] Also, if you're using GI and plan to use AO as well, it's best to turn on the AO for GI. They'll both be calulated at the same time and it will save a lot of rendertime

But as I said above, I can't really see the reason why you should go for GI_AO instead of AO. When saying "rendering those separately" did you mean in two separate render passes, or using AO instead of GI_AO (together with GI) within the same pass?
In the former case I'd expect a "loss" in rendertimes, but I supposed this was caused by computing twice the lighting loops and, maybe, in loading twice the same PTC. Again, I might be wrong as I do not have a deep knowledge about how the renderer works (and I'd ask anybody to enlighten me about this, if possible).
In the latter case, instead, I must say I didn't experience the same thing. I've tried both the AO and GI_AO options and got exactly the same rendertimes (as I expected it to be, given the fact that the same code is executed, even though at different lines within the shader). I didn't get the same results in the composited render, though, mainly for the reasons I mentioned above.

  ::

  To conclude, if I misunderstood the way GI_AO is intended to be used, I would ask you to shed some light on that.
Otherwise, I would ask if it weren't someway simpler to get rid of the GI_AO and just use the normal AO option, provided GI's operations (or even just the compositing snippet) appear before the ones for AO, so that

Code:

Ci *= aov_AO;

is always computed after

Code:

Ci += aov_GI;

Please excuse me for being so long (I just wanted to be sure that my doubts were clear enough), for my bad English, and if my questions will turn out to be just noobly dumb.
 
Thanks again,
s


if you're the least noob in the room, you're in the wrong room

@mapofemergence on twitter

Offline

 

#142 2012-01-09 12:37:59

cleger
Member
From: Georgia
Registered: 2010-09-27
Posts: 192
Website

Re: Point Cloud Uber Shader

Hi Map of Emergence,

You raise some valid questions, so here's my responses (numbered in order of the questions)

1)
The whole GI_AO section might be unnecessary (in its current implementation) in the first place. You're right, there should be a parenthesis there to separate the math operations. The way I understood it at the time of the writing was that computing AO and GI at the same time were faster than computing them at two separate times. After reading more lately, I think that I have to include more parameters in the indirectdiffuse() call to calculate AO with that, rather than how I'm doing it now. You can ignore the GI_AO section for now, in that case.

When I said "//because we set aov_AO to 1 earlier, we subtract the occlusion from 1" I think I meant something different. Yes, it is for compositing easier to invert it now, but I set aov_AO to 1 so that when it was multiplied by something like GI, if we didn't compute aov_AO then GI would still be normal.

2)
Again, math and parenthesis. Your way is correct (I normally set it to not composite and do everything in post).

3)
Again, the whole GI_AO section might have been implemented wrong at the time. And I did mean separately.

4)
As I've said, the whole GI_AO section might have been implemented wrong at the time. I see this for indirectdiffuse() in the newest manual:

"Computing the occlusion while calling this function is also possible (through the occlusion parameter), with the following restriction: indirectdiffuse() only sees geometry tagged as visible to reflections, as opposed to occlusion() which sees geometry visible to shadows. For more informations about visibility attributes refer to Attributes."

By looking at an example 3Delight GI shader, I see an argument getting passed to the "occlusion" parameter that later gets used like AO. However, under the parameters documentation, it says:

"If specified, it is set to the fraction of the sampled cone which was occluded by geometry."

So, I can test that out and see if that was indeed the idea that I was after (and if rendertimes are faster using that or AO and GI separate).

Offline

 

#143 2012-01-09 15:18:17

Map of Emergence
Member
From: Rome, Italy
Registered: 2011-01-08
Posts: 10
Website

Re: Point Cloud Uber Shader

Cameron, thanks for replying that quick; you made the whole thing much clearer and helped a bit my nerdish self-esteem, too :)

cleger wrote:

"Computing the occlusion while calling this function is also possible (through the occlusion parameter), with the following restriction: indirectdiffuse() only sees geometry tagged as visible to reflections, as opposed to occlusion() which sees geometry visible to shadows. For more informations about visibility attributes refer to Attributes." [...]
So, I can test that out and see if that was indeed the idea that I was after (and if rendertimes are faster using that or AO and GI separate).

I guess it is, and it sounds nice, indeed.
I'll look into it, too, right after testing all the other features you already provided. I hope I'll come out with something useful to share as well, in the next future.

Cheers,
s


if you're the least noob in the room, you're in the wrong room

@mapofemergence on twitter

Offline

 

#144 2012-01-10 04:49:54

cleger
Member
From: Georgia
Registered: 2010-09-27
Posts: 192
Website

Re: Point Cloud Uber Shader

No problem. Although I'm not constantly working on this, I'm on these forums pretty regularly.

I don't doubt that you will. The initial version of this shader was put together whenever I was in my first month of using 3Delight.

Offline

 

#145 2012-01-12 11:39:21

fredlb
New member
Registered: 2011-10-19
Posts: 2

Re: Point Cloud Uber Shader

First, thanks for this great shader :)
Is there any way to combine photonmapping with this shader (like how the built in GI solution works for multiple bounces)?

Offline

 

#146 2012-06-18 10:30:45

d16e45a
New member
Registered: 2012-06-15
Posts: 2

Re: Point Cloud Uber Shader

hi, i have problems installing the uber shader ptc , t doesnt appear in the 3delight shader selector when i select it, whats wrong??

Offline

 

#147 2012-06-26 01:54:45

shidafu
New member
Registered: 2012-06-25
Posts: 2

Re: Point Cloud Uber Shader

I have pragma annotations for just about everything. So, everything is grouped into categories. In each category of functionality, you have the values at your control for the effect. The values are given "nice" names and have tooltip descriptions of what the value does, and in some cases, the best and/or default value.

The shader includes AOVs for each pass. Each pass will render out the normal image with the effect you've chosen on top of it. You can also use AOVs to render out the image before the effects and the bare effect for compositing. The specific AOVs are documented inside of the shader, but I'll also list them here.

Offline

 

#148 2012-06-30 11:46:43

ruchitinfushion
Member
From: Mumbai/India
Registered: 2010-07-16
Posts: 74

Re: Point Cloud Uber Shader

Volume Scattering

Is this possible to bake PTC of maya fluid with Multiple Scattering using 3Delight???
http://renderman.pixar.com/view/fluids

Offline

 

#149 2012-08-08 04:51:50

Delighter
Member
Registered: 2012-06-15
Posts: 42

Re: Point Cloud Uber Shader

Cleger, I'm using your shaders and enjoying them a lot.
However, I have objects with transparency mapping on them, and when I watch them in the ptcviewer the points seem to be not black, but dark gray.

This doesn't seem to be a problem for ao, but I'm seeing my object where it should be transparent using GI.
Am I doing something wrong? Your shaders seem to work for every other task and are even hard to get by without.

Thanks in advance!

Offline

 

#150 2012-08-08 09:40:59

cleger
Member
From: Georgia
Registered: 2010-09-27
Posts: 192
Website

Re: Point Cloud Uber Shader

@Delighter: Have you tried using the Global Illumination settings in the Render Pass? You can use that with the PTC method to bake out a PTC which you can then turn off and use that PTC with my shader.

That would help figure out where the problem lies.

Offline

 

Board footer

PunBB is © Copyright 2002–2005 Rickard Andersson

You are here: Resources » Forums
Follow us on Twitter
© 2006-2011 dna research. All Rights Reserved.
Trademarks & Copyrights Notices