UK
Joined: May 3, 2010
Post Count: 223
Status:
Offline
Re: Simulate sun position and lights/shadows
Hi Emmanuel,
I'm not sure if you have done any further work on the shaders since version 1.3 of advanced and Uber, so I will present some findings using version 1.3.
Could there be a memory leak with the shaders or SunFlow? I ask this because if I render the same scene (containing lots of textures) then change a few things to improve the scene, then re-render (I do this quite a lot tweaking things (400x300 fast setting)) at first the renders are very fast but then renders start to slow down, eventually the scene tries to render, thinks for a while and a red x shows. The only fix is to close Sweet Home then start Sweet Home again with the same scene, after this rendering is very fast for a while.
I have tried this with more than one model (for my course work) to be honest, when I am happy everything looks right and I am ready for a final render, I always close the Sweet Home program then open it because it renders my final scene faster.
Netherlands
Joined: Sep 26, 2009
Post Count: 3950
Status:
Online
Re: Simulate sun position and lights/shadows
db3tech, Emmanuel:
DB, that's an interesting observation. I didn't test it as methodically as you did, but it rings a bell. I sometimes get "half" renders, where the rendering stops halfway the picture. Also, when rendering this picture in high quality (size 400x300 pixels) it took AGES (as in "several hours") to complete. Maybe that was because I used around 25 lights, but the rest of the scene was very simple: just the lady and the tree (OK, that's a complex model) and a wall with a small texture.
If I have more time, I will certainly try to do some more testing in the next days.
Hans
----------------------------------------
Hans
UK
Joined: May 3, 2010
Post Count: 223
Status:
Offline
Re: Simulate sun position and lights/shadows
Hi Hans,
Thanks for your feedback. Yes I have experienced half (or unfinished) renders too when the render engine either thinks it has finished or runs out of buffer space? It doesn't happen very often but once it has happened the only solution (as mentioned in my previous post) is to close and reopen Sweet Home, then all is well (unless lots more renders are carried out)
Hope you are having a nice weekend. db4tech
PS: Yes I spotted the render of your lady friend Emmanuel's comment made me smile.
France
Joined: Nov 7, 2005
Post Count: 9177
Status:
Offline
Re: Simulate sun position and lights/shadows
Could there be a memory leak with the shaders or SunFlow?
Thank you db4tech for giving details how to reproduce this bug. You were on the right track because the problem comes from textures management in SunFlow. I just discovered it uses internally some kind of cache for the textures which is never reset. Too bad we discover this problem after the version 2.4 release. There's a dirty fix that I can program in the next release of the plug-in. I'll see if I do it or not.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
UK
Joined: May 3, 2010
Post Count: 223
Status:
Offline
Re: Simulate sun position and lights/shadows
Could there be a memory leak with the shaders or SunFlow?
Thank you db4tech for giving details how to reproduce this bug. You were on the right track because the problem comes from textures management in SunFlow. I just discovered it uses internally some kind of cache for the textures which is never reset. Too bad we discover this problem after the version 2.4 release. There's a dirty fix that I can program in the next release of the plug-in. I'll see if I do it or not.
Would the dirty fix be to force the cache to reuse the same memory address space? If so and the cache space isn't being cleared each time, won't you then have the problem of diminishing returns? Still encountering slowdowns, eventually running out of texture memory space caused by memory fragmentation.
Netherlands
Joined: Sep 26, 2009
Post Count: 3950
Status:
Online
Re: Simulate sun position and lights/shadows
Emmanuel, db4tech:
After some testing I can confirm there's a memory bug in the advanced photo plug-ins. When I render the same scene several times, even if it's just a relatively small scene, it stops halfway during the sixth or so render, and after that only shows a red cross in the render window. So it would definitely seem that memory is filling up for some reason.
I have a file called "/home/hans/SweetHome3D-2.4/SweetHome3D.l4j.ini" with "-Xmx1024m" in the same directory as where the v2.4 file is. When I increased this value to 2048, I could make 13 successive renders of that same scene. On the 14th run the rendering stopped halfway,and after hanging (half) a minute I could close the rendering window.
Hans
----------------------------------------
Hans
UK
Joined: May 3, 2010
Post Count: 223
Status:
Offline
Re: Simulate sun position and lights/shadows
Hi Melonfrog and Hans,
The BasicPlusExtraLights.sh3f needs to go in the furniture directory rather than the plug-in directory, otherwise the lights won't be available on the furniture list. Melonfrog if it is helpful for future downloads the files extension is the clue to its location sh3p are plug-in's and sh3f are furniture.
If using a Windows computer (will probably work on other Operating Systems too) all you need to do is double click on the downloaded (in this case BasicPlusExtraLights.sh3f) file and it will be automatically installed in the correct directory.