Creating Lit sphere material in 3dsmax

Last Updated on 14/10/2019

lit sphere matball exampleIn this article I’d like to go back to the trend of previous years – Lit Spheres materials (also called matcap/Spherical Environment Mapping (SEM), etc.). The essence of this material is that all shader parameters: color, reflections, and so on are located on the image, where the sphere is depicted. To use such a image as material you will need a special shader which can draw out from it the necessary parameters.
This kind of materials are very useful in modeling (especially organic objects) and allow to identify errors in the topology. They have proved themselves in programs such as Mudbox and Zbrush. Presence of the library with such materials and possibility of fast switching between them considerably lighten modeling.
Just creation of Lit Sphere materials and library with them in 3dsmax we’ll do now. In this article we won’t consider creation of pictures with spheres, but we’ll take the ready-made. Our task is to create a material whose properties will be equally visible as when working with a model in the viewport, and in the case where we need to render our model.

  • lit sphere material node tree directx shader
    DirectX material parameters

Lit Sphere 3dsmax material

For visualization of materials in viewport in 3dsmax and for rendering are responsible different shaders, material created just for rendering is likely to be incorrectly displayed in the viewport, and vice versa.
Before you begin, download and unpack archives with images with the sphere:

LitSphere images collections

pixelcg.com collection by pixelcg.com
– orgelf’s collection (1), (2), (3) by orgelf
eat3d.com collection by eat3d.com

  1. We’ll begin with the material for the viewport. In 3dsmax There is no ready-made shader, which would work with such images. That’s why we’ll make use of Matballz shader. written by Charles Hollemeersch.
    – For work in Direct3d mode (directx 9) you should use the original Matballz.fx shader.
    – For work in Nitrous mode (Directx 11) you should use modified by me Matballz11.fx which support Directx 11.
    Material for the viewport is as follows:
    Materials-> Standard -> DirectX shader-> Matballz.fx-> Lit Sphere map-> image with the sphere
    Assigning it to to your object you can see its work in viewport, but if you render the scene, then the properties of your material will be lost because the DirectX shader does not work with a renderer.
  2. As renderer we will use Mental Ray. Mental Ray comes with Environment Probe/Gray Ball shader, its properties are similar to Matballz.fx.
    So material for Mental Ray looks as follows:
    Materials-> Mental Ray->mental ray->Surface->Environment Probe/Gray Ball->Gray Ball->image with sphere
    This material will be visible on the render, made by Mental Ray but in the viewport material properties will be lost.
  3. Accordingly, our task is to combine the two previously created materials in such a way that new material worked for the viewport and for render. And here 3dsmax Shell material will help us.Our new material will look as follows:
    Materials-> Standard->Shell material->Original Material->DirectX Shader (created earlier); Baked Material-> mental ray (created earlier).
    Be sure to specify the parameters of the Shell Material:
    Original Material-> Viewport; Baked Material-> Render

So our final material will look the same in the viewport and in render that you can see in the screenshots.

Lit Sphere materials library

Create hundreds of nearly identical materials manually is tedious task, so I wrote a maxscript (litsphere_lib), which will help us to automate this task. You will need to specify the .FX shader that you want to use, and the folder in which your images with sphere. The script automatically tried all images in a folder and all its sub-folders, and then create the materials on the same principle, which we have reviewed above, then save them in a new library. Using the library you created, you can quickly change the Lit sphere materials on your objects that allow you to identify errors in the object topology.

 

Download

Additional info:

  • Polycount.com thread

  • Update for 3ds max 2017+
    Changsoo Eun recently posted alternative approach to achieve LitSphere material in viewport.  If you interested so please check his script SuperClayMode.

Related

Comments ( 14 )

  • Hi mike, i’ve been looking for this for years 🙂 tks a lot!
    I’m encountering a shading problem today, because when i create a 3d geometry from a 2d shape and apply the matballz11.fx it looks totally flat.

    Could you help me please ?

    Thank you in advance 🙂

    Claudio

    • Hello Claudio!
      Can you tell me what version of 3ds max do you use?
      And will be easy find whats wrong if you share simple max scene where object looks flat.

  • Hey man i’m sorry for the late, I didn’t see the answer 🙂
    Anyway, I’m using 3ds max 2015 sp3 with nitrous , when you create 3d meshes from 2d shapes and apply the matballz11.fx it looks flat as you can see ( image link ). If i use Shader fx to simulate the same thing it works well.

    http://imgur.com/8lTj1Co

    Thanks again

    • Claudio, yeah, objects created from shapes looks flat because doesn’t have any UVW mapping. Check “Generate Mapping Coords.” in modifier that you use to create object and voila.
      Can you share ShaderFX shader that what you use? Matballz good solution for older version of 3ds max. I’m looking forward to replace it on 3ds max 2016+.

  • TKS Bro It works perfect, I totally forgotten about UV coordinates. Anyway if you create any mesh from a 2d shape you just need to add a uvw map modifer with any mapping coordinates and work in realistic mode to avoid to see ” void ” meshes :).
    It’s a pleasure to share my library of shaderfx. I’m an hard surface modeler and you know how important is to receive realtime reflection feedback directly from the viewport.
    Below there’s a short list of the most used nodes.
    – LatLong uv ( for spherical maps )
    – Matcap Coordinates ( for matcap materials)
    – Fresnel Reflection
    – Color
    – Float
    – Texture Map
    And I usually use Knald Lys software to create Glossy reflection maps.

    http://imgur.com/fjneDBc ( Matcap Material )
    http://imgur.com/mgIsyVw ( Spherical Map)
    http://imgur.com/kcGsPL6 ( Fresnel Reflection )
    http://imgur.com/2H6bn41 ( Shader Fx Properties )

    Probably It can be improved but i didn’t have time to handle it.
    I hope it can helps :).
    For everything type me on my email 🙂

    Cheers

    Claudio

  • Not much on google about what seems to be a great improvement of Max’s viewport. Most of my searches take me back here. So… Question : where do I cop the .fx and its “matballz” folder. It’s probably obvious enough not to write any “install” section. But I just don’t get how to do that. Thanks in advance for your help on the subject. Cheers.

  • Hi 🙂 I’ve been enjoying very much this amazing fx in Max2017. But as this last release of 3DSMax is still unstable, I went back to 3DSMax 2013. Better compatibility for many plugins. BUT now, I have only access to DirectX 9. So I came back here to download the original Matballz.fx shader but the download links I found here give only access to the DX11 version. Could you please advice ? Thanks 🙂 I really need that. It makes modeling in 3DSMax so much more comfortable !

Leave a Reply