Reply
Reply
 
Thread Tools Display Modes
[HP]'s Avatar
Old (#51)
I'm a sucker for materials and this is some really great stuff, thanks for sharing!
Offline , dedicated polycounter, 1,831 Posts, Join Date Aug 2007, Location derp land  
   Reply With Quote

kodde's Avatar
Old (#52)
Thanks [HP].
It's my favorite area when it comes to CG. Not that hard to tell huh?
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

kodde's Avatar
Old (#53)
A small update on the PBL shader to v0.3.1.

From 0.3 to 0.3.1:
-Added Emissive Texture feature.




You can grab the shader here:
http://www.kostas.se/?p=30
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

kodde's Avatar
Old (#54)
Another small update on the PBL shader to v0.3.2.

From 0.3.1 to 0.3.2:
-Added transparency support. Use the albedo texture alpha channel.


You can grab the shader here:
http://www.kostas.se/?p=30
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

wailingmonkey's Avatar
Old (#55)
sweet work, kodde!
Offline , spline, 180 Posts, Join Date Jan 2008,  
   Reply With Quote

kodde's Avatar
Old (#56)
Quote:
Originally Posted by wailingmonkey View Post
sweet work, kodde!
Thanks mate. Was no biggie. These were mainly requests by my students who frequently use this shader.
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

poopsterspappy's Avatar
Old (#57)
Kodde,



Love the Shaders . Thanks a million !!!
Offline , spline, 125 Posts, Join Date Feb 2012,  
   Reply With Quote

kodde's Avatar
Old (#58)
Thanks poopsterpappy. Glad you like it.

I've been a bit lazy to update this thread. The latest iteration is 0.3.3.1. Anyone using older is really recommended to update as there's a major flaw (fuck up on my part) concerning normal maps prior to 0.3.3.1 Here's an extract with the change log since the last update I posted here.

From 0.3.3 to 0.3.3.1
-Bug fix, Normal Map multiplier was at 1.5x prior to this version. Now default is 1.0x.
-Normal Multiplier added as a slider.
-Scrapped idea of running two parallell shaders. Will just continue to use just the newer "multiplier sliders version".

From 0.3.2.1 to 0.3.3:
-Added a version of the shader with "multiplier sliders" for the Albedo texture, Roughness texture, Substance texture and Cube Map texture.

From 0.3.2 to 0.3.2.1:
-Retroactively added bug-fixes in Change Log between 0.2.2 -> 0.3 for clarity reasons.


As always, you can get the shader here:
http://www.kostas.se/?p=30
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

melviso's Avatar
Old (#59)
Hello,Kotas.Great work.I am just getting into the whole real time shader thing.I would really like to try these wonderfulicious shaders but I am kinda torn between the TGA Physically Based shader and the KoddeShader 2.0.Both seem awesome but the TGA seems more recent than koddeshader so does that mean it gives better results?I wanna try these shaders out on human characters and environment work.Never knew there were real time shaders in Maya,that means render time will be very fast compared to shaders like Lambert,Blinn,sss shaders.

Can these shaders work with Mental Ray,software renderer or only with the Hardware or viewport 2.0 renderer?

Nice to know there is someone making stuff for Maya.3dsmax always gets all the cool stuff. Keep up the great work.
Offline , triangle, 354 Posts, Join Date Aug 2011,  
   Reply With Quote

gilesruscoe's Avatar
Old (#60)
Hey, im trying to get the shader working in maya 2012 but the CGFX shader node just appears pink, even when i add textures into the file slots. I think i'm doing something extremely wrong? The CGFX plugin is loaded, i've created the cgfxshader render node in hypershade and have applied it to my mesh. I'm using highquality viewport (hardware). Any advice? Cheers!
Offline , dedicated polycounter, 1,670 Posts, Join Date Dec 2010,  
   Reply With Quote

kodde's Avatar
Old (#61)
melviso> Both work fine, it's mostly two different shading principles. They use a bit different textures. The KoddeShader 2.0 uses the more traditional kind, the kind you will find more tutorials and material concerning. The TGA PBL shader uses Physically Based Lighting oriented textures instead, a newer way of shading real time afaik. Adopted by a few studios that I know of and probably a few more that I don't know of. If you haven't tried PBL then it could be a nice experience for you to give it a go. I actually find it easier to work with once you get familiar with it. You use one less texture with PBL and you get a few parameters for free regarding fresnel.

gilesruscoe> ATI-card? I'm afraid none of my CGFX shaders work with ATI afaik. This seems to be a common problem with all the CGFX shaders for Maya that I know of.
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

gilesruscoe's Avatar
Old (#62)
Ah yeap, using ATI card. Great, another thing to add to my long list of maya/ati compatibility issues :P Time to replace my card
Offline , dedicated polycounter, 1,670 Posts, Join Date Dec 2010,  
   Reply With Quote

melviso's Avatar
Old (#63)
Thanks for clearing that up,kodde.I will try out PBL then.
Offline , triangle, 354 Posts, Join Date Aug 2011,  
   Reply With Quote

kodde's Avatar
Old (#64)
gilesrusco>

melviso> Np. Just ask in this thread if you have any questions and I will try to help. Read post #2 in this thread for more info on how these textures work.
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

kodde's Avatar
Old (#65)
.

Last edited by kodde; 03-12-2012 at 06:08 AM..
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

kodde's Avatar
Old (#66)
New version out, 0.3.4.

From 0.3.3.1 to 0.3.4
-Now features energy conservation between ambient and reflective amount. I.e. If a sampled point is reflecting a lot of light, it won't also add a lot of ambient light and vice versa. Thanks for helping me with this Niklas.


As always, you can get the shader here:
http://www.kostas.se/?p=30
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

melviso's Avatar
Old (#67)
Checked out the link to the post.Its a little different from the maps I am used to but will definitely try it.High time I start paying attention to 3d realtime.
Offline , triangle, 354 Posts, Join Date Aug 2011,  
   Reply With Quote

kodde's Avatar
Old (#68)
I'm cross posting here, but I posted a big cube map pack today which most people using this shader will find useful. Check it out.

http://www.polycount.com/forum/showthread.php?p=1544773
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

kodde's Avatar
Old (#69)
New version out, 0.3.4.1.

From 0.3.4 to 0.3.4.1
-Bug fix, ambient light is now properly gamma corrected.


As always, you can get the shader here:
http://www.kostas.se/?p=30
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

kodde's Avatar
Old (#70)
New version out, 0.3.5

From 0.3.4.1 to 0.3.5
-Energy conservation between diffuse and specular materials.
-Implemented Kelemen Szirmay Kalos visibility model.
-Adjusted blinn-phong normalization to better approximation.
-Raised max specular power to take advantage of our logarithmic encoding.
-Adapted max specular to work with common cubemap blurring levels.


As always, you can get the shader here:
http://www.kostas.se/?p=30
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

kodde's Avatar
Old (#71)
New version out since a while back, 0.3.5.1

From 0.3.5 to 0.3.5.1
-Roughness now properly gamma correct for reflections.
-Minor improvement in mip-map selection formula for reflections.

As always, you can get the shader here:
http://www.kostas.se/?p=30
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

Randomself's Avatar
Old (#72)
Heya Kodde, just wondering what are your thoughts on efficient workflows to author textures for physically based shaders. I've been testing out painting them interactively using artisan in Maya, it feels kinda unwieldy though.
Offline , null, 10 Posts, Join Date May 2008, Location Singapore  
   Reply With Quote

kodde's Avatar
Old (#73)
It's not that different from authoring any other textures in my opinion. The substance texture is pretty simple, mostly filling areas with solid colors, use the cheat sheet as a baseline reference. Of course you can add variations in there for certain effects, but mostly not needed. You're left to painting the Albedo and the Roughness. Albedo is the color of your material, you don't want to paint light information in there. That doesn't mean you shouldn't add color varations, grime, dirt, scratches, etc. The roughness is a texture to define the surface structure. Is it all smooth? Rough? Any Scratches? Dents? Bumps? This map will help break up the reflections/specularity.

Beyond these textures your normal map and ambient occlusion remain the same.

The cube map needs to have pre-blurred mip levels to work properly with this shader as the roughness texture will change how the specular AND reflections turn out. I.e. will they be sharp? blurred? narrow? wide? intense? etc. The pre-blurred mips is needed to be able to differ from sharp/blurred reflections.
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

bb0x's Avatar
Old (#74)
Hey Kodde,

Havent tested this yet, but was just wondering how things work in relation to dielectric vs conducting materials. Dielectric Materials always have a white specular while conducting have coloured speculars.
It looks ok in the various materials examples, but since the highlights on the metals are so bright, they are essentially white as well. So I figured I should ask anyway.
So does Physically correct shaders take care of this, and what exactly controls the metalness of the surface?

The main reason I am asking this is because I tend to hue shift my specular maps of dielectrics by 180 degrees, so that the specular highlights are always white. But this heavily depends on what it is adding with. If it is a simple light cast on a sphere, obviously one half will be lit, so the specular can be added to the diffuse. But if you are using cubemaps on that same sphere and you want to retain that dielectricness of your material you should multiply the cubemap by the specular map, so the hues are correct.
But the issue here is that the unlit parts of the sphere will be black. So the hue shifted specular map will be added to black, showing the wrong colors where essentially the cubemap reflections will be. Though the cubemap reflections would render properly on the lit half.
Portfolio | LinkedIn | Twitter | Facebook -- Looking for work and available for freelance.
Offline , triangle, 325 Posts, Join Date Dec 2007, Location The Hague, Netherlands Send a message via MSN to bb0x Send a message via Skype™ to bb0x  
   Reply With Quote

kodde's Avatar
Old (#75)
bb0x> You are right about the metals in the examples. I should have gone for a milder specular highlight. Anyway, the substance is the controlling part for coloring the specularity and reflections. The cheat sheet image bundled with the shader has some lookup color values for substance. You can tell that all the materials there have some form of color tint.

The reason for the metals in my example showing mostly white specularity is since the colors cap out at 1.0 1.0 1.0. Sadly I can't do any post processing in the Maya viewport, otherwise it could be cool to try and adapt to the values on the screen.
Offline , dedicated polycounter, 1,375 Posts, Join Date Dec 2004, Location Malmö, Sweden  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch