1
$\begingroup$

I can't manage to produce a metallic looking sphere despite trying many things. I have the basics working, i.e shadows, refraction etc. but I'm not sure what combination of these will allow me to produce a metallic surface. I know that it should be reflective and retain it's color but how do I go about accomplishing that? This is my spec and diffuse calc: specular code = vec(1,1,1) * pow((std::max(0.f, dot(light, reflection))), spec)//white specular highlights

diffuse code = vec diffuse = col*std::max(0.f, dot(normal, light));//col = object col

I test if the object that is hit is reflective and calculate the reflection ray, but how do I make it look metallic after producing the reflective image on the sphere?

$\endgroup$
9
  • $\begingroup$ Look up Cook-Torrance. $\endgroup$
    – lightxbulb
    Mar 29, 2020 at 20:20
  • $\begingroup$ Note that how you render the image doesn't really affect whether the surface is metallic. A rasterizer is just as capable of getting a surface to appear metallic as a raytracer. It's all about the lighting model you employ. $\endgroup$ Mar 30, 2020 at 1:33
  • $\begingroup$ won't the way the light interacts with the surface determine whether its metallic or not? $\endgroup$
    – JerSci
    Mar 30, 2020 at 5:52
  • $\begingroup$ Could you post an image? $\endgroup$
    – Simon F
    Mar 30, 2020 at 6:37
  • $\begingroup$ I'm not sure of what exactly $\endgroup$
    – JerSci
    Mar 30, 2020 at 6:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.