saving texture through game engine

Talk about Severance Blade of Darkness modifications and maps here. No tips or tech support questions please, use the forum above. Note that the game is rated 18 so some content may be unsuitable for younger readers.

Moderators: prospero, Ade

Post Reply
User avatar
Posts: 403
Joined: Wed Jun 26, 2013 3:43 pm

saving texture through game engine

Post by cieply »

I don't know why is that, that when you unpack a texture from .mmp (which are practically all 8bpp paletted)
and convert colour space to 24/32 bpp they become much darker than their originals, even you didn't change anything at all.
Before, I tried to pack some textures to mmp files and know that sgi's mmp compiler although excellent with 24/32 bpp images,
when it comes to save 8bpp mmp does some mess in opposition to BaBx which does it very well, but is laborious and not very user friendly.
I couldn't use it to read mmp file though, so I tried to do some trick and see whether it will change something - to save texture through
game engine itself.
here is what I found: there is way to read texture from mmp

Code: Select all

# @ Scripts/
import BBLib
import Raster

print logo_rebel
>>> 56
what it does is read mmp and loads textures somewhere, and you can access their names and handle through 'Raster' module but that's it - you
cannot access them to save into file

althought there is way to save bitmaps through engine - with BBLib, but not the same textures that reside in Raster

Code: Select all

image1.ReadFromBMP("../../Data/SunFlare.bmp") # similarly, image1.ReadFromFile() will work with .jpg
>>> 128, 128
>>> 1
but I can't find the way to marry B_BitMap24 which is some class in BBLib module with textures that can be accessed by their handles
with Raster module only ( which doesn't have any method to save files - it's for drawing on a screen after all)

anyone have some idea how to solve it?
l'aria fresca,
vino puro, ...

Post Reply