Scalability Simulink 3D animation
2 views (last 30 days)
I'm currently visualizing a light show with about 300 LEDs using the Simulink 3D animation package and it seems I have to handle every LED separately.
In the VR Sink, I have to enable the emissiveColor of each LED seperately and connect each LED to a separate signal in Simulink. If I now want to change the diffusive color of all my LEDs, does that mean I have to change it by hand for each of the 300 LEDs I have?!
Any help is much appreciated.
Sebastian Kammer on 26 May 2017
I am afraid I do not completely understand the issue you are facing. I will try to suggest some ideas to the best of my understanding.
You mention 300 LED objects in virtual world. Are these all identical or do they have separate properties? As far as I understand, you would like these LEDs to share some properties such as color.
If your VR Sink block has a port for the color of each LED, and you want to control the color of multiple LEDs, you could simply connect the ports to a single block (such as a Constant block that specifies a color). It is possible to branch out Simulink signals such that the output of one block is connected to multiple different inputs of other blocks. Then you could simply change the value in that constant block (or even assign it a Workspace parameter) to change the color of multiple LEDs in your model.
If you would not like to deal with a separate VR Sink input port for each LED, maybe you could try to construct your virtual world model so that the LEDs share some parameters. You might be able to do this in the 3D World Editor by using copy-paste by reference. You could copy-paste the "color" node by reference, so that the color of all LEDs in your model would refer to one, which you could then control with a one Simulink signal.
I hope this helps.