Importing and exporting shapes
V-REP uses triangular meshes to describe and display shapes. Because of this, V-REP will only import formats that describe objects as triangular meshes. If however you wish to import objects described as parametric surfaces for example (e.g. IGES, STEP, etc.), then you will first have to convert the file to an appropriate triangular mesh format. There are several conversion application that allow for this operation, and most 3D drawing applications support this quite well too. Make sure you read the sections further down to be able to obtain the best triangular mesh description possible for your 3D drawing. V-REP supports following file-formats for shape import ([Menu bar --> File --> Import --> Mesh...]): During the import operation, a scaling dialog related to textures might open. Another dialog related to the meshes will also open: [Shape import options dialog] That dialog allows you to correctly interpret the unit used in the imported file (some applications use meters, others use feet, inches, centimeters or millimeters), as well as the orientation of the meshes (some applications consider the absolue Y axis to be pointing up, others consider that the absolute Z axis is pointing up). In any case, you can also scale the imported shapes afterwards in the object common properties or correct their orientation in the orientation manipulation mode. Imported shapes will have default visual parameters and a random color so as to be able to distinguish individual shapes. Textures will only be imported via the OBJ file format: in that case, textures will be loaded and applied to the imported mesh. Should the texture load operation fail, then only the meshes and texture coordinates will be imported, and you can at a later stage apply textures via the texture dialog. During the import operation, V-REP will make sure mesh objects are consistent and remove unused vertices and merge vertices that are close to each other, etc. The exact behavior can be set in the Vertices/triangles verification settings in the user settings dialog. If after the import operation you can't see any shapes in the scene, but the scene hierarchy indicates the presence of newly added shapes, then most probably your shapes are either too big or too small to be seen. You can then proceed to a scaling operation in the object common properties. Also, when exporting meshes from a CAD application, try to export them as a whole (best is to export them as a single object, later on in V-REP you can then divide the imported shape with [Menu Bar --> Edit --> Grouping/Merging --> Divide selected shapes]); this is to avoid the CAD application repositioning/reorienting individual meshes according to their reference frame during the export operation (V-REP's reference frame is different!), which may result in a broken appearance. Make sure that your imported meshes do not contain too many triangles (for a robot, typically between 10000-20000 triangles in total), otherwise V-REP could be drastically slowed down (rendering, calculations, load/save operation, etc.). There are applications allowing to reduce the number of polygons in a mesh (e.g. MeshLab or polygon crunsher). You can also use following V-REP functions: When exporting shapes from an application that handles shapes as parametric surfaces (e.g. IGES, STEP, etc.), it might be important to export the objects in several steps when the drawing consists of large and small objects; this is to avoid having large objects too precisely defined (too many triangles) and small objects too roughly defined (too little triangles): simply export large objects first (by adjusting the desired precision settings), then small objects (by adjusting up precision settings). Make also sure to follow the tutorial on how to build a clean simulation model.
V-REP supports following file-formats for shape export [Menu bar --> File --> Export --> Selected shapes...] (note: only selected objects will be exported):
V-REP supports following file-formats for heightfield shape import ([Menu bar --> File --> Import --> Heightfield...]): After selecting the file to import, a dialog will open: [Heightfield import options dialog] Recommended topics |