Light shining through textures?

Sorze

Newbie
Joined
Nov 1, 2003
Messages
476
Reaction score
0
I've been wondering something for a while, I hope someone can answer this...


You all remember those textures that use that blue color right? That blue color that's used as a transluscence indicator, wherever that blue color is, the texture won't be rendered?

Good. :)

What I want to know is, is it really not possible to make textures like that cast correct shadows?
Chainlink fences, for example, are usually made with textures like this, and they would look incredible if they could cast correct shadows!

The reason I don't think it's possible is that even Doom 3 doesn't cast "correct" shadows from these types of textures, and well... I'm betting ID pretty much made everything as spiffy as they could with that one... :p

2 example pics from Doom3 below...


So anyone got the goods?
 

Attachments

  • shadows.jpg
    shadows.jpg
    85.7 KB · Views: 430
  • chainlinkfence.jpg
    chainlinkfence.jpg
    83.1 KB · Views: 345
Hmm, didn't both Splinter Cells have that kind of lightning.
 
I don't really think a chain-link fence casts much of a shadow in real life, we'll just have to see what they come up with...
 
Ghost Freeman said:
You can do that with Pixel Shader. So its safe to say yes.

Err what?

Pixelshaders affect the object their on, they can't make the object cast shadows on OTHER objects, I'm pretty sure of that.

I'm talking about the fence shadowing the wall/floor behind it properly, etc.


EDIT: I'm quite sure HL2 doesn't support it eiter, check the strider bink. If I remember correctly, the lift Gordon's on is the same deal, but doesn't cast correct shadows...¨

It doesn't seem like it would be a big deal; If the texture is that certain shade of blue, don't render, and let light through....
 
The reason why the chain link fence won't cast shadows is because Doom3's shadowing solution revolves around a per-vertex shadow, meaning that a shadow won't exist for a partially transparent texture, but it would exist for the edges of the triangle displaying said texture. It is possible to do with a pixel shader, as Unreal Engine 3's soft shadowing solution accomplishes it (doesn't make it better though. I think UE3's isn't actually that great compared to other soft shadows ).

For more information on how shadow volumes and Doom3's lighting system in general works, you can go here
 
Pixelshaders affect the object their on, they can't make the object cast shadows on OTHER objects, I'm pretty sure of that.

Through some trickery you actually CAN do it with a pixel shader, it's a technique called shadow mapping.

First, from the light's point of view you render the scene (or part of it, up to the light's range) into a texture storing the depth information (depth is basically the distance from the light) through a combination of vertex and pixel shaders. Then, the scene is rendered from the camera's POV, with a pixel shader comparing the distance between each pixel and the light, and comparing it to the already generated shadow map. If the depth/distance is the same, then it's in the light, else it's in shadow.
 
Ok, so it IS doable then?

Wonder why Doom3 doesn't do it?



So one would have to get down and dirty with shaders (coding) if you wanted to make it work in, say... HL2 ?
 
You should look at the lighting in the Unreal Engine 3.0 technology demo. They started talking about high-resolution and low-resolution shadow maps, and interpolating between them. Interesting stuff. And bl**dy good looking!

Of course, there's more to games than graphics :)
 
Doom3 doesn't do it because shadow volumes are so much better than shadow maps it's not even funny, because the shadows much, MUCH better defined. Shadow maps end up having kind of an aliasing effect which is extremely undesirable. In addition, shadow maps for point lights would require 6 render-to-textures into a cubemap, which is pretty crappy.

Oh, and you might have to have some graphics knowledge to do in HL2, but that's if you can modify the render code for mods and such, which I would be VERY surprised/blown away if you could do that.
 
MrD: Actually, it's not hi-res and lo-res shadow maps that they interpolate between. I read that it's a crisp and blurred (gaussian blur?) texture they interpolate between. If you look at the link I posted in my first post in this topic, you'll find a REALLLY exceptional soft shadowing algorithm. In fact, Ulf Assarsson (the maker of that soft shadow algo) based his thesis around the soft shadows.
 
Cypher19 said:
MrD: Actually, it's not hi-res and lo-res shadow maps that they interpolate between. I read that it's a crisp and blurred (gaussian blur?) texture they interpolate between. If you look at the link I posted in my first post in this topic, you'll find a REALLLY exceptional soft shadowing algorithm. In fact, Ulf Assarsson (the maker of that soft shadow algo) based his thesis around the soft shadows.

Basically that's what i just said with different words!
;)
 
There's a difference between lo-res textures and blurred textures :laugh:

When I say blurred textures, I don't mean the old filtering done to make the textures look smoother, I mean a post-process done to them called gaussian blur.

I've attached an example of the difference.
 
I get the difference (now), but I don't get the point you're trying to prove..? :bounce:
 
MrD was talking about an interpolation between hi-res and lo-res textures, I'm talking about a very different interpolaition between crisp and blurred textures. I'm merely setting him on the right path :thumbs:
 
* MrD resumes his journey apon The Right Path ... :) *
 
Back
Top