Closed leefsmp closed 2 years ago
maybe we can live with attaching a dbId instead of guid as I understand it may cause the geometry to become significantly heavier... however after running your example my model appears quite coloured ...
Hi Philippe, embedding a GUID into the glTF geometry would be very difficult, if possible at all. I'd suggest to just use the 32-bit dbID and embed it into the RGBA components of the vertex colors. Btw. I've just recorded a lightning talk on this topic (incl. the way to retrieve this dbID in Unity) that'll be published during the AU in September.
ok but storing the attributes in COLOR_0
can't be the right way to do as it definitely impacts the color of my models ...
No worries, in the lightning talk I explain the process of detaching the vertex colors from the geometry so that its appearance is not affected. Btw. the lightning talk is centered around this sample code: https://github.com/petrbroz/forge-unity-poc.
Hi, I'm looking at the sample to attach custom dbId to meshes: https://github.com/petrbroz/forge-convert-utils/blob/develop/samples/custom-gltf-attribute.js
But having a hard time understanding how to modify it so we can attach guid (revit externalId) string instead. Could you give a quick example on how to achieve that pls?