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"

Switching objects in same location w/ static lighting

I have a blueprint set up that has 2 sets of meshes. When the player clicks on a collider, these two meshes switch. So if meshA is visible - click mouse - meshA moves and meshB becomes visible and vice versa. The objects are just moving local positions.

I would like these meshes to have static lighting. Simple enough, I just enable static lighting. However, because the objects are overlapping technically before the game begins, they cast shadows on each other during light calculations.

How can I render lightmaps of these objects without the overlap?

If this is not possible, what other strategies can I try?

Thank you!

Product Version: UE 4.12
more ▼

asked Jul 30 '16 at 02:00 PM in Using UE4

avatar image

1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Okay, based on research, this is not entirely possible. I tried looking for alternative ways to do this, so here's some food for thought:

  1. I thought about moving the objects to another level, baking them, and somehow having them stream on loading? Did not try this, but based on everything I read, this would not work. I would need to figure out how to switch specific parts of what loaded / what didn't. Seemed like a lot of effort for something that may even not work.

  2. Literally copy everything off to the side, lights / objects / everything, build it, switch those two moveable objects. They would have the right lighting / look, but this seems like overkill. I would be duplicating all light calculations, but it would work in theory. I would also have it switch floor locations so the shadows would move appropriately as well.

But seriously, do I need to do this for something so simple?

So what I ended up doing to achieve an okay look with all the parts / pieces I had in place:

  1. Set all the moveable objects to "Light as if Static"

  2. Turn off "Cast Shadow" for these objects

  3. "Use Ambient Occlusion" was left on in World Settings (some people said to turn this off, but I think it made it look worse)

This means the objects can overlap and sit on each other, be lit as a static object, but not cast shadows on each other. The two objects can switch places, look reasonable, and not cast weird shadows.

Unfortunately, they are still lighter than the static objects (but not as bad!). I wish I could have been able to unify everything cohesively and did this differently.

Being able to make an object invisible to light build would be an awesome tool to achieve these sorts of things. I could build an object, hide it, build the other object, and they would switch perfectly and look great even when occupying the same space.

Hope this helps someone else!

more ▼

answered Aug 01 '16 at 01:06 PM

avatar image

1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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