PDA

View Full Version : Proper "Segment Momory Limit"?



JeffrySG
05-12-2007, 09:02 AM
I'm a little confused on how to pick the best setting for the "Segment Memory Limit". Is there a general rule of thumb when setting this, depending on how much ram you system has?

For example if you have 2GB, or 4GB of RAM would you want to set the SML to close to those amounts? Like 1600 or 3500 respectively?

Does it depend on what type of scene you are rendering and how many textures you'll be using, or if you'll be running other applications on your machine while you're rendering?

I have 4GB in my machine and I'm trying to figure out a good overall setting to use for now.

Thanks!
Jeff

Andyjaggy
05-12-2007, 09:37 AM
Good question.

bloontz
05-12-2007, 09:41 AM
There is a good explanation in the Surface Render manual for LW 9. Basically you just need it big enough to render a frame in one segment, eg. 18 MB for an NTSC 0r PPAL resolution frame. You certainly don't need to give massive ammounts of ram.

Lightwolf
05-12-2007, 09:42 AM
High enough for your final image to render in one segment.

Basically, the segment memory is the maximum memory LW may use for the frame buffer while rendering an image.
If it needs less, it will use less. If it will need more, it will split up the image into segments (which take longer to render).
128 MB should be a decent starting point for anything up to HD formats.

Cheers,
Mike

katsh
05-12-2007, 09:57 AM
best way is just do render in each setting. compare each render time.

thres is no 100% theory that works fine in every case.

peace:thumbsup:

nolan
05-12-2007, 10:22 AM
If I find that lightwave is generating more than 1 segment in the "camera properties panel" I'll bump up the SML until I have only one segment to render. If this doesn't leave enough ram for buffers, lightwave will let me know and I can lower the SML. Maybe not the best way to do it but works for me.:D

JeffrySG
05-12-2007, 10:42 AM
OK, that makes sense now. Thanks everyone for responding. I know there is no 'one' single answer, but as long as I know that it is specifically the amount of space needed to hold the actual rendered frame I can estimate from there.

I don't usually render too large so I would think 128MB would be a good number for me to start with. Enough to hold a decent size render (3000x2000) at 16bit with some alpha channels with a little bit extra for luck...

Thanks again everyone!!!
cheers!
Jeff

Mr Maze
05-12-2007, 09:09 PM
I was on the phone with Newtek once and they said if you are having problems with a high poly scene to drop it to 1 but this was last year on 9.0...

JeffrySG
05-13-2007, 09:57 AM
I would think that if you drop it to one, it would free up ram for the actual rendering and maybe it would drop the render in to many different sections each requiring a smaller amount of ram to process the scene? not sure...

Captain Obvious
05-13-2007, 10:00 AM
Set it so high that your image would render in one segment, and then cut it in half repeatedly until the scene renders at all. I once had to use a segment limit of 16 megabytes, resulting in a grand total of about 60 segments.

It is important to note that you do not actually lose anything by rendering in multiple segments. It sometimes takes slightly longer to render with more segments, but the difference isn't huge.

Clockmaster
05-14-2007, 06:02 AM
To obtain the correct Segment Memory Limit just take the total number of pixels (for example 640x480=307200) and multiply by 0.04096075. Then divide by 1024 and you'll have the SML.

JeffrySG
05-14-2007, 06:58 AM
To obtain the correct Segment Memory Limit just take the total number of pixels (for example 640x480=307200) and multiply by 0.04096075. Then divide by 1024 and you'll have the SML.
does that account for any extra alpha channels? or rendering at different bit depths? 8? 16? 32? just curious...

Lightwolf
05-14-2007, 07:11 AM
To obtain the correct Segment Memory Limit just take the total number of pixels (for example 640x480=307200) and multiply by 0.04096075. Then divide by 1024 and you'll have the SML.
I do wonder where you got that from....
Assuming we render to RGBA only, it would be 640 x 480 x 4(RGBA) x 4(32bit float = 4 bytes per component) bytes = 4,915,200 bytes = 4,800 KB = 4.6875 MB.
Assuming that LW actually stores all the buffers that may be exported, it would be: 640 x 480 x 36(all image channels LW can produce) x 4(32bit float = 4 bytes per component) bytes which is roughly 42MB.

You calculation ends up at roughl 12.5 MB, I wonder why? Your magic number seems to point to 42 bytes per pixel - which is quite strange. Maybe LW needs extra per pixel storage for other information (like the number of AA samples or something like that).

...just curious.

Cheers,
Mike

Clockmaster
05-14-2007, 01:46 PM
I am very curious too...
I don't know exactly why Lightwave stores circa 12.5 Mb for SML in 640*480 and so on, but simply it does.
I have obtained the "magic periodic number" 0.04096075... making just a simple proportion, knowing the ratio between some approximated SML and the related number of pixels. It's just an empiric calculation, and I do that because it can be very useful, saving some rendering time when you must render huge images (having enough RAM to set a SML that gives a single segment).
This number is roughly equivalent to the segment memory needed for one pixel, in Kbytes.
Guess someone can give a technical explanation. :)

Bye Bye ;)