What would be the best way to simulate this object? It needs to go up and down, each slat needs to tilt seperately and it would be nice if you could stop it at any position and rotate the slats. So this means you have to simulate every slat(in this case i got 37) and that is pretty much to programm when you do it in a blueprint with timelines for every slat.
I think thats the wrong approach. A GUI, where you can change the position and angle would most likely be the best way to steer each shutter(because i have more than one) in the scene.
Could you guys help me to get a solution of how to implement the movement of this shutter in an efficient way?
A blueprint is the way, for sure. Possibly with a skeletal mesh, depending on your skills and preferences, but you can do the whole thing with two timelines, one for up and down, and the other for the angle of the slats.
If you already have the slats as meshes in the blueprint, you can put then in an array, then it’s easy to run the timeline over the array, just like you would a single slat.
Another great way is to add the slats as static mesh components at construct time. That way, you can choose the size and number of slats etc.
For a game to get the most performance out of scene you’d probably want to use vertex animation for something like this, Vertex Animation Plug-In For UE5 Tutorial (there’s even a shutter example, but a different effect)
But blueprints is likely a lot easier to setup and control.
This seems like a huge possibility to implement it in my scene.
I am quite the nooby so I have still a few questions
How did you define the “shutter number” in you graph and how can you control it in the details panel?
The scale of my slats are already in a defined measurement, so I don’t have to change it I think.
Most important question:
The movement of my shutter is a bit different than in your video. It is like this(cannot upload video yet, so its a wetransfer link, sorry ):
Is it also possible to implement this movement with your approach?
Thank you again for your help.
When you update variables the construction script runs, hence the change. But it’s also easy to convert things from construction to the event graph, ie runtime.
Your movement is more complex, because only the bottom part moves and sort of catches the slats as it lifts. Also the way they turn down when the blind comes down again.
Yes, it’s also possible to do this sort of thing in code, just more of a fiddle.
Really it depends on application:
a game or VR? → Shared Code.
Archviz / Stills / Renders? → instances or meshes are perfectly fine. Since performance is not a concern.
What would the shader do?
Well, if you make a single mesh, with 2tris per (no idea what you call it) blade, you can have the shader take care of rotating and positioning the blade.
Much like the code demonstrated above does.
In fact, you’d probably use the same 2 variables, one for height placement, and one for rotation.
The benefit to performance is that it’s all going to happen on the GPU side, and it can support a near infinite amount of shutters compared to having each shutter blade be “it’s own thing”.
The other benefit is that you can create shutter assets outside the engine, apply the material to it, and have it work right, regardless of how many shutter blades you add…
And the added benefit is that you can cause tangles and crooked blinds relatively easy by defining what vertex you want the shader to affect via Vertex Paint.
The downside is the day and a half it takes you to code something like this up
Thank you for your help so far. I learned a lot.
I tried to implement your simulation in my scene. That worked for me, but I don’t have the Know-how to implement my movement in my scene.
Could you maybe help me one more time to help me with my problem. I would appreciate it alot.
I just copied your code and tried it with a “Make Array” and a “For each loop” but it does not work. The arrows are just parents for the meshes(to set the right pivot point). Is it even possible to do this that way?
I’m sorry I am very bad at this haha.
Indeed, though not sure sequencer is what its called today? They keep changing the name for the system ever other year or so…
The idea is your sequence (or whatver is called) stores the value of the variable at every frame, and is able to go back to precisely the same value, or wind and unwind as you need during the sequence.
Similar if not identical to a timeline essentially.
I gave up fiddling with the sequencer when it turned out that all the parameters are just bound to the actors you’re currently working with, and you have to do it all again for another, even if you just move the same actor!
Epic had apparently had a go at position independent sequence at one point, but when I tried it, it didn’t work. And then I got better at blueprints…