Shadows in 3d simulation

23 次查看(过去 30 天)
Sjoerd Quist
Sjoerd Quist 2024-3-7
编辑: Nishan Nekoo 2024-7-3,14:41
Right now I'm making a simulation in which I drop an onion. I want to process the images taken by cameras. However, I am having trouble with shadows because the sun only shines on one side in the simulation environment. Is there a possibility to add a second sun or a second light source? When I check the box 'overide scene wheather' in my 3D scene configuration, my simulation crashes every time and I get a fatal error. I hope someone can help me
This is the error i get when i override the weather scene configuration and run the simulation:
Error:MATLAB System block 'TestopstellingSimulinkV4/Simulation 3D Scene Configuration/Simulation 3D Engine' error occurred when invoking 'resetImpl' method of 'Simulation3DEngine'. The error was thrown from ' 'C:\Program Files\MATLAB\R2023b\toolbox\shared\sim3dblks\sim3dblks\Simulation3DEngine.p' at line 0 'C:\Program Files\MATLAB\R2023b\toolbox\simulink\ui\studio\config\m\+SLStudio\StartPauseContinue.p' at line 0 'C:\Program Files\MATLAB\R2023b\toolbox\simulink\ui\studio\config\m\+SLStudio\ToolBars.p' at line 0'. Caused by: 3D Simulation engine was terminated by the user (error code: 4).

回答(2 个)

Sarthak
Sarthak 2024-4-18
Hey Sjoerd,
As per my understanding I think you should be able to add multiple light sources. Maybe using the 'position' argument while creating your light object would help. Please refer to the documentation below:
The error you mentioned is usually driven by improper setup. If this is setup correctly, I would suggest making sure MATLAB is on its latest release.
You can reach out to MathWorks Technical Support if you are still facing this error

Nishan Nekoo
Nishan Nekoo 2024-7-3,14:40
编辑:Nishan Nekoo 2024-7-3,14:41
Hi Sjoerd,
Starting in R2024a, there is a light actor in Simulink 3D Animation: https://www.mathworks.com/help/sl3d/sim3d.light.html
You can use this to add multiple light sources to your 3D Unreal scene.
Please tell me more about this crash you are seeing. Does it happen everytime you check the override weather scene configuration or is it only when you change certain weather parameters? Is this repeatable each time you open MATLAB?
Nishan

类别

Help CenterFile Exchange 中查找有关 View and Analyze Simulation Results 的更多信息

产品


版本

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by