Fake Sun Shafts in Source

The images are fucking big and stretch the page, therefore I’m not posting them straight in here.

It’s a very easy thing to recreate in Hammer, although it is very difficult to fine-tune it so it’s accurate. Basically you need to create a texture that’s like a grayscale gradient. I made it 1024x1024 px to make the texture look better when stretched on large faces.

Here’s the texture with RGB channels:

And here’s the alpha map:

Tweaking the angle and slope of the “shafts” in hammer is the most difficult part. You have to compile with your final lighting in place, then take a screen shot of that area so you know where the shadows’ edges are. Then you refer to that while in Hammer and tweak the shafts so they sort of “meet” at the edges of the shadows. For beginner mappers this sounds really complicated, but hopefully I’m explaining it well enough for more advanced users to understand. It’s 4 in the morning here.

Anyway, the texture I’m using probably isn’t the right way of doing it. The shading is probably not the best choice (some might think white should start at the top and fade in to gray) but I guess it depends on what you think looks best. What you’re seeing in the screen shot is the “dark side” of the shafts. I have a colored version of the texture that is on the other side (the “light side”). However, I still need to work on the coloring of this texture, as it’s too yellow currently. I’m trying to figure out how it should look, hopefully I can make the perfect textures for this effect.

Good night/morning, oh and don’t PM me for the texture, it’s already in the thread. :smiley:

PS: Ignore my fail door texture missing its bumpmap.

Hey it looks great so can you give us a sample map? so we can have a look at the exact setting you have used. The VMF would be great.

If you use brushes to apply this texture on, wouldn’t that mean that it is invisible when you’re inside the brush volume?

You could add $nocull to the material.

This doesn’t really look realistic at all, I have never seen “shadow beams” in my life :psyduck:

Shadow beams? Whaaat?


Guys, you you use HDR to make the shadow areas look like the regular light areas.

It doesn’t look bad actually. It would be better to use this for a map that has a fire burning in it.

This would only happen if there was smoke in the air or something like that.

That’s very true.

It’s not meant to make your map look super realistic or something, it’s just an effect to ponder.

Also, it looks like it’s a shadow beam because it’s the “dark side” of the light shaft.

Think of the area of shadow created by the light_environment as an actual volume (volumetric shaders if you will). All this does is make it look that way. When you go inside that volume and look out, you see the shafts on their light side.

It’s really hard for me to explain. This wasn’t meant as like a tutorial, just something to screw around with. You could easily make good use of this effect.

It’s more of a styilized effect. Shadow of the Colossus did this in realtime. I can’t find an example of this because it only happend with specific overhead lighting, but it was there.

Yeah, it’s not a totally exaggerated effect. It actually happens, but only when there is a lot of particles in the air for the light to reflect off of. Creating an area in the air that appears darker because of the lack of reflecting light.

In his picture for example, it looks really off because it’s so clear out. But if he added some fog and smoke particle effects it would look more realistic.

The picture wasn’t meant to perfect the idea, just demonstrate it. Anyone who wants to pursue this, just save the diffuse and alpha and make it in to a texture.

I will be working on the texture some more when I get the time.

Yeah, I know. And I think that even now it looks pretty nice. Just, if you were to actually apply it you need some atmospheric dust and smoke to make it make sense.

I know this is unrelated and everything, but what are the textures you used on the ground in the first example picture?

All the textures (excluding the skybox) are done by me.

No you can’t have them. :smiley:


Why not?

The texture should be more transparent

That looks pretty bad, I think you would be much better off trying to mimic the light rays rather than the edge of the shadow.

Looks… useful, but it could be better.