Create Metal material shader + light

Hi all,
I’m using Blender 2.8 and I want to create new material which will shine and have a metallic look. I found that ‘Anisotropic BSDF’ with 0.3 Roughness factor will do the job but when I look at the object only from certain angles it can be seen. I suspect it relates to the light conditions.
So I have two questions:

  1. How can I create the material with the properties mentioned above using a script? (tried to do it under the scripting window but some of the steps I made didn’t appear in the console)
  2. How to create light conditions such that the object will be shiny from each angle like the preview window at the right side of the screen? (using a script as well)

Adding here two images to help and describe the scenario.

Thanks in advance! :slight_smile:

You need something that’s reflected in the metal.
Take a HDRI.

“Metallic look” is simply a result of reflecting its environment in its color - a lot. Compared to a non metallic look which is nearly non reflective at facing angles and white reflective at its edge. At roughness 0 it will be super polished and one incoming ray becomes one outgoing ray. At higher roughness one incoming ray becomes several outgoing rays in a cone fashion. Using anisotropy will stretch this cone in one or the other direction. Aniso (on its own) is something you’ll use on directional semipolish or machined metallic parts. Glossy (on its own) for anything else metallic - also machined parts where setting up the aniso direction/tangets becomes too complex. Using a roughness map will usually make the metal look more natural. Bump maps - for making it less perfect shape and isolated dents will also help.

So I’d switch to regular glossy unless you want to deal with the tangents, and just use a hdri for environment.

1 Like

@CarlG Thank you for the informative explanation but Glossy mode doesn’t do the job.
Please see the attached photo:

What is the way to make it look as in the preview window, using script? Maybe @Dito can help with that?

You still haven’t added an HDR image.

@Dito
How can I add that using script?
and does three light system is necessary in this case? (because I tried that)

And this are my shading properties:

I can’t help with scripting, but what’s the purpose? Why do you need to do it via script?
To make it more similar you also need to add a checker to the ground plane.

3 point lighting - it’s not about adding three lights and calling it a day.
And lighting a ball doesn’t really cover the possibilities and purposes, especially for the keylight.
I’d check youtube for photo and filmography lighting tutorials.

1 Like

Like CarlG said, what are you gonna do with a script?

Depends on what you want to achieve.
I was just using one Sun Lamp.