Jump to content

Surface Uber Shader


slayerk

Recommended Posts

Hi! I made some change in Surface Uber Shader.


// Version 0.66
// 02.10.2012
// Added export Diffuse, Specular per-light
// Version 0.67
// 03.10.2012
// Added Opacity By Fresnel. (Can by helpfull for compositing then use opacity on object without refraction)
// Version 0.68
// 05.10.2012
// Added Export Position and Normal in world transorm (Can by helpfull for Relighting)[/CODE]

[CODE]
export vector exportPosition
export vector exportNormal[/CODE]

shader.zip

Edited by notawhale
Link to comment
Share on other sites

Unfortunately I wouldn't quite know where to start with PBR. I've done a little bit with it by extending exist shaders in VOPs, but that was really simple. In code I wouldn't know what I need to fiddle with. Have you tried PBR in H12? I have been blown away at how fast it is, at least so far. Anyhow, I'll keep fiddling with it!

Link to comment
Share on other sites

The whole point behind this shader is to use micropoly scan-line biased rendering with all the point cloud bells and whistles to avoid casting any rays at all and implementing fast GI methods to keep render frames in check.

PBR does it's own unbiased render thing and is a completely different beast with no illuminance loop what so ever.

The default Mantra Surface shader incorporates some shared shading models between the biased (pbr) and unbiased (micropoly and raytrace) render engines in Mantra but with all things like this, there are some compromises set. I'd say that PBR is winning the decisions in the Mantra Surface shader wrt optimizations and development imho.

This is where this shader shines in it's complete support of biased rendering and GI techniques. I love it! It certainly cuts against the current trend toward unbiased rendering.

Now we need a complementary no holes barred PBR shader with complete disregard for biased rendering as well, with it's own unique terminology completely separate from the biased shader. Specular (biased) vs Reflection of Lights (unbiased) describing the same thing, etc.

I like the organization of this shader development environment and is a good example of coding your own uber shader without using VOPs if you so wish.

Link to comment
Share on other sites

I'm experimenting with this in my Tron scene, specifically the light cycle. I like the way it's looking, but I'm noticing that the reflective surface is picking up some things, and then dropping others as the Samples and/or refl intensity are changed.

I've got the Grid floor, which is made of two thin box, very large in size, but the height is very short. In between I've the rectangualr shapes, also very thin. The outer pieces have hte shader set up for glass, reflection and refraction turned on, and the inner shapes have the Glow shader on them. Looks good so far. When I put the bike on this, the bike is reflected in the floor OK. But the glowing rectangular shapes don't show up on the bikes surfaces, depending on the above mentioned settings on the shader. Setting the Sampels to anything other than 2 seems to make part of it go away. Am I missing something? I'll try and post images to illustrate this later.

Link to comment
Share on other sites

Some more testing. The pic on the left shows reflection sampling rates set to 8, and the micro poly renderer set to have 4 sample. The pic on the right shows reflectation samples at 16-32 (depending on the material), and micro poly renderer set to have 16 samples.

Lighting is done with 3 point lights. Is there anything I've missed here? It still seems kind of noisy.

post-4235-0-05502300-1350232578_thumb.jp

Edited by jim c
Link to comment
Share on other sites

I'm trying to use the shader in a digital asset. But when I save the asset I get the following dialog - complaining about bits in the shader. In the asset, which is an object type, I have a SHOP node with my shaders in there, so the asset is completely self contained and ready to go. If I save anyways, it seems to work, but I'm curious as to what this means, is there a way to prevent this from coming up?

post-4235-0-91821500-1350331833_thumb.jp

Link to comment
Share on other sites

As far as the noise, I didn't realize how high it needed to be set. Thanks for point that out. For me, 64 samples seems to do the trick, but it does make a big hit on the render time. Still, it's faster than PBR for this kind of scene.

Link to comment
Share on other sites

I'm trying to use the shader in a digital asset. But when I save the asset I get the following dialog - complaining about bits in the shader. In the asset, which is an object type, I have a SHOP node with my shaders in there, so the asset is completely self contained and ready to go. If I save anyways, it seems to work, but I'm curious as to what this means, is there a way to prevent this from coming up?

Don't worry about it. Houdini think symbol "*" and "space:world" is absolute link

Edited by notawhale
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...