petrbroz / svf-utils

Utilities for working with the SVF file format used by Autodesk Platform Services.
https://petrbroz.github.io/svf-utils/
MIT License
122 stars 51 forks source link

Large model geometry data disorder #45

Open pangzx1 opened 2 years ago

pangzx1 commented 2 years ago

I convert the .svf file to .gltf through a tool. But there will be a problem of geometric data confusion. My device system is windows 10. Use command to convert. The total size of my .svf file is 270M. Screenshot below: Snipaste_2022-01-25_18-14-38

What could cause this? Thanks!

wallabyway commented 2 years ago

do you have a screenshot of what the original 3D model (inside forge-viewer) looks like ?

It could be that the SVF file is too large - does the forge-convert-utils crash ? (check the error log).

If so, then you probably have too many nodes for a single glTF to handle. In which case, use the filter function, to split the result into multiple glTF files.

The goal to avoiding forge-convert-utils from crashing, is to limit the number of nodes to < 100k (roughly), in order for the Nodejs object to string serializer to RAM explode JSON.stringify(szGLTF)

Here's an example of using a filter function with forge-convert-utils using dbid's. https://gist.github.com/wallabyway/4cd3112b3e86dc6d235bd3a0d86e87a5#file-convert-js-L24-L25

You can also filter on floors and regions by inspecting the vertices x,y,z against a threshold, like this https://github.com/petrbroz/forge-convert-utils/blob/develop/samples/filter-by-area.js

pangzx1 commented 2 years ago

Here is a screenshot from forge viewer: image

forge-convert-utils did not crash, and no error logs were found in the logs.

This is a very complex model with a lot of electromechanical

I'll try again using the filter method you said, thanks!

wallabyway commented 2 years ago

double check the logs for errors during the serialization. I've seen it fail early and still generate a glTF.

pangzx1 commented 2 years ago

The following two are screenshots of my logs in action: image

image

I can only find logs at runtime, as shown in the image above. Or are there other log files that I haven't found? In which path does it exist?

petrbroz commented 2 years ago

@pangzx1, is there any chance you could share the SVF with me (confidentially, I would not share the file with anyone else)? You could send me a link to it via a direct message on Twitter (I'm @ipetrbroz), or via forge (dot) help (at) autodesk (dot) com.