copy two graphics in one

Posted By: GorNaKosh

copy two graphics in one - 09/20/09 16:12

Hello out there...

I have two .tga graphics with alpha channel and want to combine them to one. The files have the same size, but the content have different positions (chest is in the upper part, the legs in the lower part)
The aim is having several types of legs and chests in different files, scale and combine them, save them in a new graphic-file and use this graphic in the further process of the application.
Is this possible?

cheers
Gor Na Kosh
Posted By: MMike

Re: copy two graphics in one - 09/23/09 12:05

i think it is possible.
But i think you need to give more details...

your asking if its possible or requesting a script.?
Posted By: GorNaKosh

Re: copy two graphics in one - 09/23/09 12:31

I played arround with several engine functions (bmap_blit etc), but I couldn't copy the content of two tga-files into one seeing the graphics of the first image through the alphachanel/transparent areas of the second file. I ever seen the graphics of the second image only.
I think a hint (functions, fileformat, workaround) would help me to get rid of it.

Thx
Gor Na Kosh

EDIT:
A simple example what I wanted to do. The gray color should be the transparent area:

Until now I ever seen only the pants and the shirt get overwrite...
Posted By: flits

Re: copy two graphics in one - 09/23/09 15:39

i am not sure that this whil be the best thing but you could lock de bitmap bmap_lock scan its alpa with pixel_for_bmap if its needs to be copyd use pixel_to_bmap and unlock it

if you dont know how this works and i got some spare time i mab could write a example
Posted By: Cowabanga

Re: copy two graphics in one - 09/23/09 16:16

If you need that in 3D, you can use "vec_for_vertex".
Posted By: Joey

Re: copy two graphics in one - 09/23/09 20:13

if bmap_blit is not working, you can still use the windows api BitBlt function. i'm not quite sure how to get a proper handle, though; i'd suggest you post a suggestion in the future forum since it seems quite inconsistent that the A7 blitting function wouldn't support an alpha channel.
Posted By: bart_the_13th

Re: copy two graphics in one - 09/24/09 10:44

Hmmm... Somehow that looks like something I used in Hibreed. You intend to create a model with changeable clothes right? grin Me too grin

Now I dont know about the bmap_blit stuff tongue , but what I did is combine the upper and lower clothes using FFP shader I adapt from multitexture terrain shader on wiki laugh .

I used 3 layers, 1 undies, 1 upper clothes and 1 lower clothes...
Posted By: GorNaKosh

Re: copy two graphics in one - 09/24/09 13:49

thx for the comments ... I want to create a 2D game with sprites and for this I wanted to combine the graphics. Nearly like Bart in 3D ^^
I think I will create severall sprites for one unit, scale them and check their position to each other in a while loop. So that they are together on the right positions always...
© 2024 lite-C Forums