Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Nymphodora), 485 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
copy two graphics in one #290663
09/20/09 16:12
09/20/09 16:12
Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
GorNaKosh Offline OP
Junior Member
GorNaKosh  Offline OP
Junior Member

Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
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

Re: copy two graphics in one [Re: GorNaKosh] #291088
09/23/09 12:05
09/23/09 12:05
Joined: Jul 2004
Posts: 1,710
MMike Offline
Serious User
MMike  Offline
Serious User

Joined: Jul 2004
Posts: 1,710
i think it is possible.
But i think you need to give more details...

your asking if its possible or requesting a script.?

Re: copy two graphics in one [Re: MMike] #291095
09/23/09 12:31
09/23/09 12:31
Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
GorNaKosh Offline OP
Junior Member
GorNaKosh  Offline OP
Junior Member

Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
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...

Last edited by GorNaKosh; 09/23/09 12:49.
Re: copy two graphics in one [Re: GorNaKosh] #291149
09/23/09 15:39
09/23/09 15:39
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
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


"empty"
Re: copy two graphics in one [Re: flits] #291163
09/23/09 16:16
09/23/09 16:16
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
If you need that in 3D, you can use "vec_for_vertex".

Re: copy two graphics in one [Re: Cowabanga] #291206
09/23/09 20:13
09/23/09 20:13
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
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.

Re: copy two graphics in one [Re: Joey] #291278
09/24/09 10:44
09/24/09 10:44
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
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...

Re: copy two graphics in one [Re: bart_the_13th] #291313
09/24/09 13:49
09/24/09 13:49
Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
GorNaKosh Offline OP
Junior Member
GorNaKosh  Offline OP
Junior Member

Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
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...


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1