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: 4005
Status:
Offline
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.
Netherlands
Joined: Sep 26, 2009
Post Count: 4005
Status:
Offline
Re: Simulate sun position and lights/shadows
db6tech:
Due to inflation..... hehehe
Sorry, I didn't sleep enough, I guess. Off course it's a furniture file. I'll try to remember to read the question before answering it.
Sorry Melonfrog!
Hans
----------------------------------------
Hans
new website - under constuction hansdirkse.info
----------------------------------------
[Edit 1 times,
last edit by hansmex at Jun 1, 2010, 5:34:53 PM]
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Simulate sun position and lights/shadows
SH3F fles may be installed with Furniture > Import furniture library... menu item too.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Netherlands
Joined: Sep 26, 2009
Post Count: 4005
Status:
Offline
Re: Simulate sun position and lights/shadows
Melonfrog:
Rendering can take a very long time, depending on: - the speed of your computer - the size of your model - the number of lights you are using (try the same model with 2 and 20 lights) - the size of the photo you make - the quality settings of your photo render.
Because rendering uses a lot of memory you may choose to increase the maximum memory settings that SH3D can use. Read this thread for an explanation.
Hans
----------------------------------------
Hans