Importing 3D Models for a digital twin demo

139 views
Skip to first unread message

Christoph Hermann

unread,
Sep 2, 2022, 8:45:30 AM9/2/22
to Jaamsim Users Discussion Group

Hi everybody,

im trying to build a digital twin demonstrator of our shopfloor in JaamSim.
I planned the shopfloor in a Software called visTABLE which supports the export of 3D models in a "Wavefront obj (*zip)" format.

However I already managed to successfully include a model of a flow rack out of visTABLE into my simulation but when I try to import the model of a Europalette JaamSim freezes completely. (Using Version 2022-04 and 2022-06) 

Looks like it’s stuck and JaamSim can only be closed by the task manager. The log viewer keeps printing the following:

java.nio.file.FileSystemNotFoundException
    at com.sun.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:171)
    at com.sun.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:157)
    at java.nio.file.Paths.get(Unknown Source)
    at com.jaamsim.render.TexCache.launchLoadImage(TexCache.java:203)
    at com.jaamsim.render.TexCache.getTexID(TexCache.java:176)
    at com.jaamsim.render.MeshProto.loadGPUTextures(MeshProto.java:1164)
    at com.jaamsim.render.MeshProto.loadGPUAssets(MeshProto.java:1139)
    at com.jaamsim.render.Renderer.loadMeshProtoImp(Renderer.java:930)
    at com.jaamsim.render.Renderer.getProto(Renderer.java:421)
    at com.jaamsim.render.MeshProxy.collectRenderables(MeshProxy.java:51)
    at com.jaamsim.render.Renderer.updateRenderableScene(Renderer.java:986)
    at com.jaamsim.render.Renderer.mainRenderLoop(Renderer.java:331)
    at com.jaamsim.render.Renderer.access$000(Renderer.java:91)
    at com.jaamsim.render.Renderer$1.run(Renderer.java:202)
    at java.lang.Thread.run(Unknown Source)

The .obj files can both be opened with the Windows 3D Viewer and are displayed correctly here.

I’ve tried out various online .obj to .dae file converters but none of those models could be imported to JaamSim. At the End i'd like to export the 3D Model of our shopfloor to JaamSim. (~80 MB)

Since I’m fairly new in the field of 3D Objects i’d appreciate any tips on how to deal with this problem. I attached the zip files to both 3D Models below.

Thank you.


Greetings,

Christoph

Europalette.zip
Flow_Rack.zip

Harry King

unread,
Sep 2, 2022, 3:08:06 PM9/2/22
to Jaamsim Users Discussion Group
Christoph,

The problem with the Europalette model is its use of the hash symbol ('#') in one of the file names contained in the zip file, i.e.
Plavis_Vistable_ColorMaterial68ca4f97-a19b-49c1-934f-9232706ed4c2#FF606060.png

The hash symbol is invalid for file names on the web, which breaks our Java code for file handling. This is a common problem that creates an unintended 'URI fragment'. I am surprised that visTABLE would use a hash symbol in its file names since this is known to cause problems.

The solution is to rename this file and edit the .obj and .mtl files to use the new name. The best we can do in JaamSim is to trap this type of error and provide a suitable error message.

It should be possible for JaamSim to load your entire 80MB shop floor and display it efficiently.

Harry

Christoph Hermann

unread,
Sep 5, 2022, 3:05:02 PM9/5/22
to Jaamsim Users Discussion Group
Hi Harry,

thank you very much for your fast reply. Wow 8h hours of near frustration because of a single "#".
At least i found out now which models cause this problem.
For anyone who is also using visTABLE, the problem are the models which color can be changed in your layout eg. workers or plastic europalettes. The other models worked.
Deleting the color file and and deleting the reference in the .mtl file and converting the new .zip file to a .dae file at least gives you the object in grey which can be imported into JaamSim.


Ok so now i also managed to change the .obj file in Blender following the YouTube Tutorial below:

De-zip your file then delete the # in the file, open up blender and do the steps described in the video above and then export it again as .dae file and it should work. 

Thanks again Harry.
Best regards,

Christoph

Harry King

unread,
Nov 27, 2022, 6:45:31 PM11/27/22
to Jaamsim Users Discussion Group
Christophe,

Release 2022-07 traps bad characters such as '#' in a file name and generates a suitable error message.

Harry

Reply all
Reply to author
Forward
0 new messages