How to make moving levels (IE interior of a boat, in a storm)

Hi

I am making a first person horror game set on a abandoned boat, in the middle of a storm.
and i want the whole level to have the rocking motion one would expect from a boat in a storm.

I would also like to have loose physics objects rolling around on the floor, falling over etc, as the boat rocks.

does anyone know a way to accomplish this ?

googling hasnt given me anything so far :S

The only thing i can come up with is making the entire framework of the level (walls, floor and ceiling) a static mesh and then wobbling it in level blueprint.
but that would mean i can only use dynamic lighting, and would probably also introduce alot of other problems.

anyone know a simpler way?

Using the timeline/matinee way where you move the entire level around the player, and run normal physics on the objects, wouldn’t that be wierd when it comes to all sorts of volumes, and lights, since it would all have to be linked to the animated level geometry?
can you use static lights at all with this method? what about nav mesh?

What i had in mind is the first person version of what the game “Cold Fear” did for theire interior levels movement.

I come from a artist backround so not all that into codeing side yet, but in my head this would leave me with only dynamic lights, since all static lights would stay put when my level geometry moves (except the prebaked lighting ofc)
and arent dynamic lights way to expensive to be used as the sole way to light a game?

all answers are greatly appreaciated :slight_smile:

Everything you say is perfectly doable in Unreal. Use a timeline, matinee or custom animation for the boat, simulate physics on objects, attaching objects to a base you’d animate, etc.

Take a look at the documentation for those topics
https://docs.unrealengine.com/latest/INT/

The lighting is more of a design decision. Some options are cleverly placed lights to simulate GI, using Light Propagation Volumes or using the “light as if static” option to get a base GI.

If you want it to be an actual moving level with updating navmesh, you would need to write your own system I believe (Someone asked about navmesh on spherical levels and got an answer from the staff). If movement isn’t incredibly steep, you could use the built in rebuild at runtime option but I haven’t tested its speed on full scene rebuilds every frame.

My recommendation would be to use a static boat and have the environment move around it. This would allow you to use static lighting.
You could then use physics impulses to simulate the objects falling around and have much more control as how they behave. Then, use a camera animation for all the wobbling and with a clever setup, you could sync impulses, camera animations and the environment animations.
Navmesh would also not be an issue this way.

Now, about dynamic ligting being expensive, that depends on your setup. Lights only affect performance significantly when they cast shadows. You can have 4 overlapping dynamic shadows at the same time (including sky and directional, even if they aren’t in range) but any amount of non shadow casting lights at any given time.
https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/Shadows/index.html

Thank you both for your quick replies.

So to get navmesh working properly, i would have to go with tieing everything to a up vector, thats what seems like the easiest solution.

Do you have any more specifics about how i can go about tieing it all up? can it all be done in blueprint?
(im an artist, c++ is way out of my league)

Regarding dynamic (movable) lights, they dont take much or any performance at all if i bake the shadows, then turn shadows off in the light, and then move the light dynamicly, correct?

Getting very close to a full solution here, thanks guys :smiley:

It’s probably easier to tie the camera, the skybox, the gravity vector, and the sea surface to a single up vector, that you can animate. The rest of the level can be still. If you tilt gravity with the animation, then tilt the camera to be “up” related to gravity, and then tilt the skybox and sky around the center of the level based on the same, things will behave as if the level tilted.

You may want to add animation behaviors to your characters so that they lean with the gravity tilt, too.