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: Ade, prospero

User avatar
cieply
Dragon
Posts: 312
Joined: Wed Jun 26, 2013 3:43 pm

saving texture through game engine

Postby cieply » Thu Feb 19, 2015 6:25 am

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/Demo_Stuff.py import BBLib import Raster BBLib.ReadMMP("../../Data/logorebel.mmp") logo_rebel=Raster.BmpHandle("LOGOREBELALFA") print logo_rebel >>> 56 Raster.BmpName(56) >>> 'LOGOREBELALFA'
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=BBLib.B_BitMap24() image1.ReadFromBMP("../../Data/SunFlare.bmp") # similarly, image1.ReadFromFile() will work with .jpg image1.GetDimension() >>> 128, 128 image1.SaveToBMP("flara1.bmp") >>> 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, ...

Return to “Severance BoD: Modding Community”

Who is online

Users browsing this forum: No registered users and 2 guests