Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 77
Posts: 77   Pages: 8   [ Previous Page | 1 2 3 4 5 6 7 8 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 242705 times and has 76 replies Next Thread
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Simulate sun position and lights/shadows

Nice experimentation. smile
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:

lightSourceX#n=
lightSourceY#n=
lightSourceZ#n=
lightSourceColor#n=

can cite one light source as in the following example:

lightSourceX#1=5
lightSourceY#1=5
lightSourceZ#1=5
lightSourceColor#1=#FFFFFF

but also more than one light source as in the following example with 3 lights of different colors:

lightSourceX#1=0 5.5 11
lightSourceY#1=0 11 0
lightSourceZ#1=5.5 5.5 5.5
lightSourceColor#1=#FF0000 #00FF00 #0000FF


Note axis directions when you define the x, y, z coordinates of each light source:

----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[May 11, 2010, 8:45:23 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
db4tech
Advanced Member



UK
Joined: May 3, 2010
Post Count: 223
Status: Offline
Reply to this Post  Reply with Quote 
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. wink

Thank you in advance for your help.
db4tech
[May 15, 2010, 9:18:38 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
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 creator
[May 15, 2010, 11:27:33 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
db4tech
Advanced Member



UK
Joined: May 3, 2010
Post Count: 223
Status: Offline
Reply to this Post  Reply with Quote 
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]
[May 16, 2010, 12:21:50 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
db4tech
Advanced Member



UK
Joined: May 3, 2010
Post Count: 223
Status: Offline
Reply to this Post  Reply with Quote 
Re: Simulate sun position and lights/shadows

Is this information helpful?



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 smile

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]
[May 16, 2010, 12:37:26 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
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. wink

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! smile
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[May 19, 2010, 7:51:11 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
db4tech
Advanced Member



UK
Joined: May 3, 2010
Post Count: 223
Status: Offline
Reply to this Post  Reply with Quote 
Re: Simulate sun position and lights/shadows

I never tried using multiple shaders per object. I'll have to test that. Thank you for the idea! smile

Just as long as you don't use Phong C1 biggrin even with Importance sampling turned on it still looks like a squashed ball compared to Uber shader.

Can't wait to test this and see the new render results!

Thanks,

db4tech
[May 20, 2010, 3:45:32 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
db4tech
Advanced Member



UK
Joined: May 3, 2010
Post Count: 223
Status: Offline
Reply to this Post  Reply with Quote 
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! wink 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.

db4tech
[May 21, 2010, 8:09:07 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Simulate sun position and lights/shadows

To db4tech and other interested testers,
Here are two temporary plug-ins that will let you test SunFlow's Uber and Phong Shader:
http://www.sweethome3d.com/plugins/AdvancedRendering-PhongShader-1.3.sh3p
http://www.sweethome3d.com/plugins/AdvancedRendering-UberShader-1.3.sh3p
These plug-ins create two new menu items in Tools menu, so you can distinguish them from each other.

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]
[May 21, 2010, 10:47:42 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
db4tech
Advanced Member



UK
Joined: May 3, 2010
Post Count: 223
Status: Offline
Reply to this Post  Reply with Quote 
Re: Simulate sun position and lights/shadows

To db4tech and other interested testers,
Here are two temporary plug-ins that will let you test SunFlow's Uber and Phong Shader:
http://www.sweethome3d.com/plugins/AdvancedRendering-PhongShader-1.3.sh3p
http://www.sweethome3d.com/plugins/AdvancedRendering-UberShader-1.3.sh3p
These plug-ins create two new menu items in Tools menu, so you can distinguish them from each other.

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!!!!! smile

db4tech
[May 21, 2010, 10:52:09 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 77   Pages: 8   [ Previous Page | 1 2 3 4 5 6 7 8 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved