Learning to make custom shader (not the coding side)
Hi, this site is really cool and I hope you don't mind this newbish question.
But I would like to know any good ressource or guideline for creating custom shader by tweaking Arch material or anything else.
I bought Boaz Livny book on Mental ray who is a really good book to learn mental Ray, but there are not so much info about creating custom shaders.
I would like to know the basic guideline.
I mean the real basic, for example in sculpture you have to understand the form, look for the proportion and so on to reproduce a subject.
Here I can understand that what you are looking at is reflection, fresnel effect, and things like that, but I have to admit that's a little bit confusing for me.
For example while looking at Jeff patton Clay material, I have absolutly no idea how you could achieve such a thing, the only thing I can understand is about the color and the fingerprint pattern.
Even if he is mentioning that he tweaked the BRDF, is it just a matter of luck by tweaking the value until you approach to something good?
I'm sure that's not the way of doing it or Jeff is incredibly lucky
Re: Learning to make custom shader (not the coding side)
Well, regarding MR shaders, Jeff is no luck, he is an expert, so he is best man to address about that.
I can direct you to MrMaterials.com where you can find lot of shaders and dissecting them you can have idea about it.
Also you can find there Jeff-s blog and blogs of other experience users, some instruction for setting up three base shader types etc.
I am not sure if you are looking for basic tuning of the shaders or instructions for writing and creating custom shaders which is quite different thing.
First thing is open to any user who understand basic physical properties of materials and how they are presented in Mental Ray. Other thing mean that you need to go into programing, scripts, that is behind the curtain of Mental Ray. That is pretty complex and I have no idea where you can find tips on that, but I am sure there are plenty around...
If you however, look for simply tweaking material properties in shader than it is not so difficult as it may seam.
I am no expert for MR, but I can tell you two ways.
One is to use standard Max material which is supported by MR and you can use some of the basic maps to control your materials properties.
Other way is to use presets of arch shaders which are realy good starting point for further tweaking.
If you used Max for some time you will have basic knowledge about materials.
You know that MR arch shader preset offer some of the same features with quite nice explanations and with wide range of templates.
It would take lot of time to go through all that here and I will just briefly explain the Fresnel feature in reflection
Take a look at glass template fo Arch&Design shader.
In BRDF section you have by default set to -by IOR (Fresnel)
In refraction section you have the IOR set to 1,5 which is standard for glass material. (you can look for IOR chart on the net). There you can set the color of refraction too...
So back to BRDF, what does it mean Fresnel? It is simply propertie of physical material that describe how reflection behave acording to the change of angle toward surface.
You noticed that if you look at glass from angle of say 45 deg. it look more reflective than if you look at it straight.
But the dependence that reflection have on angle is not fully linear, so there is BRDF curve. That is pretty simillar to Max-s standard map called Fallof that offer fresnel type to and curve that you can directly edit yourself and tweak it as you like.
Now in BRDF you can observe how IOR that you may change above will affect behaviour of reflection (look at the curve and you will notice it is changing).
But you can also tweak it with custom option, uncheck the Fresnel and set how much reflection will have at 0 deg. and how much at 90 deg. and how the shape of the curve will be...
Of course that is all too dry if you do not follow it with render tests. You can use some of the material scenes that are available at MrMaterials or on Jeff Patton-s blog at CGsociety...
If you by any chance use max 2009 you will have even better preset shader system with Pro materials, ideal for archviz... the properties are much simplified and presented through just few parameters that you can easily tweak, add custom color texture etc. but are more limitted in a way that you can not observe the behaviour as you can with Arch&Design or even Standard materials...
I hope this help you a bit...
__________________
d.sign
The Following User Says Thank You to d.sign For This Useful Post:
Re: Learning to make custom shader (not the coding side)
Hi d.sign,
And thank you for your answer.
About jeff I know he is a very good professionnal, that was ironic
And about my goal I just want to make custom shader by linking nodes and/or tweaking properties.
But what I really miss is a basic workflow, what you have to look for before making any tweak in the shader.
For example look at the picture I attached.
If I am right the properties of this matterial is a strong facing reflection and mainly diffuse material.
Am I right?
But I'm sure I miss tons of thing to watch for.
And for the BRDF I have no idea how to guess what parameters is for this kind of reflection
Even after reading the documentation.
So if you have a good ressource where it show the behind the curtain process, I'm for it
Something who show the brainstorming before tweaking anything on a shader, I think that's the most important part imho.
Re: Learning to make custom shader (not the coding side)
Well not sure if this can help, it is basically Vray tutorial, but have lot of general knowledge about GI and material properties and in introduction there brief and very efficient explanation on material surface properties, reflection etc... it is tutorial by Chris Nichols on Gnommon workshop... Global Illumination: Interiors
check also exteriors, by him, same discussion on both DVD-s...
generally, there is lot of that stuff at Gnomon workshop, so that is a place to look for.
But if you are asking about deduction and analyzing material properties so you can recreate it in CG material (shader) that is more thing of experience and basic knowledge of physics... a bit of that explained in above mentioned tutorial...
After some time of testing and reading tutorials you will get a grip of it, trust me...
Re: Learning to make custom shader (not the coding side)
I forgot to mention, maybe this is best resource if you look for thorough basic to advance explanation on all issues in Mental Ray, CG in general as well. Welcome to mental Bout Max - Video Training for Autodesks 3D Studio Max
They have also several video modules that cover shaders, and very affordable too... so you should check this out first!
Re: Learning to make custom shader (not the coding side)
Thank you for this website I didn't know about it and it has some great video, seems to be what I am looking for.
The project overview video seems to be really interesting.
Thanks once again.
Re: Learning to make custom shader (not the coding side)
I believe Jeff will be releasing some more mental ray videos through Gnomon Worshop relatively soon.
You can read all you want, but either messing with existing materials or better yet, methodically creating them from the base settings and tweaking the settings to see what they do after studying the reading material you already have is a good way to get a grasp. I suggest you download the MatLabs at MrMaterials and use them so that you have a controled scene when experimenting.
__________________
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
The Opinions Expressed Here Do Not Necessarily Reflect Those of a Rational Mind ~ `'•.¸(¯`'•.¸ Russell L. Thomas¸.•'´¯)¸.•'´
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
Re: Learning to make custom shader (not the coding side)
Quote:
Originally Posted by David.M
he is mentioning that he tweaked the BRDF, is it just a matter of luck by tweaking the value until you approach to something good?
Quote:
Originally Posted by David.M
I'm sure that's not the way of doing it or Jeff is incredibly lucky
In order to tune the BRDF curve to match a specific material I will obtain a small sample of the material whenever possible and then do some measurements here to come up with my BRDF value. So what exactly does that mean?
In a nutshell: Configure a test scene that closely mimics the environment where you will place your real world material sample. I'd recommend building something like a cheap Cornell box or something similar that's fairly easy to recreate in 3d in 3dsMax. If you wanted something simple or larger you could also HDR capture a room in your house and use that.
Once you have created the 3d version of your test area where the sample material will be placed then you can start "measuring" the reflectance. Scientists use something like a spectroradiometer. Since I'm not a scientist with access to such equipment I just use my digital camera.
I will set the sample material on something reflective. I prefer to place the material onto something painted 50% gray or similar. I then set my camera up at a 90deg. angle to the material and capture a few brackets to create a HDR. Then do the same thing for 0 deg or as close as you can get to 0 degrees.
From there, once I have compiled the images into two HDR's (0 deg & 90 deg) I can try to match that output in my 3dsmax scene. To do this, I have setup a 3dsmax camera at 0 deg & 90 deg in my 3dsmax scene that replicates my real world test area. Then I tune the BRDF values (render/adjust/render/adjust/etc.) until I get a similar result to the two HDR reference files.
I know this all may sound overly complicated (or a huge hassle at minimum) but honestly once you setup the test scenes (real & 3d), it's really not bad and a material can be configured fairly quickly.
While this method should get me fairly close to the real world material. It's certainly not a very scientific method of dialing in the BRDF curve. That being said, it seems to work ok in my tests....at least until I get lucky and Santa Claus brings me a labratory & spectroradiometer for Christmas.
I'll have to check and see if I can post my class PDF from the SIGGRAPH masters class I (and Zap) held. I had some notes/images on the process in there.
Kudos to anyone that actually reads through all my rambling here!
__________________
Jeff Patton
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. - To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. - To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.