How to make rotation and translation options available while choosing source file for VR Sink ?
9 次查看(过去 30 天)
显示 更早的评论
I am trying to animate a 3D model by giving some rotation and translation values in Simulink. I know that I need to use a x3d file to proceed. My step by step process is as follows.
1.I create a 3D model in Solid Works.
2.I save the model I created as .wrl file since Solid Works does not give option to export as x3d as far as I know.
3.I open the .wrl file in V-Realm Builder and save it again to convert from gen 1 VRML to VRML97
4.Then using 3D World Editor from Simulink 3D Animation Toolbox I convert the model to .x3d format
5.Now in theory I should be able to use the model in Simulink with VR Sink block. But when I try to import the model;
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1311210/image.png)
I can't choose translation(SFVec3f) and rotation(SFRotation) options to give them values manually.
Am I suppose to create a moveable area for my model to move in? Or define a World that wraps the Model ?
I would really appriciate if someone can tell me what am I doing wrong here exactly.
I can provide more details if neccessary.
0 个评论
采纳的回答
Jan Houska
2023-3-1
Hi Nuri,
any X3D node that you want to access from Simulink must be named. So please open your X3D world in the 3D World Editor, navigate to the node you want to access, right-click on the Transform label, and select Edit Name. Then type some name and save the world. Then, after you open the world in VR Sink, the black crosses next to field names will change to checkboxes and you will be able to select the fields as input signals.
Good Luck, Jan
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!