Digital Paint Discussion Board

Development => Mapping => Topic started by: IronFist on February 29, 2004, 04:46:52 PM

Title: Sprite entity in next release? JPG transparency?
Post by: IronFist on February 29, 2004, 04:46:52 PM
Anybody who has played some CS knows that there are some very nice maps that make use of sprites (2d planes that are textured, usually foliage and stuff) to give a nice atmosphere.
I was hoping that this was a trivial matter to implement into the next build :D

Another thing, I remember a while back that the textures (WAL only?) can have a transparent RGB value, if this is true for JPGs, what value is it? Then I could use a brush with a 1x1 trans texture, and one face as my "sprite".
Title: Re: Sprite entity in next release? JPG transparenc
Post by: IronFist on February 29, 2004, 07:29:12 PM
While I'm in the imaginationizing mood, I might add two more leet features:

1. Allow toggle-able lights, I think it has to be in DM mode for this to work (isn't Q2 *always* in CTF mode or something, while DP is in it's own game mode?)

2) A option to reset entities in the worldspawn? Like in a siege map with a fun_platform boat/vehicle, it'd help if entities would be reset to original positions when the round ends, otherwise you have to make a loop of vehicles or something...
Title: Re: Sprite entity in next release? JPG transparenc
Post by: Xile on February 29, 2004, 07:35:15 PM
Quote
Anybody who has played some CS knows that there are some very nice maps that make use of sprites (2d planes that are textured, usually foliage and stuff) to give a nice atmosphere.  


You can do this easily. Just use trans33+66 and it should work =]
Title: Re: Sprite entity in next release? JPG transparenc
Post by: snipperdag on March 01, 2004, 04:14:56 AM
Quote
Anybody who has played some CS knows that there are some very nice maps that make use of sprites (2d planes that are textured, usually foliage and stuff) to give a nice atmosphere.


I believe we're on about tga texture's with an alpha layer. Theoretically usable in pb? I havent tried yet as im still in the standard pb textures. :)


Snipperdag
Title: Re: Sprite entity in next release? JPG transparenc
Post by: punkkid on March 01, 2004, 02:37:42 PM
Ironfist,  I've just been playing around with partial transparency lately.  I used the rust tutorials.  I think the site is www.game-design.net or something.  Just search for rust tutorials or something.  Anyway, you can follow that tutorial, just change the transparency color they give to whatever the DP transparency color is.  That was one of your questions, wasn't it.  I'm not sure of the RGB, but I think its cyan.  Its the last color on the color palette.  As far as sprites.  I've always thought that those flat textures to mimic tall grass and brush looked really cheap and not realistic.  I'm not a big fan.  But in that tutorial, you can see how you might make something like that.  They make a cob web.  basically all sides of your brush would be have a transparent texture and then the one side would have a partial transparency.   Hope that helps.  In a little blatent self promoting.  I've made some partial textures that look really nice (at least I think so).  I made a chain link fence one that I like and a couple of grating textures.  Let me know if you want to see them.  Oh yeah.  I'm still looking into the difference between jpgs and wals, but I just made wals since you need that for BSP anyway.
Title: _
Post by: IronFist on March 01, 2004, 04:28:07 PM
Post removed
Title: Re: Sprite entity in next release? JPG transparenc
Post by: jitspoe on March 01, 2004, 04:41:44 PM
Make a 32-bit TGA texture (one with an alpha channel for transparency).  Apply it to a brush.  Check trans33 and trans66 on the surface properties of the brush.  If you only want one face of the brush, apply "nodraw" or "skip" (One of those  should work) to the other faces.
Title: _
Post by: IronFist on March 01, 2004, 06:47:40 PM
Post removed
Title: Re: Sprite entity in next release? JPG transparenc
Post by: jitspoe on March 01, 2004, 09:06:20 PM
Photoshop does it.  Paint Shop Pro does it (but you have to do something weird like make a selection then "save selection as alpha channel" or something like that).  I'm not sure if Fireworks does it or not.  Have you tried saving an image that had transparency as a tga?
Title: Re: Sprite entity in next release? JPG transparenc
Post by: snipperdag on March 02, 2004, 03:52:02 AM
I can write a tutorial based on paintshop pro 7 if required no probs :)

If anyone uses it though lol


Snipperdag
Title: _
Post by: IronFist on March 02, 2004, 02:27:41 PM
Post removed
Title: Re: Sprite entity in next release? JPG transparenc
Post by: snipperdag on March 02, 2004, 03:02:56 PM
Looking good :)

What do they come out like in a lit map? I'd agree with u sometimes they come across as cheap, but thats down to the brightness of them. They have a habit of looking tacked on. Gamma em down a touch if they dont work so well in darker conditions but im looking forward to the map u got there :)


Snipperdag
Title: Re: Sprite entity in next release? JPG transparenc
Post by: jitspoe on March 03, 2004, 02:55:38 AM
Hmm, there is the problem that the compiler tools don't store any light data for transparent surfaces.  I'll fix that if I ever get around to making my own tools.

Oh, if you want to make it so you can shoot through the fence, you can apply "mist" to the fence contents, and put a clip texture so you can't walk through the fence.
Title: Re: Sprite entity in next release? JPG transparenc
Post by: FourthX on March 03, 2004, 07:45:14 AM
Be aware mist & window flags are incompatible, if you make the brush misted you must click the nodraw flag for each unneeded face.

FTX

ps. Here's a tree I'm working on for my new map :) http://earth.prohosting.com/fourthx/sshot13.jpg (you may need to cut and paste the link, not sure)
Title: Re: Sprite entity in next release? JPG transparenc
Post by: punkkid on March 03, 2004, 08:44:28 AM
You know, I was thinking about the idea of being able to shoot through a fence texture.  My thought is; in reality, if you shoot at a chain link fence from from a moderate to far distance(not up close) the chances of a paintball actually making it through without changing direction or stopping is fairly low.  Sure some would go through every now and again.  But not all.  Ideally it would be nice to have some stop and some go through.  But that's probably not possible or too much hassle.  Given that, it would probably be more realistic to have paintballs just not go through fences.

That's just my take.  I could be wrong.  Seeing as how I've only used a paintball gun once.
Title: _
Post by: IronFist on March 03, 2004, 10:03:56 AM
Post removed
Title: Re: Sprite entity in next release? JPG transparenc
Post by: jitspoe on March 03, 2004, 12:02:12 PM
Quake2 physics are approximate and only calculated every 10th of a second.  The only way the ball will slow down is if it happens to be in that sliver of water during the 10th of a second that the server is doing its calculations.  Since the velocity of the balls is so high, they will almost always be on one side of the fence one frame, then the other side the next.  If you stood at just the right distance from the fence, you could probably get it to slow the balls down.  That's not really realistic, though.  Paintballs will either go through the fence or hit it.  I might be able to make some sort of special entity where you can specify the probability that the ball will pass through.
Title: Re: Sprite entity in next release? JPG transparenc
Post by: Excalibur on March 03, 2004, 02:15:14 PM
if i had the patiance to make a tree like that i can make some great great great maps but im just too lazy :)
Title: Re: Sprite entity in next release? JPG transparenc
Post by: FourthX on March 04, 2004, 12:24:16 PM
lol the tree took 2 minutes to make
Title: Re: Sprite entity in next release? JPG transparenc
Post by: Excalibur on March 04, 2004, 02:01:07 PM
how did you do it? did you make it with brushes of a map just like a wall or is it a model?  cause i once made this forklift for q3 map i was working on and it took like 2 weeks and even then it looked like excrement
Title: Re: Sprite entity in next release? JPG transparenc
Post by: Anrkist on March 06, 2004, 08:58:33 AM
Creating an Alpha Channel in photoshop is simple. Select the area you want to be trasparent using the marque tool "dancing ants", go to window/channels and click the "New channel" Button at the bottom of this window. Boom, your done. (about 20 other ways this can be done, just happens to be my favorite)

To my knowledge only PNG-8, GIF and TGA support trasparency.. im sure theres others, but who the hell uses them.
Title: Re: Sprite entity in next release? JPG transparenc
Post by: jitspoe on March 06, 2004, 10:01:01 AM
I think there's some kind of jpeg2 that supports transparency.  That would be nice to have.
Title: _
Post by: IronFist on March 06, 2004, 10:16:24 AM
Post removed
Title: Re: Sprite entity in next release? JPG transparenc
Post by: FourthX on March 06, 2004, 12:26:48 PM
Excal, the trun is a 4 sided pyramid with the top chopped off, the branches are made up of total of 2 brushes crisscrossing each other. Maybe I'll make a little tutorial when the map is done.
Title: _
Post by: IronFist on March 06, 2004, 02:11:06 PM
Post removed
Title: Re: Sprite entity in next release? JPG transparenc
Post by: jitspoe on March 06, 2004, 04:27:38 PM
Also possible that I fubared the styles when doing the lightmap adjustments.  I thought I compensated for them properly, but maybe not.  You try your map in regular old Q2?
Title: _
Post by: IronFist on March 06, 2004, 05:59:19 PM
Post removed