Terrain Shadows

Posted By: Anonymous

Terrain Shadows - 03/19/02 23:18

1) How can I make a terrain cast shadows over itself in real-time?
2) How can I make brushes and entities cast shadows over a terrain, also in real-time?
Posted By: Anonymous

Re: Terrain Shadows - 03/20/02 18:13

as far as i am aware it is not possible to cast shadows on terrain. Therefore the only way you make the terrain appear shadowed is to draw the shadows directly onto the skin image of your terrain.
Chris
Posted By: Dan Silverman

Re: Terrain Shadows - 03/20/02 18:36

In order to cast shadows on terrain you would have to use level geometry to create your terrain instead of the A5 HMP file. The advantages of using level geometry are that they accept lighting and shadows and can me built as entities so that they can be removed when not seen, etc. Disadvantages are that they will generate a ton of portals (unless designed wisely), and have the level geometry texture limitations (you cannot have one large texture spread over several blocks). There are other advantages/disadvantages as well, but my mind is not working to well today:).

In any case, it is difficult to build good looking terrain by hand. I would recommend you find a decent terrain generator, such as Nem's Mega 3D Terrain Generator. It will generate terrains and can save them out as .map files which can be brought straight into WED.
Posted By: Anonymous

Re: Terrain Shadows - 03/20/02 22:01

Noxerus, you can easily create a static shadowed terrain texture, as Cheets said. I did it this way:
- Import the terrain's highmap image into WILBUR (it's free!).
- With WILBUR create terrain shadows by setting sun angle and azimuth.
- Export shadow image.
- With any paint program (I use Photopaint) cover the terrain texture with the shadow image.
- Later, in WED set the sun's angle and azimuth using the same angles as in WILBUR.
Adrian
Posted By: xck3001

Re: Terrain Shadows - 03/20/02 22:21

@Dan: I didn't know this too, but I found out that hmp terrains are also affected by clip_range...
Posted By: Anonymous

Re: Terrain Shadows - 03/21/02 07:58

Adrian, thnx for the advice, never heard of that prog before but it seems very useful, but that's only great if the time of day doesn't change in my level. I asked in my question about real-time terrain shadows, i.e the sun's position is affected by the time of day.
I think I'll ask Conitec to implement real-time terrain shadows for the next ver. Please. [Smile]
Posted By: Anonymous

Re: Terrain Shadows - 03/22/02 11:17

Noxerus; i can only think of one way to cast shadows of terrain on terrain in real time; u have to make a sprite that corresponds to shape of the shadowing object (not the sprite itself but the visible part of it.) Then write an action that stretches,shrinks, rotates and maybe moves it according to the shadowing lightsource.Let this work in conjunction with the gourad shading and sunlight and you might be able to get some nice results.
Posted By: Anonymous

Re: Terrain Shadows - 03/25/02 08:13

The first screenshot on the left of the main 3DGS page - it displays the guard model standing on a terrain (which looks far too smooth not to be a height-map entity) and casting a shadow over it. Whoever made that screenshot can comment?
Posted By: Doug

Re: Terrain Shadows - 03/26/02 05:36

quote:
Originally posted by Noxerus:
The first screenshot on the left of the main 3DGS page - it displays the guard model standing on a terrain (which looks far too smooth not to be a height-map entity) and casting a shadow over it...

In that picture the dynamic shadow from the model entity is being displayed over the terrain (because the shadow is basically an entity itself). What the rest of the people here are talking about are the shadows generated during map compile time, which can't be done (yet) with terrain.
Posted By: Anonymous

Re: Terrain Shadows - 03/28/02 10:56

Doug: Oh, that "yet" is going to haunt you. [Wink]

Noxerus: what doug is describing is the technique i was talking about. Think of "drop_shadow" but with a displacement routine of the entities shadow accorrding to the sun for example.
Posted By: Anonymous

Re: Terrain Shadows - 03/30/02 11:52

if you want shadows just ok.
lets say you have a model door just make a door and then copy and paste another door on the bottom of your first door so when you kin it color the bottom door all black and make it flat and everything to make it look like a shadow so when you animate it,how ever you animate your first door you do the same to the bottom door to make it look like a real shadow.it's that easy
© 2024 lite-C Forums