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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Brushes stay in place in transformed level instances

When using LoadLevelInstance to load a level instance at a different location/rotation than default anything that is built using CSG brushes will ignore then transform and stay in their default positions. This includes pretty much everything in the Volume category: post-processing volumes, character indirect lighting volumes, camera blocking volumes, etc. If you eject from the pawn, you can see that the brushes' position changes, but their geometry stays at their original position.

For us, this severely limits the usage of transformed level instances since the loss of character indirect lighting volumes prevent us from fully leveraging baked lighting in dynamically-generated levels:

alt text

I'm attaching a project that demonstrates the problem:

https://1drv.ms/u/s!AuTptsxS4gtIveAwl3Wm4sqbid8XNw

Product Version: UE 4.16
Tags:
more ▼

asked May 25 '17 at 04:38 AM in Bug Reports

avatar image

manoelneto
358 8 12 26

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

4 answers: sort voted first

I made a pull request with a fix for the precomputed light volumes: https://github.com/EpicGames/UnrealEngine/pull/3627

I haven't got started on the problem with brushes. I also found out lightmap directionality breaks when level instances are rotated, which is something for another fix.

more ▼

answered May 28 '17 at 04:13 PM

avatar image

manoelneto
358 8 12 26

avatar image AXE Apr 10 '18 at 12:28 PM

Hey, we tried your fix (engine version 4.17.2) and it perfectly works in editor, but not in packaged builds. In packaged builds, some times some objects stay completely black.

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

Hi manoelneto,

It's not that the lightmass volume isn't being transformed, it's that lightmass relies on precomputed lighting. This is explained in more detail in this post. During play in your level, I'm sure you noticed all of the warnings to build lighting even though lighting was built in the tile room.

I tested several other volumes (trigger, navmesh, camera blocking, etc) and all transformed and worked correctly in your project. Even the lightmass volumes are showing they are in the correct place if you look in the details panel and click through them while ejected.

Cheers,

TJ

more ▼

answered May 26 '17 at 06:26 PM

avatar image

TJ V ♦♦ STAFF
41.1k 1009 183 493

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

I need to study the character indirect lighting source to see if its possible to displace the pre-computed light probes at all. But did you test geometric volumes? Solid brushes don't get transformed with the instances. Place a brush box in the tile level and play the "dynamic level", and this is what happens: alt text

The coordinates of the objects in the details panel is transformed, but their actual geometry isn't: alt text

more ▼

answered May 26 '17 at 06:44 PM

avatar image

manoelneto
358 8 12 26

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

I was going through the source to see what could be done in regards to the lighting. My findings:

  • Each level has a FPrecomputedLightVolume object, which is used to sample pre-computed lighting. This class has a method called "ApplyWorldOffset", which is used for world origin rebasing. The FPrecomputedLightVolume internal world offset is then subtracted to light sample query coordinates, so the data itself doesn't need to be actually moved around. It doesn't support rotation, so that would require modifications to the FPrecomputedLightVolume class.

  • Streaming levels are transformed using FLevelUtils::ApplyLevelTransform() in LevelUtils.cpp after they are loaded or made visible. All it does is loop through all Actors in the level and adjust their transforms accordingly.

  • Levels have a multicast delegate called OnApplyLevelTransform which is broadcast after FLevelUtils::ApplyLevelTransform(), which can be used so other parts of code can react to level transformations without the need to modify LevelUtils.cpp.

Since all that stuff is marked as ENGINE_API, I did a quick test which doesn't involve modifying the engine (because I didn't download the source for 4.16 yet). I created an actor class with a SceneComponent root and added this to its BeginPlay:

 GetLevel()->PrecomputedLightVolume->ApplyWorldOffset(GetActorLocation());

Then I placed one of those at the origin of the Tile level. The result: alt text

I'll download the 4.16 source code and make a proper fix this weekend.

more ▼

answered May 26 '17 at 08:21 PM

avatar image

manoelneto
358 8 12 26

(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