Forums
You are not logged in.
#27 2010-10-20 03:46:34
- allmendinger
- Member
- Registered: 2010-09-15
- Posts: 19
Re: Point Cloud Uber Shader
Just a simple question. Can a fur setup like one with shave benefit from this PTC approach ? Will this maybe give some GI effects without the need of raytracing ?
Offline
#28 2010-10-20 06:27:53
Re: Point Cloud Uber Shader
ZiG: Pretty soon (whenever I'm done with it) I'll have a scene that demonstrates each effect with documentation. Are you still having problems with it? Do you want to do both at the same time or just two different examples?
allmendinger: I haven't experimented with GI effects with fur with or without raytracing, but it's on my list. I tried out this shader in an earlier test with Shave And Haircut on a character, but at that point the hair came out pure white in every pass. It had something to do with the normals. I've changed the way the normals in the shader work in the newest update, but I haven't used it with S&H yet. You can try it out if you want. If it's pure white, it has to do with the normals. Search the forums for using shaders on fur. I'm sure you just have to change the normal to the hair normals, which are different in that they act like sprites and all face the camera exactly.
Offline
#29 2010-10-20 15:57:08
Re: Point Cloud Uber Shader
"ZiG: Pretty soon (whenever I'm done with it) I'll have a scene that demonstrates each effect with documentation. Are you still having problems with it? Do you want to do both at the same time or just two different examples?"
Thats cool, thank you very much for your help.
Well, now what i am doing is generating the PTC, without any reflection, and then reading it back and rendering with reflection, as i have no idea how to bake the reflections hehehe thats why i asked for some exemples. The same thing with SSS. I would like to render everything together, for example, lets say a car, in front of tree, you would have some reflections (glossy or not) and some SSS for the leafs.
Offline
#30 2010-10-20 16:30:37
Re: Point Cloud Uber Shader
You can do that two ways. With the light or atmosphere version of the shader.
What you need to do is bake out everything, but don't put any reflections on the car.
Then, to read it back in, assign a separate light/atmosphere shader to the car and the leaves. So, leaves would have ptc_uber1 and car would have ptc_uber2.
Then, in ptc_uber1 for the leaves turn on sss and read in the ptc, and in ptc_uber2 for the car turn on glossy reflections and read in the ptc.
You can optimize it if you want. For example, only bake out the stuff you will be able to see in the reflections. Or, bake out a separate ptc with only the leaves and have the leaves read that ptc in and the car read in a separate ptc with everything it needs to reflect.
So many possibilities =]
Offline
#31 2010-10-20 19:09:21
Re: Point Cloud Uber Shader
well, i did a test following your suggestions, the only thing that i could make it work was using the volume shader, was the reflection occlusion. The strange thing, is that using the volume shader to render, only the reflection occlusion works, and the color bleed renders just like it was an occlusion, with no color at all. All the other effects dont work.
And when using the light shader version, it renders the color, but without the bleed effect. Also, all the reflections mode dont work.
And im also getting this message:
3DL ERROR T2373: cannot read 3D texture file '' (Invalid argument) (in shader 'ptc_uber' on object '|logo|v_contorno|v_contornoShape')
3DL ERROR R5030: error reading from point cloud file '' (Invalid argument) (in shader 'ptc_uber' on object '|logo|v_contorno|v_contornoShape')
Offline
#33 2010-10-21 07:54:43
Re: Point Cloud Uber Shader
simple scene, a plana, and a sphere, using only lambert materials.
Using the volume shaders, one pass to bake, one pass, to render.
http://img801.imageshack.us/img801/4840/screenbv.jpg
Thank you.
Offline
#34 2010-10-21 10:08:19
Re: Point Cloud Uber Shader
What are you using the reflection occlusion for?
That essentially gives the same look as occlusion but from the reflected angle. So, it's pure white if it reflects something and pure black if it doesn't. That's why that render is so white. Are you trying to use GI and glossy reflections perhaps?
I haven't done extensive testing with multiple options at the same time yet. I think for that, unless you need it to output passes, your best bet for using two effects at once is to use the light shader. Make a light for GI and then a light for glossy reflections which is only linked to whatever has glossy reflections.
Also, the reflection occlusion isn't composited on top of the image, I think I just made it output the direct result. Therefore, the renders would be all white with little black. I haven't seen a use for reflections occlusion other than seeing what areas of your objects are reflecting things, therefore I only intended that for looking directly at the RO pass.
So, you can turn off reflection occlusion and turn on glossy reflections (assuming that's what you want) at the same time as GI and see if that's what you want. If that doesn't work, go with what I said to do with using a different light for each effect.
Offline
#35 2010-10-21 11:44:08
Re: Point Cloud Uber Shader
"What are you using the reflection occlusion for?"
Was just testing.
I think theres a problem with the shader, volume version, its not baking the color information out.
I did what you suggested, to have multiple effetcs rendered at once, using the light shader, but as i said, using the volume shader, to bake all the info out, its not baking the color information.
I did a test using an old version of a volume shader created by baopao, to bake the color information to PTC, and then i rendered the scene using your light shader and the color bleed effect worked. But no way to make the glossy reflection work.
Thank you
Offline
#36 2010-10-21 15:00:46
Re: Point Cloud Uber Shader
Did you select to include color information? What version of Maya are you running, and is it the same exact scene you're testing on? Also, check in the COLOR tab under BAKING, and see if the values there are not 0. I'm curious because it was working for me, and I've used it on Maya 8.5 for Mac, Maya 2010 for Windows, and Maya 2010 for Linux.
Offline
#37 2010-10-21 16:27:37
Re: Point Cloud Uber Shader
Im using Maya 2011, windows x64.
For the bake shader, under the Main tab, Bake PTC Map is checked. everything else not checked.
Then under Baking tab, Bakecolor/area data check, location for the ptc file set to local harddrive directory, and a file name with ptc extension.Still, theres no color information, when viewing the ptc file with ptcviewr. All materials are Maya standard materials, lambert, blinn etc.
Thank you
Last edited by ZiG (2010-10-21 16:28:15)
Offline
#38 2010-10-22 10:30:06
Re: Point Cloud Uber Shader
I would ask you to post the scene, but I don't work on Maya 2011 and going backwards from 2011 is sort of a problem area.
What I'll do is, I'll make a working scene where it bakes out color information, and then reads it back in to two different shaders to do SSS and glossy reflections, and then post it back here with a render of it.
Then, if you get the same result, all is well. If not, there's something weird going on possibly with 2011.
UPDATE: I think I found the problem.
The way I was compositing the reflections is reversed from how it was when I set the default value, so right now, a reflection value of 1 is off and 0 is all the way on.
Either way, here's the scene.
Override atmosphere shader on the baking pass bakes out the data.
Override on the sphere on the rendering pass uses glossy reflections
Override on the torus on the rendering pass uses glossy reflections.
Override on the point light on the rendering pass uses GI.
You might have to go into each shader whenever you open the scene and change the PTC file path to the correct path for your computer, I'm on a Windows computer right now, using Maya 2010.
www.cameronleger.com/test.rar
Offline
#39 2010-10-23 14:54:23
Re: Point Cloud Uber Shader
Hello cleger, just to let you know everything is working fine now. Thanks for the scene.
PS:will post an image here, to show the effecs working as soon as possible
Again thank you very much.
Offline
#40 2010-10-25 06:47:21
- caveman
- Member
- From: Mumbai
- Registered: 2009-12-15
- Posts: 100
Re: Point Cloud Uber Shader
Hey Cleger
Just a suggestion
You can make a screen capture tutorial of this wonderful shader .. of how to use it and all so it would be clear to everyone how to use this wonderful shader ..
Sushant Acharekar
Offline
#41 2010-10-25 08:51:56
- allmendinger
- Member
- Registered: 2010-09-15
- Posts: 19
Re: Point Cloud Uber Shader
Hello all,
so after i had a look at clegers Maya File (thanx for that) it came up that i overall have no idea how to use the PTC stuff.
So lets assume i have a scene which i set up to render fine with lambert/phong materials, have a coordinatesystem as dome with hdr on it, using GI in the renderpass...
how would that now adapt to the PTC approch ? Cause what i understand so far is that all materials i use are replaced by the uber shader. Where are my bumpmaps and so on ? or special material definitions ?
Maybe someone has time to explain me the overall practical approach of PTC, how it is used in a existing maya scene and so on, that would really help me!
Thanx very much!
Offline
#42 2010-10-25 10:30:51
Re: Point Cloud Uber Shader
@Caveman: I thought about it, but for now I just don't have the time. I won't forget about it though.
@allmendinger: All materials aren't replaced by this shader, that's the beauty of using a light/volume shader for it. The light shader computes at the same time as the other surface shaders and the volume shader happens after all surface and lighting calculations.
I would set the scene up like normal with the shaders you want. Use the atmosphere shader and select baking, set the output path, and change it to color. Follow the instructions at the top of the shader (or use the shelf button I supplied in the first post) to make sure your render pass settings are correct. Render that to get the PTC.
Then, apply another atmosphere shader to a different pass and set it to use GI. Set the PTC path to the path of the file you baked out, and then set the environment path to the path of the .tdl (which can be made from an HDRI using the files in $DELIGHT/bin/ and that should render.
In that case, the way indirectdiffuse works, if a ray doesn't find an object to get it's information from, it will use the supplied image map. So, for a closed off scene nothing much will happen, but you should really tell from a sphere on a small plane.
Offline
#43 2010-10-25 11:41:44
- atomicx
- Member
- Registered: 2008-01-11
- Posts: 23
Re: Point Cloud Uber Shader
I was able to resolve my issues with Maya 2011. The default of using both hitsides for either AO or IBL will create strange artifacts. Perhaps using both faces for hitsides is only applicable for transparent materials?
Another issue is that I must have the full output path created for the ptc bake pass. For some reason it will not automatically create a ptc folder in the location specified, I must manually create it.
Great work cleger. You have created a very useful shader!
Offline
#44 2010-10-25 12:39:05
Re: Point Cloud Uber Shader
Atomicx you are correct. This shader will not create the directory structure for the ptc file, it must already be there. Although tokens still work, so the full path isn't necessary.
I have a script that builds a complete directory structure for each project I work on, and I just included the /3delight/ptc folder so it's always there. Then, in the shader, I have the default to /3delight/ptc/<scene>.#.ptc and it works.
I'll probably change the hitsides default to front for most of the things in the next update. Now that I think about it, it doesn't make sense it always have it like that.
Offline
#45 2010-10-26 02:06:15
- allmendinger
- Member
- Registered: 2010-09-15
- Posts: 19
Re: Point Cloud Uber Shader
Thank you cleger, now i got it.
Shave is still rendering black with ptc
Offline
#46 2010-10-27 02:55:52
- caveman
- Member
- From: Mumbai
- Registered: 2009-12-15
- Posts: 100
Re: Point Cloud Uber Shader
@ cleger
I have having some issues with the AOVs from the light shader..
I guess I must have skipped some posts out here..
but I am not able to generate AOV's from the light shader its working well with the atmospheric shader that you had created earlier...
in the display tab I have put " color aov_AO "to generate ambient occ.
Have you by any chance disabled the AOV outputs in the light shader ?
Also i am not able to get rid of the edge line problems..
Tried adjusting the bias and the Sample Base.
Sushant Acharekar
Offline
#47 2010-10-27 10:12:25
Re: Point Cloud Uber Shader
I also have trouble getting rid of white lines. I've gathered that it's a combination of: PTC Density, Edge Bias, Sample Base (which seems to do nothing at all), and maybe an artifact of using both sides for hit sides. Try using Front for hitsides and let me know.
Also, yes. I think I wrote it in the top documentation of the light shader but currently implementing custom AOVs via the light shader involves putting the custom AOVs into each shader in the scene, 3Delight Compiled and Maya Hypershade. Unfortunately, I'm not going to do that (each person who downloads the script and wants to use custom AOVs would also have to). You could try separating them into passes, so for a GI pass the only active light is the GI light shader, but you lose the ability to render them all at once and save time.
Offline
#48 2010-10-27 22:23:05
- caveman
- Member
- From: Mumbai
- Registered: 2009-12-15
- Posts: 100
Re: Point Cloud Uber Shader
cleger wrote:
I also have trouble getting rid of white lines. I've gathered that it's a combination of: PTC Density, Edge Bias, Sample Base (which seems to do nothing at all), and maybe an artifact of using both sides for hit sides. Try using Front for hitsides and let me know.
Also, yes. I think I wrote it in the top documentation of the light shader but currently implementing custom AOVs via the light shader involves putting the custom AOVs into each shader in the scene, 3Delight Compiled and Maya Hypershade. Unfortunately, I'm not going to do that (each person who downloads the script and wants to use custom AOVs would also have to). You could try separating them into passes, so for a GI pass the only active light is the GI light shader, but you lose the ability to render them all at once and save time.
@ cleger
Yes even I had to increase my point density from ( 1 to 0.2 ) in order to get rid of the white edges but its doesn't get rid though completely ..
Are you suggesting we use 3Delights renderman code in the hypershade to get the custom AOV's because I have no idea how to use that,actually its just been a month that I have actually started to see this software..
Sushant Acharekar
Offline
#49 2010-10-28 06:20:47
Re: Point Cloud Uber Shader
You might be able to do it that way but the way to add them I was thinking of was going into each .sl of each shader you're using and adding them. There might be a better way, like adding it into the header files so each compiled shader gets it added.
But, if you look earlier in this thread, in the newer minor versions of 3Delight there's a easier way than adding them on a per-shader basis.
Actually, here's the way to do that. This will only work if you're using 9.0.13 or higher.
You'll have to re-add the aovs. They're already declared, so they only need to be added in the {} shader section.
For each section, you'll see "Cl = effect stuff". What you need to do is replace Cl with a color variable. So, for each section, ie GI, you add:
varying color = GI_result;
And then change the Cl for that section to say "GI_result = effect stuff". At the end of each section, before "Ol = Ol", add:
Cl = GI_result;
Then, at the beginning of the shader section, right after "{", add:
outputchannel( "aov_GI", GI_result);
where aov_GI is the AOV to render and GI_result is the name that you exchanged Cl for.
This should work, although I haven't tried it yet. Also, that's only for the light shader. You'll still use:
color aov_GI
Under displays to get the result.
Also, it might be possible to use this shader for Shave&Haircut by changing the normals of each effect to N_Srf and saving it under a new name to use for fur.
Last edited by cleger (2010-10-28 10:30:44)
Offline
#50 2010-11-01 09:24:16
- Kabukky
- Member
- Registered: 2010-05-27
- Posts: 11
Re: Point Cloud Uber Shader
One more question:
When using your atmosphere shader, how would I change the IBL intensity? My results are all a little too darkly lit..
Thanks
Offline

