I've found a way to change all diffusive colors by opening the vmrl file as text and using 'replace all'. Still this is not a very clean solution and will only work in this particular case.
Scalability Simulink 3D animation
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Luuk Poort
el 24 de Mayo de 2017
Comentada: Luuk Poort
el 29 de Mayo de 2017
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.
Respuesta aceptada
Sebastian K
el 26 de Mayo de 2017
Hi Luuk,
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.
Sebastian
3 comentarios
Sebastian K
el 26 de Mayo de 2017
Hi again Luuk,
I am afraid I still do not completely understand what you are trying to achieve. You mention that there are 300 LEDs, for which the color needs to be controlled separately. This means that there are 300 independent color parameters to control.
You could try to create a Simulink library block containing a VR Sink for your LED, a connected block that specifies the color as an input. Then you could mask this block and make the color a parameter in the mask. Then you could use this library "LED block" in your Simulink models, add as many as you want, and you would specify the color as a parameter in the block dialog.
Does this sound like something that would be useful?
Sebastian
Más respuestas (0)
Ver también
Categorías
Más información sobre Interactive Model Editing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!