x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Long Shadows?

I am trying to make a realistic Flashlight and I got some of the way. I currently got a Point Light with an IES Texture. It looks decent enough but I need the Flashlight to be more realistic.

If you take a scene like this:

Chair

You will see that the shadows don't continue onto the wall as they would in reality. Or even see the shape of the chair on the wall which would make sense using a flashlight. This is a horror game so it's very important that the flashlight makes long shadows and such.

How would I do this?

My Blueprint looks like this:

Blueprint

Product Version: Not Selected
Tags:
more ▼

asked Mar 25 '14 at 11:31 PM in Blueprint Scripting

avatar image

OmniOwl
214 18 24 35

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

If you shine a light directly at something you aren't going to see a shadow as the light is coming from your perception. In order for you to get that long shadow on the wall you will have to lower the light to knee height or keep it where it is and perceive it from a different location to see the results. I can assure you the way the light is acting is 'realistic' in the regard you are referring to.

more ▼

answered Mar 26 '14 at 02:12 AM

avatar image

jestersheepy
484 15 21 27

avatar image OmniOwl Mar 26 '14 at 08:31 AM

Ah, perspective. Well if that's true then I guess there is no problem.

avatar image OmniOwl Mar 30 '14 at 10:21 PM

Okay, I had another look. You can't honestly tell me that this is how the shadows are supposed to work. You can even see how the light casts a shadow on the chair itself, despite nothing actually blocks the light that would create the shadow (Up to the right on the chair): Broken Shadows

I've made the following picture to illustrate my point:

How it should be

avatar image Jacky Mar 30 '14 at 10:29 PM

The cone of the light is still too narrow when it hits the chair, you can see it at the bottom left corner of the chair as well. I see no problem there.

avatar image OmniOwl Mar 30 '14 at 10:30 PM

But the shadow doesn't even extent to the wall behind it. It stays locally around the chair.

avatar image jestersheepy Mar 30 '14 at 10:31 PM

Get your phone, turn on auto flash and put the screen up to your eye, take a picture. You will notice no shadows, then put it out to the side and do the same thing, you will see all the shadows. I don't see an issue with the picture you have posted.

Light from anything other than the sun does not run in parallel rays, the further away from the cone you get the less parallel the rays are, you are not seeing a shadow in the center of the chair because the light is hitting that directly.

Try this: replicate what you have done in that screenshot again, then while in the 'play' mode, eject yourself (You can only do this in the viewport play mode) and check out the shadows being cast out of your direct perception.

avatar image OmniOwl Mar 30 '14 at 10:34 PM

Right. I forgot the Eject button even existed.. ._.

It works

It really looks weird though, when you don't check it out this way. I don't know why that is. When I see it, my mind keeps telling me that the shadow doesn't extend at all.

avatar image Jacky Mar 30 '14 at 10:35 PM

Yeah, the best way to wrap your head around this is to grab a flash light and lock yourself in a dark room with a chair. :)

avatar image OmniOwl Mar 30 '14 at 10:36 PM

I have tried this and in the real world I can clearly tell that the shadow is extending itself to the wall behind. For some reason, this effect completely escapes me in the game :/ My only guess would be lack of depth.

avatar image Jacky Mar 30 '14 at 10:58 PM

Maybe the FOV is messing with your perception. Try higher values and see if it helps.

(comments are locked)
10|2000 characters needed characters left

Hey Vipar,

You might want to consider using a Spot Light instead of a Point Light. There's a good tutorial available here: https://www.youtube.com/watch?v=lPuBZYPEr4k

The controls might be different than what you're doing now, but the basics should be the same.

Hope that helps!

Ben Halliday

more ▼

answered Mar 26 '14 at 12:06 AM

avatar image OmniOwl Mar 26 '14 at 08:31 AM

I couldn't make the spot light work as I wanted to. You can't apply IES Textures to Spotlights unless that changed from the beta. Otherwise I would have used a spotlight.

avatar image DJMidKnight Mar 26 '14 at 04:47 PM

I have looked and you can apply IES textures to spotlights now.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question