Forum

Transparent TGAs instead of SPRs in GLQuake

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Transparent TGAs instead of SPRs in GLQuake

Postby JasonX » Mon Jun 06, 2011 1:09 am

Any ideas of how to implement this?
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Postby revelator » Mon Jun 06, 2011 1:50 am

look at SPR32 in joequake or qrack :) darkplaces has it to but the code might not be easy to implement in a standard quake source.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Transparent TGAs instead of SPRs in GLQuake

Postby Baker » Mon Jun 06, 2011 1:51 am

JasonX wrote:Any ideas of how to implement this?


Use leileilol's Engoo 24-bit to 8-bit palette conversion. I'm assuming you are talking about a software renderer here.

If not, use sprite32 which as far as I know (I'm not particular spritey, so I could be wrong) is 32-bit (24 bit color + alpha channell) and fimg supports sprite 32 I believe.

Seems like most engines support sprite 32, probably the easiest to rip from if you are using a GLQuake-like engine and not a software renderer is Enhanced GLQuake or JoeQuake (DarkPlaces support Sprite32 as well obviously).
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby revelator » Mon Jun 06, 2011 1:53 am

hehe looks like we posted on top of one another baker :)
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby Baker » Mon Jun 06, 2011 2:27 am

reckless wrote:hehe looks like we posted on top of one another baker :)


8)
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby JasonX » Mon Jun 06, 2011 3:06 am

JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Postby Baker » Mon Jun 06, 2011 4:10 am



It has external texture loading for sprites in the tutorial code, so it should.

You'll have to follow the sprite frame replacement texture naming convention in the that tutorial ... likely 1 external texture per sprite frame.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby mh » Mon Jun 06, 2011 12:53 pm

That code will break because it doesn't account for the case where a sprite may have the same name as an MDL.

Check out pak0.pak in ID1, for example:

progs/s_light.spr
progs/s_light.mdl

DarkPlaces uses a slightly different naming convention for both sprites and MDLs which should be followed by everyone; it doesn't strip the extension from the sprite/MDL name before appending the frame number/etc.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest