Animate lights actors for a Concert based game

Hello.
Disclaimer: French so my english might not be perfect sometimes. And still learning Ue4. (Not a pro)

I’m currently working on a project where I’m re-creating a concert hall from my town.
I’ve almost completed my project but I’m stuck now on a “major” issue.
Basically I want to be able to create presets for my stage lights.

The steps I’ve done:

  • I imported a “Lyre” model and created a BP with all the parts:

I made it that way using multiple variables so I can change the positions of the lights, beam color and visibility directly in the editor. (Don’t know if I used a good method ^^)

So then I duplicated this BP in my level to get all my lights: (Lyre1, Lyre2, Lyre3 etc …)

And now I would like to do two things:

  • First give the player the option to edit the lights directly in game using a 3d widget on a light console (Rotation, light color, and intensity)
  • Second wich is the most important. I want to be able to create directly in my editor some light show preset and allow the player to trigger them using a 3d widget.

When I say “Light show” I’m talking animation basically. I want to control each lights. Change their rotation, light colors, intensity etc …

Example of what I’d like to do:


I don’t know if what I started to do is good. Or if I need to use a different method. Hope I gave enough information and thanks in advance if someone is able to help me.

Up ? Anyone please.

Interesting concept. What you’ve got should be workable.

First give the player the option to
edit the lights directly in game using
a 3d widget on a light console
(Rotation, light color, and intensity)

Which part of this do you need help with? 2d widget, 3d widget, hooking up the controls or the whole lot? Do you have a design for this already? Sliders / buttons, mouse / keyboard?

Second wich is the most important. I
want to be able to create directly in
my editor some light show preset and
allow the player to trigger them using
a 3d widget.

Also doable. I’d start with creating a struct that holds the data you mentioned. You can then create an array of struct and configure the variables. Animation would a matter of stepping through an array and lerping between the values.

Alternatively, the above can placed in a DataTable or even done in a spreadsheet and imported into the engine, ready to use.

Ah ! Everynone we meet again ! Haha
Well I already know how to create a 3D widget. I’m already using one to play the songs and control them.
And for the controls I don’t really have a design right now. I was trying to use the physical sliders available on the light console, but I don’t know how to control them independently and select them just by clicking on them or even use them as a real slider (analog)

Also doable. I’d start with creating a struct that holds the data you mentioned. You can then create an array of struct and configure the variables. Animation would a matter of stepping through an array and lerping between the values.

What kind of data ? I don’t really know what to store. The only way right now I can move the light. Is using the variables I created and added in the viewport. But when I change this variables in game nothing happens …

A good start would be to figure out how to animate the sliders of my light console and select them with the mouse and move them up or down (Bonus: Have them highlighted when the mouse is on them) . But my last attempt on that failed. I don’t know how to animate that using 3ds max. And I don’t know of to use my mouse to select them in game.
(I’ll post some screenshots asap)

And about the light console. I know I can import it only with the core as a static mesh and the sliders independent as a skeletal mesh I guess ? But I’m pretty sure the best would be to do that directly in 3ds max and import the whole mesh as a skeletal.

This are all the variables I have to control the light:

If I edit them in the editor the light rotate fine, I can change the color etc … But If I hook them to a widget and print a string to make sure the value actually change. Well nothing … The value change but the light doesn’t rotate.
So the idea would be to keep that “system” to control the lights. For instance you press button A1 to select the first light. Then you move the slider controlling the Y axis of the head and the head of the light number 1 should move.

I can give you more informations on how I want this console to work if you want :wink: (Pretty much like the real one irl lol)

I was trying
to use the physical sliders available
on the light console, but I don’t know
how to control them independently and
select them just by clicking on them
or even use them as a real slider

You’ll need to decide whether you’ll be using a 2d / 3d widget for this or a physical sliders. Widget would be easier since you have the UMG designer to do the whole console, and it already comes with sliders and buttons. Skeletal meshes is not my area of expertise so I may not be of much help here.

If you want it fully 3d and physical, my gut feeling tells me that it would be more convenient to do it UE4 rather than in an external app. So yeah, model the console and buttons (in 3ds, 1 of each) plus any knobs, bells or whistles you might need - just static meshes. But I’d assembly this in the editor. Doing sliding buttons shouldn’t be difficult especially if they only move on 1 axis. Again, your choice when it comes to widget / physical console. Do tell.

If you know a better way of doing it with skeletal meshes, you should definitely go ahead with that, though!

What kind of data ? I don’t really
know what to store.

You’ve listed the data yourself. In the attached image, wrap it all in a struct; it will come really handy as soon as you start working with objects. Also, when you start doing the animated sequences.

A good start would be to figure out
how to animate the sliders of my light
console and select them with the mouse
and move them up or down (Bonus: Have
them highlighted when the mouse is on
them) . But my last attempt on that
failed. I don’t know how to animate
that using 3ds max. And I don’t know
of to use my mouse to select them in
game. (I’ll post some screenshots
asap)

Do not create any animations in 3ds max, it’s not necessary. The whole point is to do it in the engine, it has to be fully dynamic. Pressing and highlighting buttons is easy. I’ll try to post something tomorrow morning.

Here’s the basic idea, each button is an actor with its own functionality but inheriting from the base class button since certain methods should be universal (like highlighting, in this example):

Image from Gyazo

Some buttons can be pushed, and the slider can be operated manually (that’s the extended functionality):

Image from Gyazo

The buttons are nested in another actor via Children Actors - so you can swap the buttons in / out as you see fit (to make if fully dynamic, you’ll need a lot more work with setting up Dispatchers - this is just a test run):

258704-console.png

Currently, the lights are hardwired to the buttons (as requested) but the buttons communicate with the console via Dispatchers - this makes it relatively spaghetti-free. The lights can be detached as completely separated objects, of course. Up to you.

Image from Gyazo

This should give you a rough idea regarding how this can be fleshed out. The project is attached below:

https://drive.google.com/open?id=1iunhTV8lTcaaK5IhtwydeD8TweUn6PJr

Thank you.
Well I’ll focus on finishing the model first and then I’ll try this method :wink:
I’ll update you with some screenshots asap.

Quick question:
Nothing to do with the lights but right now my 3d widgets are broken. Last time I used them they where fine. But right now I’m no longer able to click the buttons. The displays working. I can see everything fine. When I place my mouse over the buttons they doesn’t change color as they normally do …

I think it’s this:

It’s a widget component setting.

I already have the “Window Focusable” check
This is one of the failing widget:

The left button + the send button works but not the right one. And on another widget none of them works

EDIT: I tried launching the 3d widget as a 2d widget, using the add to viewport. And on the 2d version all the buttons are working. I really don’t know what I did wrong since two days ago it was working fine …

It’s Receive Hardware Input, the highlighted option.

Already checked that. No difference … I don’t get why this is happening lol

Nevermind just find the issue… I added a triggerbox in my actor bp (to turn the console on when the player’s nearby) I placed a widget outside the trigger and it worked. So now I’ve edited the box scale and it’s fixed ^^ Weird issues … lmao

In the mean time I’m still working on the console model. I’ll have some more info/screenshots for you tonight if you are interested

I tried using your project but I’m stuck and I don’t know how to migrate it to mine properly. I don’t want the lights in the same BP as the Console. (if possible)
But I really don’t understand your project and the way you did it…

Positive point: I’ve completed my console (mesh) imported the base and all the buttons I want to control in differents fbx
so they can be controlled individually.

Perhaps the best course of action is to take some time and study blueprints comms, most of youe issues seem to revolve around passing information around. Have a look at direct communication and event dispatchers. Set up a separate test project and see if you can send information to and from actors. Both spawned dynamically and placed manually in the level.

Basic docs:

Or you can have a look here for more info about dispatchers by me:
https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1527832-event-dispatcher-between-2-blueprints

Or this old thing:
https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/72814-event-dispatchers-explained-finally

Well I’m already using dispatchers in this project. And I have actors interaction with that.

I might have figured it out.

But … ran into an issue with the slider. The slider on my console is bottom position (0) and I can slide it bellow the actual console model and above. What I need is to know what settings to change to make sure the button is at 0 by default and can only climb to max position (100)

I tried tweaking this (in the slider BP):

But didn’t work like I hoped. (The slider was no longer starting at 0 and the light wasn’t changing intensity

amazing project! But I think you have read quite a few hours about the arrangement of the concert venue.