Shadows in 3d simulation
조회 수: 11 (최근 30일)
이전 댓글 표시
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).
댓글 수: 0
답변 (2개)
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
댓글 수: 0
Nishan Nekoo
2024년 7월 3일
편집: Nishan Nekoo
2024년 7월 3일
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
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!