Community
3ds Max Shading, Lighting and Rendering
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max materials topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Completely custom BRDF curve for A&D material?

11 REPLIES 11
Reply
Message 1 of 12
ZParrish
1604 Views, 11 Replies

Completely custom BRDF curve for A&D material?

Does anyone know if there is a way (or even how I would script one in) to create a custom BRDF curve, beyond the fresnel or custom function options? I was thinking of something similar to the "Color Map" curve in a bitmap's Output options.  It would be nice to be able to create a BRDF curve with Bezier curves.  I just find myself being too restricted by the fresnel tricks (high IOR) and the existing custom curve function.

 

Thanks!

11 REPLIES 11
Message 2 of 12
Anonymous
in reply to: ZParrish

There is a workaround to this.

Back in the olden days, before mental ray (or before anyone had a clue how to use it), those in the know had to fake their BDRF curve by Masking the Raytrace reflection map on our Standard material with a Falloff map.

The same trick could be applied to A&D.

Set the BDRF custom to 1 & 1 at 0 & 90 deg to give the 100% reflective effect like the old Raytrace on Standard. Then Map Reflectivity with a Falloff map. You can now edit the Mix Curve in the Falloff to whatever you like.

Message 3 of 12
ZParrish
in reply to: Anonymous

Thanks for the info Samab!  I kind of forgot about the falloff map as it gave me errors in previous editions of 3ds Max & Mental Ray / iRay.

 

Through some trial and error, I got a decent looking result with the Falloff map.  One problem though is that Arch & Design's Reflectivity doesn't have a map slot.  So I tried combinations of using Falloff maps in the Glossiness, Reflective Color, and Anisotropy map inputs.

 

In doing so, I started getting unexpected results, especially with the Reflective Color input.  I was always under the impression that whatever map you use for reflective color got multiplied by the actual reflective values calculated by Arch & Design.  Similar to the "Metal material" option, except you could set it to something other than the diffuse color / map.  Now I'm discovering that its a little more complicated than that based on Arch & Design's conservation of energy feature.  Not only that, but you also helped me uncover an imbalance between diffuse and reflective layers that prevented my material from being 100% transportable from one lighting solution to another.  Cheers on that!

 

The Autodesk docs are actually pretty good about describing Arch & Design's balancing act between diffuse, reflective, and refractive layers and how their sum can't exceed the initial energy coming into contact with the material:

 

http://docs.autodesk.com/3DSMAX/16/ENU/3ds-Max-Help/index.html?url=files/mePortal.htm,topicNumber=d3...

 

On another note, the Autodesk docs incorrectly describe the reflective color map input as an enviroment map, which I know it's definitely not:

http://docs.autodesk.com/3DSMAX/16/ENU/3ds-Max-Help/index.html?url=files/GUID-C65DE825-BAB0-4CDA-82E...

 

I think they need to update that particluar link in their docs.

 

Thanks again!  I'll post a pic when I have it fine tuned.  My initial plan didn't quite turn out to be the "end all be all" solution to dynamic metalic reflections that I had hoped for.  Never the less, it does seem to yield better results than the built in BRDF functions of the Arch & Design material.  Perhaps I'm just being a bit picky 🙂

 

 

Message 4 of 12
Anonymous
in reply to: ZParrish

I was reffering to mapping the Reflectivity Colour Map with the Falloff. Set reflectivity to 1 to get the full range of reflectivity.


@ZParrish wrote:

On another note, the Autodesk docs incorrectly describe the reflective color map input as an enviroment map, which I know it's definitely not:

http://docs.autodesk.com/3DSMAX/16/ENU/3ds-Max-Help/index.html?url=files/GUID-C65DE825-BAB0-4CDA-82E...

 

I think they need to update that particluar link in their docs.


The Help article you link to is about the Reflect/Refract map. That has nothing to do with mental ray or A&D Mats. That shader doesn't even work in mr (it just comes out raytraced). It's an old shader for Scanline rendering, a cheap alternative to raytracing from the days of slow single core CPUs when real raytracing took too long.

Message 5 of 12
ZParrish
in reply to: Anonymous

Sorry, I should have been more clear.  If you lookup the Arch & Design material in the help docs:

 

http://docs.autodesk.com/3DSMAX/16/ENU/3ds-Max-Help/index.html?url=files/mePortal.htm,topicNumber=d3...

 

You get an overview of the material.  It doesn't cover all the specifics, but it includes a link to the "Main Material Parameters Rollout", which contains the reflectivity settings:

 

http://docs.autodesk.com/3DSMAX/16/ENU/3ds-Max-Help/index.html?url=files/mePortal.htm,topicNumber=d3...

 

When you scroll down to the reflectivity settings, it gives you a link for the "Color" setting that takes you to a Reflection map:

 

"Color

The overall color of reflected light. Default=white.

Click the map button to assign a Reflection map. This button is a shortcut: You can also assign a Reflection map on the General Maps Rollout."

 

http://docs.autodesk.com/3DSMAX/16/ENU/3ds-Max-Help/index.html?url=files/GUID-C65DE825-BAB0-4CDA-82E...

 

 

Their "Main Material Parameter Rollout" page is what actually needs updated, not the reflection map page.

 

---------------------------

 

Regarding the original focus of this post, I'm starting to get the feeling that I'm "paddling upstream".  A lot of planning and engineering was put into the Arch & Design material to optimize it for really great results that also conserve energy.  Trying to go in and bend the settings to more accurately coincide with real world surface properties keeps exposing other exploits that allow rendering to maintain it current level of efficiency.  Let's face it, the whole thing is a fantastic illusion anyway.  At their core, every rendering engine takes all sorts of shortcuts to simulate lighting effects; from the energy contained within the light to how it interacts with varying mediums.  Accepting the fact that it's not actually going through the physical process of generating and distributing "real" light with "real" mediums and instead, working within the strengths of the software is a way more practical approach.  It might not be "perfect", but it's still pretty amazing!

 

My original scene started out with a basic lighting solution (3 photometrics and 1 sky light for ambience) and one HDR environment map for reflections.  Since tweaking the reflection values of different A&D materials within the scene, I've had to use alternate environment maps for different materials and even mask some of them out so I could adjust the exposure of different objects to achieve the results that I wanted.  I started out with the goal of being able to reuse the lighting rig and all materials across a multitude of models that share materials and orientation.  It just doesn't seem to work out that way though.  Perhaps if I had the equipment to shoot my own HDR environment, I could get closer, or even buy a license of HDRLightStudio.  I guess that's why it's still an art and we're all artists 🙂  Hopefully as my understanding and experience grows with compositing and propperly leveraging 32-bit per channel images increases, I'll be able to dial in to the right look without all the smoke and mirrors, or at the very least, less of them.

 

I simultaneoulsy learned a ton and drove myseld half crazy for the past week.  It's still progress no matter how you slice it though 🙂  Thanks again for your help Samab!

Message 6 of 12
ZParrish
in reply to: ZParrish

I just wanted to post a follow up to this and show my results.  Thanks to Samab, I was able to get a fairly interactive metal surface where the scratches and smooth sections adjusted their reflections accordingly based on viewing angle.  Below is quick render I did, as well as a ZIP file containing the ".mat" if anyone else wants to try it.  I did replace my grayscale scratch image (as it was a 3rd party image) with a checker map.  If you have a good scratch image, just make sure the scratches are dark and the smooth parts are light.

 

AREA_4449737_Custom_BRDF_sme.png

AREA_4449737_Custom_BRDF.png

Message 7 of 12
rodrigo3d
in reply to: ZParrish

Hi,

 

The file you attached is empty. Can you export your material again?

 

Thanks,

Message 8 of 12
ZParrish
in reply to: rodrigo3d

Hey Rodrigo3d,

   It's not actually empty, it just only contains the material definition (the ".mat" file).  It has no bitmap assets in it as I don't own the rights to distribute those.  You can plug in your own bitmaps to test this out.  I think the checker map I used will be labeled "Map #228".  At least that's what it was labeled when I just tried downloading, uncompressing, and importing the ".mat" file from this forum post.

 


"I did replace my grayscale scratch image (as it was a 3rd party image) with a checker map.  If you have a good scratch image, just make sure the scratches are dark and the smooth parts are light."

 I hope that clarifies.  Let me know if you have any questions.  Thanks!

Message 9 of 12
rodrigo3d
in reply to: ZParrish

Hi,

 

What I meant is that the library is empty. There is no materials there, just the library. 😞

 

material.jpg

Message 10 of 12
ZParrish
in reply to: rodrigo3d

Hey rodrigo3d,

    The material is an Arch and Design (A&D) material, which only works with Mental Ray and iRay.  To see this in the material editor, you will need to have Mental Ray set as your renderer.  I'm pretty sure it's not showing up in your list because you either have the default Scanline Renderer enabled or some other renderer.  Another way you could at least see it in the material list is to right click on that little down arrow that's to the left of the "Search by name..." box in your screen capture and select "Show Incompatible".  If it shows up after doing that, you definitely don't have Mental Ray enabled for the material editor.  It's a good idea not to leave the "Show Incompatible" option enabled all the time.  That way you have a solid indicator of which engine you have active.

 

If you're not sure how to change your render engine, just go to:

 

Render -> Render Setup -> Common (tab)

 

and scroll all the way to the bottom where it says "Assign Renderer".  Expand that and you can select the rendering engine separately for the production output, material editor, and active shade.  typically, it's a good idea to have all of them set to the same engine so that depending on your workflow, your materials will be compatible with each.

 

I'm pretty sure I made this material with 3ds Max Design 2013, when I first replied to you, I tested it on teh 2014 software, and the attached screen print is using the 2015 software, so I know it's compatible with all three.  If you still can't see it after checking the above items, then it almost has to be a non-standard issue with the way you have Max setup.  I honestly can't think of any other way that the material won't be exposed in the editor unless you manually edited some of the text files that are used by the NVIDIA shaders in 3ds Max.

 

Please post back if your still having an issue. Thanks!  

Message 11 of 12
rodrigo3d
in reply to: ZParrish

Ohhhhhhhhhhhhhhhhhhh! 

How could I miss that!

Man Embarassed

My bad.

 

Thanks for all your trouble to help me. 

Many, many thanks.

 

Rodrigo

Message 12 of 12
ZParrish
in reply to: rodrigo3d

No prob Rodrigo!  I've totally been there myself countless times 🙂  But that's what forums are for and I'm glad I could help.

 

Enjoy!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report