Planetside Software Forums

General => Terragen Discussion => Topic started by: gregsandor on May 20, 2010, 06:58:37 PM

Title: memory cost of 3 bw masks vs 1 RGB mask
Post by: gregsandor on May 20, 2010, 06:58:37 PM
Hey guys -- I have a lot of large black and white masks for a scene.  If I combine three at a time, as RGB channels, then split them via functions once in TG, would that reduce the memory consumption or is it the same cost?
Title: Re: memory cost of 3 bw masks vs 1 RGB mask
Post by: gregsandor on May 23, 2010, 11:51:38 AM
Anyone?
Title: Re: memory cost of 3 bw masks vs 1 RGB mask
Post by: Tangled-Universe on May 23, 2010, 02:15:42 PM
I don't know, why don't you try it yourself? :)
Title: Re: memory cost of 3 bw masks vs 1 RGB mask
Post by: Oshyan on May 27, 2010, 03:09:39 AM
I would think it should be the same memory cost. TG2 needs to store everything in memory at full bit depth, no compression, and all channels. So whether it's 1 image with 3 channels or 3 with 1 each, it should be similar. There should only be a minimal difference due to file container overhead.

- Oshyan
Title: Re: memory cost of 3 bw masks vs 1 RGB mask
Post by: gregsandor on May 27, 2010, 03:48:48 AM
Excellent news.  Thanks, Oshyan.
Title: Re: memory cost of 3 bw masks vs 1 RGB mask
Post by: gregsandor on June 03, 2010, 06:45:38 PM
Hang on, if I currently have 3 images, that's 9 channels.  If I combine them it reduces to 3 channels, so the overall cost is less.  Right?

Currently reading http://forums.planetside.co.uk/index.php?topic=2519.0  as I work on this.  I've combined my masks for a test and will post updates.
Title: Re: memory cost of 3 bw masks vs 1 RGB mask
Post by: Oshyan on June 04, 2010, 02:11:27 AM
I was assuming you were using 1 channel images. But come to think of it, I'm not certain TG2 supports them, at least not for all formats. Maybe TIF, SGI, and/or EXR.

- Oshyan
Title: Re: memory cost of 3 bw masks vs 1 RGB mask
Post by: gregsandor on June 04, 2010, 02:26:04 AM
How do you reduce an image to a single channel?  When I split to RGB then save one, on opening it seems to have 3.

Meanwhile, can anyone help me figure out how to seperate a RGB image into the separate channels.  I've tried constant Colour Red ---> Subtract Colour ---> Blend by Shader but get weird results.  Is there a function to do this better?

I think I've found it:  Red to scalar, Green to scalar, Blue to scalar seems to work so far.  What does scalar mean?
Title: Re: memory cost of 3 bw masks vs 1 RGB mask
Post by: Tangled-Universe on June 04, 2010, 03:43:16 AM
Here's some info about scalars:

http://en.wikipedia.org/wiki/Scalar_(mathematics) (http://en.wikipedia.org/wiki/Scalar_(mathematics))
http://en.wikipedia.org/wiki/Scalar_multiplication (http://en.wikipedia.org/wiki/Scalar_multiplication)
Title: Re: memory cost of 3 bw masks vs 1 RGB mask
Post by: gregsandor on June 04, 2010, 04:02:33 AM
Thanks.  I've converted some of my masks and updated the tgd.  Running my first test render now.  If it doesn't crash I'll consider it a success.  Meanwhile I'll read up on the links you posted.
Title: Re: memory cost of 3 bw masks vs 1 RGB mask
Post by: gregsandor on June 04, 2010, 04:03:28 AM
Damn.  Back to the drawing board.