Thanks for the example! Irrlicht3d and VulkanSceneGraph are fundamentally different under the hood. 3D objects in VSG must be given as indexed face sets with proper shading setup. Size, orientation and position must be set by a transformation matrix. For a couple of primitive objects (box, shere, cone,...) we have convenience functions. User defined objects can be loaded via 3d-graphic files. We recommend the wavefront file format (*.obj/*.mtl) because it is human readable and has an easy structure.
demo_VSG_assets shows 3D objects bound to bodies and scenery objects, which are meant for decoration (treas, houses, animals,...). The scenery objects can also be moved, oriented and sized. In the demo you have the (Utah)teapot, the (Stanford)bunny, the teleporting sphere and of course the forklift truck. You could try at first this basic approach. It should give you a similar result you have in the Irrlicht based demo. The sizing of an object only by a transformation matrix is of course limited and does not consider shape changes of the object during expansion/compression it is just linear mathematical sizing. There is a more sophisticated solution with vertex/normal/color updates but this is tricky and should not be tried as a first approach. Good luck! [email protected] schrieb am Samstag, 11. Januar 2025 um 17:57:28 UTC+1: > Hi Rainer, > > Of course. I've attached an example for you. It's an adaption of one of > your demos. I exchanged the ChVisualShapeSpring with my > ChVisualShapeMuscle. > > Thanks, > Paul > > [email protected] schrieb am Freitag, 10. Januar 2025 um 18:08:02 > UTC+1: > >> Hi Paul, >> >> can you provide us with the Irrlicht based code example.It would make it >> easier for us to understand the problem. >> >> Best, >> Rainer >> >> [email protected] schrieb am Mittwoch, 8. Januar 2025 um 19:03:08 >> UTC+1: >> >>> Hi everyone, >>> >>> I've got a little problem with the VSG visualization system. I want to >>> add a dynamic visualization similar to ChVisualShapeSpring but with >>> ChVisualShapeSurface (NURBS). I created my own class inheriting from >>> ChVisualShapeSurface and implemented the Update function. But if I add this >>> shape now to a ChLink object, nothing shows, and when added to a body, the >>> shape doesn't change. I also tested my code with Irrlicht to check if >>> everything was updated and visualized correctly what was the case. >>> >>> I tried to adjust the code in ChVisualSystemVSG.cpp but I can't make it >>> work. >>> >>> Can you maybe give me a hint on how and where I need to adjust the code >>> so that surface shapes are also dynamically updated with VSG? >>> >>> I'm using the main branch. >>> >>> Best, >>> Paul >> >> -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/projectchrono/7a846eec-addc-4bd8-8744-bb3f04ec7f4cn%40googlegroups.com.
