Black to Transparent Gradient Texture? Created 12 years ago2012-08-30 23:18:10 UTC by winds winds

Created 12 years ago2012-08-30 23:18:10 UTC by winds winds

Posted 12 years ago2012-08-30 23:18:10 UTC Post #309476
Hey guys,
I'm trying to texture one of my brushes with a black color that gradients to transparency. Kind of like this:
User posted image
Where the white is transparent. However i'm kind of unsure how I would accomplish this. I was thinking using the additive render mode, but black is the colour it uses for transparency so that wouldn't work. Then I was thinking about using the render mode Solid and use a transparent texture with "{" but that would only make the transparency for the colours with 0 0 255 so the fade wouldn't work properly.
Does anyone know how I would accomplish such a thing?
Posted 12 years ago2012-08-31 00:02:58 UTC Post #309478
I don't think this is possible with GoldSource.
monster_urby monster_urbyGoldsourcerer
Posted 12 years ago2012-08-31 03:50:54 UTC Post #309488
You can POSSIBLY use some kind of a dithering effect with a transparency texture to do something similar, although it would probably look like crap.

The best thing you can do is actually layer up a whole bunch of brushes that are textured pure black, and set them each to an EXTREMELY low visibility. You can create a gradient effect if you have enough of them, to the point where you can barely make out the edges of each individual brush. Better yet, this same effect is used with non-solid brushes to create pure black tunnels and such that you can walk thru without actually being able to see the other side.
Posted 12 years ago2012-08-31 10:54:03 UTC Post #309492
User posted image
{whatever
16x16
Render mode: texture
FX ammount: 255
Scale it a dozen times

Dunno should work
Posted 12 years ago2012-08-31 12:17:47 UTC Post #309494
As far as i know you can make ANY texture see trough by modifying FX amount.
Stojke StojkeUnreal
Posted 12 years ago2012-08-31 14:13:55 UTC Post #309496
Yes, but the problem is that he wants the black area to be opaque and the white to be transparent. Regardless of FX amount, there is no appropriate FX mode to do that.
monster_urby monster_urbyGoldsourcerer
Posted 12 years ago2012-08-31 16:06:54 UTC Post #309498
Bruce's idea sounds right. Not sure how the engine renders scaled transparent textures though, it might just end up being a blurry solid edge. Can't think of any other way though. A model perhaps?
Daubster DaubsterVault Dweller
Posted 12 years ago2012-08-31 16:09:19 UTC Post #309499
Yeah, exactly how Urby suggested. It seems weird there's no appropriate way to accomplish this. I thought for sure I was just forgetting some easy method but I guess not haha.

@srry: Yeah I was thinking about that method too, just creating a load of brushes and texturing them with varying levels of black and transparencies. I was hoping there would be another method though since this one sounds a little time consuming and would only look good if I created a lot of brushes to accomplish the gradient effect.

I was thinking I could possibly use sprites to do this? Since with sprites i'm pretty sure you can select which colour to make transparent and aren't limited to black.
Posted 12 years ago2012-08-31 17:11:11 UTC Post #309501
The { Transparent one doesn't work. I don't know if a sprite could do it... anyone ever try and make a black sprite?
Rimrook RimrookSince 2003
Posted 12 years ago2012-08-31 17:55:25 UTC Post #309503
I just tried making a sprite with Type: ORIENTED, Render: INDEXALPHA, and applying just one frame for the black gradient. In-game I made the render mode: Solid with amount 255. It worked however not very well... The gradient effect was applied but the black opaque parts were still pretty transparent. Not sure what else to try.
Posted 12 years ago2012-08-31 17:59:04 UTC Post #309504
I think it would have the same problem as an additive rendered solid entity.

I'm sure your best bet would be what srry said. Make a cartload of 1-unit thick black walls and make them func_illusionary with texture mode and like 1 FX amount.
Posted 12 years ago2012-08-31 21:07:43 UTC Post #309512
winds u tried my idea?
Posted 12 years ago2012-08-31 23:12:52 UTC Post #309513
My idea really isn't as resource-heavy as you might think.... at least, depending on the application. If we knew EXACTLY the setting this was meant to be used in, we might be able to come up with a suitable alternative.

Bruce, I don't think that's gonna work at all... { textures don't have any semi-transparent areas in them at all. The pixels are either "on" or "off". Texture filtering doesn't change that.
Posted 12 years ago2012-09-01 04:54:21 UTC Post #309516
srry, your thoughts are wrong
Posted 12 years ago2012-09-01 06:04:09 UTC Post #309521
I suppose a whole bunch of brushes with the same texture, like Bruce's, all with different sizes, occupying the same space and the same FX amount could get that sort of effect.
Jessie JessieTrans Rights <3
Posted 12 years ago2012-09-01 09:49:40 UTC Post #309525
Fucking ludicrous cockroaches listen to me for once..

You gotta fucking 32-bit gradient
User posted image
User posted image
Posted 12 years ago2012-09-01 14:31:32 UTC Post #309527
People would listen to you more if you knew how to properly communicate, i.e. without sounding like an ass.
Archie ArchieGoodbye Moonmen
Posted 12 years ago2012-09-01 14:34:57 UTC Post #309528
I was thinking that would have worked, but Rimrooks post gave the impression he had tried it and it hadn't.
Also, I can't test this at the moment and I may be wrong, but wouldn't that not work if the graphics were in software mode? That leaves sharp edges between pixels iirc, so that would just show up as black on the top half rather than a gradient.
Alabastor_Twob Alabastor_Twobformerly TJB
Posted 12 years ago2012-09-01 15:59:04 UTC Post #309530
Yes, but who uses software nowadays?
You must be logged in to post a response.