Rendered Alphashadows - your opinion


(michi.be) #1

i needed some nice shadows for my plants i started working on (ok still preparing the assets and drawing some sketches). a terraforming station on mars needs some plants. :wink:
i made a new plant with [credits] natestah’s [/credits] plant-pack textures for testings.
my idea was to save fps if i use the same light positions in 3dsmax(with exported geometry) like in d3radiant to render my plant shadows in a seperate texture.
i added them into doom using a decal shader.
im wondering if the method is better for the performance if i use decal shadows in hot spots to save resources. or will d3 need more resources to render the decals than the shadows?? not every place in d3 has dynamic lights so i like the method. it feels like in good old q3maps2 days with this look and i have a good control of the shadows. :wink:

this is the result thrown into a quick test-scene:


(swelt) #2

From what I’ve seen, shadow volumes are expensive in framerate, where decals seem almost free. On that basis, this sounds like a good idea, especially for the low plants you have used. For taller plants, where the player is going to be underneath, probably wouldn’t work as well.


(def46) #3

Well those plants are a special case, you couldnt get properr shadows with those alpha-masked textures anyway. The decal shadows look good (the right most one seems to clip into the ground).


(michi.be) #4

the right most one seems to clip into the ground).

No,“Mr. Final Render” hjad a problem with my AA Settings for the shadow. i was to lazy to render it again. :wink:

For taller plants, where the player is going to be underneath, probably wouldn’t work as well.

if you are concerned about the shadwos a tree would cast onto the player i will try to use the rendered shadow as a light-shader so you can use a projected light. this will cast some kind of effects onto the player (like the dropship lightshader). the lightcount would raise up but if you use a terrain it have onky one light (skylight). and a lightcount of 2 is ok.

I have not much time atm to test this stuff but maybe in a few days.


(Dev/Null) #5

It seems like a good, fairly simple way to save fps. I’d even been considering something like that myself, as a way to solve the “stencil shadows look like crap outdoors” problem, but here’s the rub: players/weapons/items won’t cast shadows unless shadow volumes are turned on for that light, and wouldn’t that kinda defeat the purpose in this case?


(MindLink) #6

can’t you set up shaders/models to not cast shadows anyways?
you won’t need 2 lights, simply tell all your alpha shadowed stuff not to cast any volume shadows, use the decals instead, and have one big skylight casting normal volume shadows for everything else, voila, problem solver.


(michi.be) #7

i need two lights in the case of the “high-plants” like trees. because if i only use the decal shadow there will be no effect on the player/weapon when you are standing under the leaves. so you need one skylight to eluminate your global scene and one more projection light with the lightShader.( 1+1=2). :wink: :wink:
of course all the models have the noShadow parm in their .mtr’s.

players/weapons/items won’t cast shadows unless shadow volumes are turned on for that light

there will be always one light. the model dont cast shadows. the shadow is a decal texture.
its definately time for a testmap with all the shaders in it. g


(Dev/Null) #8

Ah, I didn’t know about that param. Cool! Maybe decent-looking “Far Cry”-ish maps on the Doom 3 engine aren’t too far off…


(michi.be) #9

ok i finished my tests and made a small samplemap.
the effect under the tree is made with a light shader. shadwos are decals. more infos in the readme.txt
just take a look at the .map
it can make your maps make look good in some places but also can make it more ugly. :wink:

link: http://www.level-designer.de/michibe_RenderShdws.zip

shot: http://www.level-designer.de/d3_renderedalpha.jpg

PS: is there a sampleshader out there that shows two different materials in one .ase??? as you notice the bark has no shader :frowning: the leaves have.


(Black Dog) #10

PS: is there a sampleshader out there that shows two different materials in one .ase???

That wouldn’t be a material/shader issue, but a modelling one. You’ve got to have a separate object for each material used, because D3 doesn’t support sub-materials.

I think that’s right, anyway - the exporter I’m using only does one object at a time, so it’s not an issue for me. :slight_smile:


(michi.be) #11

ah ok. thx black dog. so i need the bark as one model and the leaves as a second.


(ratty redemption) #12

has anyone used alpha shadows and these lighting tricks to fake shadows on a forest or large number of trees?

although I dont have d3 yet, Im very interested in finding ways making forest type maps, which I can in et and ja… although my outdoor maps wouldn`t need to be as dense foliage or large viewing distance as far cry.