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"

change light from static to stationary = half framerate?

Hi there,

I've been working with static lights in my VR scene so far. But now that I am introducing movable objects (cubes), I believe I need to set the main scene light (blueish point light high above the ground) from static to stationary, so that the movable objects (A) receive dynamic shadows from the tree and (B) are not completely black.

The problem is once I do that the framerate drops from 90 to 45. Can this be? Can one single stationary light cause such a frame drop?

Any idea how I can tweak the light / shadow settings so that I can keep the 90 fps with the tree casting dynamic shadows on my movable objects and on the floor?

Here are two screenshots to better explain what I mean:

1.

All static lights, movable objects pitch black, no dynamic shadows.

90 FPS

alt text

2.

Just one stationary point light in the sky, movable object receive light and shadow, ground receives shadows.

45 FPS

Side question: why does my floor mesh suddenly look to spotty?

alt text

Any hint would be appreciated!

Thanks very much,

Rob

Product Version: UE 4.13
Tags:
static_lights.jpg (358.7 kB)
stationary.jpg (343.2 kB)
more ▼

asked Nov 15 '16 at 05:15 PM in Using UE4

avatar image

robleger
1 1 4 6

avatar image robleger Nov 15 '16 at 05:22 PM

I just set the point light's mobility to movable (even though it doesn't really make sense for a moon):

  • overall shadow quality is much better

  • spotty artefacts on the ground are gone

Still, I have the problem of the aggressive framerate drop.

alt text

movable.jpg (437.1 kB)
(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Two things:

  • The cost of a non-static light is proportional to what it affects. If you have a non-static light which is affecting your entire level, then yes, it can be hugely expensive.

  • Your framerate dropping from 90 to 45 FPS doesn't indicate that your scene got hugely more expensive, it only indicates that it caused your framerate to dip under 90FPS. If you were running at 90.1 FPS and your change causes you to dip to 89.9 FPS, your project will start running at 45FPS because of VSync.

While it's certainly possible that you might be able to get things running at 90 FPS again, I'd take a harsh look at whether you really need dynamic shadows in your project. High quality, dynamic shadows are hugely expensive, and you're going to have to sacrifice a lot to get a VR project running at framerate. At the very least, consider faking the dynamic shadows with cheaper, non-lighting options, such as decals. Failing that, if your heart is set on having dynamic shadows, consider using a directional light instead of a point light so you can use cascaded shadow maps.

more ▼

answered Nov 17 '16 at 09:33 AM

avatar image

Teiwaz
619 23 27 53

avatar image robleger Nov 17 '16 at 12:11 PM

Okay, thanks, I think I understand. I guess dynamic shadows are for smaller lights only, right? Like torches.

So...

Scenario 1: I disable dynamic shadows alltogether. How do I prevent movable objects from turning pitch black (s. first screenshot).

Scenario 2: "...faking dynamic shadows with non-lighting options, such as decals." How would I do such a thing?

Scenario 3: Use a directional light instead. If I do that, my whole scene turns bright, but I only want the light to be in the center (under the tree). Is there a way to have the directional light only affect the center?

Thanks again!

avatar image Teiwaz Nov 22 '16 at 10:29 PM

I'd have to see your setup to tell why your objects are black. Static lights should have no problem affecting dynamic actors unless you've done something weird. The first thing I'd check are the lightning channels on your object and the lights in the scene to ensure they overlap.

The decal route would essentially mean authoring a 2D texture of the shadows which are being cast into the area from the perspective of the light. (Doesn't need to be exact. Just like, outlines of tree branches. Something like this: http://www.123rf.com/photo_31543196_stock-vector-tree-branch-black-shadow.html) Then add a deferred decal which projects that texture into the area affected by the light, aligned to the direction of the light. Make sure the decal affects dynamic objects.

Directional lights affect the entire scene. I'd thought that's what you were after. If you just need a small spot on the ground, you may see some performance benefits from using a spotlight with a suitably restricted outer cone since it should affect fewer objects. I'd still try to stay away from dynamic shadows and find an alternative if you can, though.

(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