France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Simulate sun position and lights/shadows
Nice experimentation. I'm glad you discovered by yourself that the lightSourceColor property could be any color!
For anyone tempted to create its own lights with SH3F files, note that the 4 keys in a PluginFurnitureCatalog.properties file that defines the light sources of the nth piece:
Note axis directions when you define the x, y, z coordinates of each light source:
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
UK
Joined: May 3, 2010
Post Count: 223
Status:
Offline
Re: Simulate sun position and lights/shadows
Puybaret wrote:
Hi,
I just released the version 1.2 of the Advanced rendering plug-in with the following new features: - I removed the threshold set on shininess. In the previous version, a shininess smaller than 64 was ignored. If some objects get too shiny, you can decrease their shininess by setting the "Ns" value in their MTL file (a 0 or 1 value meaning not shiny) and reimport them, or by setting their color in Sweet Home 3D with the furniture modification dialog. - I enlarged a little lamp lights to soften shadows.
Hi Emmanuel,
When importing .obj files (created in Art of Illusion) into Sweet Home, then rendering using your Advanced render 1.2 I am still only able to produce either a matt finish or glass like surface with nothing in between:
(Art of Illusion Wooden floor.obj Texture shininess 0.0, Wooden floor.obj then imported and rendered with Sweet Home 3D)
(Art of Illusion Wooden floor.obj Texture shininess 0.1, Wooden floor.obj then imported and rendered with Sweet Home 3D)
The Art of Illusion texture shininess setting goes all the way to 1.0 , the most I have used is 0.1 and still getting glass like reflections, what am I doing wrong?
This is the type of reflection I would like (Photoshop mock-up)
Are there some other values I can alter to produce a slightly shiny floor like in my Photoshop sample or is it a limitation of SunFlow?
If it is a SunFlow limitation 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?
Yafaray render.
PS: The floor texture I used is from a free texture source. Oh and larger lamp lights please for when not using the ceiling light setting.
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
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.
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 creator
UK
Joined: May 3, 2010
Post Count: 223
Status:
Offline
Re: Simulate sun position and lights/shadows
Thank you for the information.
I have just tried several NS values and found 1=matt surface any setting above 1, even 1.000001=full glass like reflections, the shiny shader always seems to produce full glass like reflections no matter what value above 1 is set.
If you decide to do some tests to see how Uber rendering compares does that then mean the glass objects will render, allowing light rays through also allowing caustics? With the Uber render example aren't the dots just the multiple light sources they used? In which case they won't be a problem with room rendering.
Yes I should have mentioned, YafaRay is open source and is available for Windows, Mac and Linux.
Thank you for your reply.
I would be quite happy to beta test Uber rendering for you. db4tech
----------------------------------------
[Edit 1 times,
last edit by db4tech at May 16, 2010, 12:23:34 AM]
Importance sampling turned on (lock false) (Looks a lot better)
So a conclusion one could draw from these tests is that when using the phong and uber shaders with high power and glossy values respectively, using importance sampling can reduce the light points from the ibl. Increasing samples does not rid the phong and uber shaders of, what Kirk referred to as, “constellations.”
I've probably not understood the complexity of the shaders. So from a layman's perspective. If Uber shader doesn't work well or is too slow, could you use the shaders you were using before but insert a Phong shader in the middle?
Diffuse shader for matt surfaces, Phong shader (C1,C2 and C3) for slightly shiny surfaces then Shiny shader for glass like reflections?
If I have oversimplified the operation of the shaders and got it all wrong I hope my post makes you smile and brightens your day
db4tech
Update: On closer inspection Phong shader C1 looks very strange, maybe Uber shader with importance sampling turned on might be a good all round solution, what are your thoughts?
Edit to add update
----------------------------------------
[Edit 1 times,
last edit by db4tech at May 16, 2010, 12:46:43 PM]
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Simulate sun position and lights/shadows
If you decide to do some tests to see how Uber rendering compares does that then mean the glass objects will render, allowing light rays through also allowing caustics?
I think transparency management is an other problem, but now that I finished DAE/Collada support in current beta version, I'm going to work on it. I've made some tests with caustics too, but it slows down rendering process too much (for more information about caustics please read this nice article). I feel caustics are probably nice to render one or two transparent objects but not a whole scene with many potential transparent objects.
I would be quite happy to beta test Uber rendering for you.
Thank you. Your help will be precious since rendering process is often lengthy and I don't always think to test special camera locations like you did.
If Uber shader doesn't work well or is too slow, could you use the shaders you were using before but insert a Phong shader in the middle?
I never tried using multiple shaders per object. I'll have to test that. Thank you for the idea!
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
UK
Joined: May 3, 2010
Post Count: 223
Status:
Offline
Re: Simulate sun position and lights/shadows
Hi Emmanuel,
Firstly thank you for the interesting link on caustics.
Now that advanced rendering plug-in version 1.2 has been thoroughly tested (oh! Also not forgetting the BasicPlusExtraLights.sh3f package of course! He he) will you be updating the front page so people who don't visit the forum can know about them? Many may still be using version 1.1 and not even know about 1.2.
To change the shininess of an object, you'll have to play with the shininess value and the specular color stored in the Ns et Ks parameters of its MTL file. If you're patient enough, try to render different existing homes in the galeries, and give us your opinion.
Please don't link these files in an other document, because I'll probably delete them once we decide which track to follow.
[Note] 2010/05/26: These two plug-ins were updated to support models at DAE/Collada format.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
----------------------------------------
[Edit 1 times,
last edit by Puybaret at May 26, 2010, 6:46:31 PM]
To change the shininess of an object, you'll have to play with the shininess value and the specular color stored in the Ns et Ks parameters of its MTL file. If you're patient enough, try to render different existing homes in the galeries, and give us your opinion.
Please don't link these files in an other document, because I'll probably delete them once we decide which track to follow.
Thank you Emmanuel already downloaded and can't wait to test them!!!!!