ScriptSpot

Forum topic · General Scripting

alpha lost while saving a render to texture in a bitmap

By cgvinny · 2012-06-11

Description

Hey guys,

small question :

I made a script makes the following steps (sorry I don't have the code on this PC : I'll post it after):

* bakes a a batch of texture (in a folder) made for UV1, on the UV2 :
°select the folder
°assign the texture to a temp mat
°render to texture
°save in a bitmap (my problem is here I think)

* Put all these textures in an atlassed texture
° use a composite map to merge all the generated bitmaps
° render and save

So my problem is that I manage to render the alpha in the "render to texture" step (I can see it in the render window), but not to save it in the bitmap, which is a TGA.

Anyone has an idea how to be sure that the alpha is saved in the bitmap ?

Thanks a lot !

Comments (1)

cgvinny · 2012-06-12

OK, for some reason, it works this morning, while I din't changed any line of code :-)

 

When I finish it, I can post it here if anyone is interested by this kind of script.