Print at Jan 28, 2022, 6:30:23 AM

Posted by Puybaret at May 15, 2010, 11:27:33 PM
Re: Simulate sun position and lights/shadows
Art Of Illusion exports the shininess and the roughness of a texture in the Ks and Ns values of the MTL file accompanying an OBJ file. Ks values is rendered in Sweet Home 3D as the specular color and Ns is used to know how shiny is an object.
When I translated these values in SunFlow renderer, I chose to use a diffuse shader for matt textures and a shiny shader for shiny textures (with a Ns value > 1).
Maybe I didn't make the best choice for the final rendering, but I preferred these shaders because they worked pretty well and quickly. In the facts, even for a very small shininess value, SunFlow's shiny shader still renders a texture quite shiny as you saw.

The following image shows how a sphere may be rendered with the various shaders available in SunFlow:

I guess I should better use uber shader instead of shiny shader, but the little white dots you can see on row C2 and C3 doesn't make a photorealistic rendering at all...

[...] would it be possible to use another render engine from within Sweet Home like YafaRay or does it have to be a Java based engine?
From my point of view, the first conditions are free license and portability: it must run on all systems where Sweet Home 3D is available. Then, it's easier to integrate a rendering engine programmed in Java from a Java program, than running a separate process that you can't easily integrate in the program.
Emmanuel Puybaret, Sweet Home 3D developer