PDA

View Full Version : Swapping out bitmaps



Nangleator
11-13-2012, 02:17 PM
I'm working on a sort of virtual awards display that has names on tiles. A lot of tiles. Over 200.

After having created over 200 .JPG files memory for rendering is gone. (32-bit issue, no doubt.) I made 1-bit copies of these images (not an image sequence, but with unique names,) and tried using a text editor to replace all instances of .JPG with .BMP in my object files. Won't load them. I even tried it in the scene file, but that has no effect on the objects.

Is it possible to correctly edit object files with a text editor?

Any other option, that doesn't involve me doing something 200+ times?

Thanks.

nickdigital
11-13-2012, 02:25 PM
Try Mike's script.
http://www.mikegreen.name/Lscripts.html#ReplaceImages

erikals
11-14-2012, 12:48 AM
it'd be interesting to know why it didn't work to edit the .txt
anyone knows...?

john_the_blind
11-14-2012, 03:17 AM
not sure 1 bits bmp image work in LW....just 8 bits work...have a try

erikals
11-14-2012, 03:20 AM
might very well be...

Nangleator
11-14-2012, 06:26 AM
Thanks for Mike's script. It crashed, perhaps because of the lack of LW support for 1-bit files?

But isn't an Index color .BMP the same memory as a grayscale .JPG?

Nangleator
11-14-2012, 06:40 AM
In a computer with 4 gigs of RAM, 50.8m of render memory? That's crazy talk!

These images are 900x900 grayscale.

109140

erikals
11-14-2012, 09:13 AM
any 3D app will have to decompress them to render them, so, compressed images will only help on the HDD space.

the InfiniMap plugin can help tough on large images...

Nangleator
11-14-2012, 09:29 AM
Yes, I understand the .JPG file size isn't the actual memory requirement for LW.

For anyone curious, I set my segment limit below what the statistics page said was my rendering memory, and it worked. Duh, I guess.

Sensei
11-14-2012, 10:28 AM
Is it possible to correctly edit object files with a text editor?


Are you kidding? It must be done in hex editor... LWO is binary file. Text editor might destroy it - depends on how particular text editor is written.

erikals
11-14-2012, 10:34 AM
myeah, but the images names are stored in the .lws, aren't they? (i can't recall atm)

i think it was probably more of a 1bit .bmp issue...

Sensei
11-14-2012, 10:58 AM
I have never heard about 1 bit bmp issue...

I made one such. Loaded no problem to LW v11.
(LW is incorrectly showing in Image Editor it has Depth 8 - no, it's 1 bit depth - I checked it in mine own game engine that has custom BMP loader. It's really 1 bit depth; BitmapInfoHeader.biBitCount is 1)
It's evident by file size (1024 * 1024 / 8 = 128 KB + size of headers)

109148

nickdigital
11-14-2012, 11:10 AM
myeah, but the images names are stored in the .lws, aren't they? (i can't recall atm)

i think it was probably more of a 1bit .bmp issue...

Changing the info in lws won't update the information that's saved in the lwo.

Nangleator
11-14-2012, 11:12 AM
Are you kidding? It must be done in hex editor... LWO is binary file. Text editor might destroy it - depends on how particular text editor is written.
That explains why I couldn't open them!

But the file names were all legible in the .TXT file, so I thought I had a chance.

It was easy to make the same changes in the .LWS file, but it didn't have an effect in the scene. I went straight to the Image Editor once it was loaded, and there were all the .JPGs, and none of the .BMPs.

Sensei
11-14-2012, 11:20 AM
When you're loading lwo in fresh scene (so lws doesn't exist) images-textures are loaded - so conclusion can be only one - images are stored in lwo ;)

What is in lws is just probably helping having correct image identifiers since beginning, before lwo will be truly loaded.

BeeVee
11-14-2012, 02:19 PM
PNGs automatically switch to indexed mode if they detect 256 colours, whereas JPG stay resolutely as 24-bit images (or 8-bit per channel) even if they only contain one colour.

B