I´m currently developing an architectural visualization for a flat, with some interactive elements. For example, in the bathroom the user can switch between 3 different designs for sink, shower, bathtube etc. So when he enters a collision box, a widget appears and he can switch between the different meshes. Works great - BUT:
It means there are 3 sink meshes on top of each other, overlapping to a nearly 100%. There are just little variances regarding form, the faucet… Now when I build my static lightning, it gets build for each of the 3 meshes, but of course only one of them is visible at the time. That leads to dark splooshes on the visible one, where the other hidden ones overlap, and it creates (contact-) shadows on the walls where there shouldn´t be any.
Is there a way to fix this? Or do I have to set them all to movable and try to achieve my look with dynamic lightning?
Unfortunately there is no easy way to have them static with baked lighting. So you have to make them dynamic. This will look quite different as dynamic light isn’t as good as static lighting.
Is it just the sinks? Or are there more mesh swaps? I’m asking because you could use lighting scenarios to store the lighting for all 3 sink versions. You would need 3 levels with 1 version of the vanity each and set them to lighting scenarios and then bake the scene 3 times. A bit of an overkill but that’s the only way I can think of at the moment.
Thanks for the answer, I feared it would´t be that easy. In total there are 6 meshes with 3 variants each, so 18 :D.
I somewhat understand what you said about the idea of splitting it into 3 different levels, just can´t wrap my head around how that would work with my blueprint.
Right now I´ve got one bathroom level that contains everything. So then I would need to make a bathroom level for each design line, build the light for each level and move the blueprint that changes the meshes to the persistent level?
I´ll give that a shot, but first imma try the dynamic option today.
You might be able to get away with using a generic placeholder mesh to be the shadow caster, and have the swappable ones not cast shadows. It would have to fit within the smallest mesh to not cause black shadows, and the shadows wouldn’t be 100% accurate.
That´s true, but I guess it wouldn´t solve the “self shadowing” issue of the meshes. My experiments with movable ones have been pretty bad so far^^ Tomorrow I will split them up in 3 different levels and instead of switching the meshes, it will switch the levels. Dunno if the transition is going to be smooth, but we´ll see :D. Thx for your reply tho, appreciated.
If you use lighting scenarios, you might be able to put all of the bathroom except the sink on the persistent level, and then have a new level for each sink. You could potentially then have all three levels loaded from the beginning and just hide/show the meshes from those levels so the user doesn’t notice any transition? It’s possible unreal won’t like having multiple lighting scenarios loaded at the same time, though. I don’t remember at the moment.
Another workaround that I’ve used successfully in certain situations is to have the three sinks in different places when baking the lights, and then move them into place while keeping them statically lit at runtime. The shadows might not be exact, and you would have to be careful about how/whether they are casting lights on other objects, and obviously isn’t a scalable solution for lots of options, but in a pinch… whatever works!
That’s not how lighting scenarios work. You can’t change meshes between scenarios, it’s simply a way to have one map file with multiple setups for lighting so that for example if you want a daytime/nighttime version of a map you wouldn’t have to maintain two separate map files.
It’s been a while since I tried, so I just did a quick test. You can put different meshes in different lighting scenarios. When you build the lighting, if you have three levels specified as lighting scenarios it will build the lighting three times and include whatever is in those levels (meshes and all) in the respective build. But you can’t have them all loaded at once. If you have multiple light scenario levels loaded at the same time, it will only take the lighting from one of them. The meshes still show up from all of them, but only one of them will have the ‘appropriate’ light build data.
So you can still put just the sink mesh on the lighting level and leave the rest of the bathroom on the persistent. But you can’t just hide/show them. You’d need to load the sink levels one at a time, so probably won’t help at runtime, but might at least be easier in editor to not duplicate all the bathroom across the different levels.
I confirm that. All a lighting scenario does is store the lighting data of all levels in one location. You don’t even need a light in that scenario level as long as there are lights in any of the other levels. So you can have 2 “lighting scenarios” with different furniture layouts and they will store all the light and shadows correctly. It’s not how scenarios are meant to work in the first place but it still works perfectly well. I just used that system for a test project.
Sorry for the late reply, only just checked back and saw that it got more answers :D.
I ended up splitting it into 3 different levels and creating a blueprint that lets the player switch between those via a widget. It works, but gets a little weird with the lightbuild because the sun is in the persistent level, and other lights are in each sublevel. So when I switch between them somtimes I´ll get the “light needs to be rebuild” message altough all assets appear to be fine…Imma try and make a lighting scenario for each variant, maybe that solves that issue. Thanks again for all the feedback!