Jump to content
  • 0

UDMF/GZDoom :: Diagonal Shadows along a Wall


Lutz

Question

I would like to make a shadow like the one pictured below.  I am hopeful that since I am using UDMF with GZDoom, I can take advantage of some engine fanciness instead of using tiny sectors or a special texture -- can someone offer advice on the best way to accomplish this?

 

image.png.cbfd3ef5340c2097ba5dfd3df294358c.png

image.png

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 1

I believe you can use a sloped 3D floor to achieve this. The 3D floor itself can be made invisible, so that you only use it for the lighting effect below it.

Share this post


Link to post
  • 0

Since you are using GZDoom and UDMF, the easiest way is to use point lights: Thing types 9800 or 9840. The documentation on this is a bit thin, and I find it better to search the ZDoom forums rather than the ZDoom wiki. Here is one topic discussing how to set them up:

 

https://forum.zdoom.org/viewtopic.php?t=68084

 

If you use regular lights, Thing type 9800, then it is fairly simple. Create the thing, and be sure to position it vertically where it casts the shadow at the angle you want. Then set its intensity, where the value is pretty much the range, in map units, that the light reaches. The light shines in all directions. In the example you posted, you may need multiple identical lights across that edge to get a similar effect.

 

You can also use a spotlight, Thing type 9840, if you instead want it to imitate a real-life recessed light where it shines in a cone. In that case you need to mess with its roll, pitch, and angle which aim it in three dimensions. Sorry, but I never remember exactly how those work and I always have to test them in visual mode or in-game to figure it out. Intensity works the same, and there are two angles: inner and outer. These are sort of like the umbra and penumbra in astronomy, except with light instead of shadow. The light shines full bright in the inner angle, and fades out to nothing between the inner and outer angles.

 

There are also varieties where the lights flicker on/off at a specified interval, or pulse between off and on. Again, I always have to test those out to get the effect I want.

 

Regardless of how you set up light Things, I recommend augmenting the effect with sector lighting. With UDMF you can set independent floor and ceiling lights to make the effect more realistic.

 

One of these days I should probably create an account and document this on the ZDoom wiki.

Edited by Caffeine
improved word choice

Share this post


Link to post
  • 0

Alternatively you can go bruteforce and cut wall shadows into joined upper and lower sloped sector. GZDOOM: UDMF has separated shadow values for every surface, do lower sector and floor darker, and upper and celling normal. And you will have nice and clean cut

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...