archilogic-com / 3dio-js

JavaScript toolkit for interior apps

Home Page:https://3d.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File returned by io3d.storage.export* API scale is wrong

bnjm opened this issue · comments

The furniture piece Tabano (productResourceId: 0b35a7a1-1251-4652-bfdb-62375558db99) displays ok in archilogic and a-frame, but when exported is at the wrong scale

Steps to reproduce:

io3d.furniture
  .get('0b35a7a1-1251-4652-bfdb-62375558db99')
  .then(x => x.info.data3dStorageId)
  .then(io3d.storage.exportDae)
  .then(io3d.utils.processing.whenDone)
  .then(console.log)
// 535e624259ee6b0200000484/processing/2017-11-28_17-34-19_OBcHg4/2017-11-23_22-27-15_HVGQBc.zip
// => open file in 3d editor

screen shot 2017-11-28 at 18 41 45

The result is the same with io3d.storage.exportObj

This was fun to stumble on in AR :D

Can you attach the exported file. Thanks

My bad. Saw file key now. Does it only happen with this piece?

No there are also others
this is the buffer file
https://spaces.archilogic.com/3d/template/new?file=/535e624259ee6b0200000484/2017-11-23_22-27_9kuARm/2017-11-23_22-27-15_HVGQBc.gz.data3d.buffer&mode=sdk
scale seems to be ignored on conversion

		"mesh_0": {
			"position": [0,0,0],
			"rotDeg": [0,0,0],
			"rotRad": [0,0,0],
			"scale": [0.1,0.1,0.1],

                  }

There are other models like this one, curiously either with a scale of [0.1, 0.1, 0.1] or [0.9, 0.9, 0.9] (the latter is more subtle and harder to catch visually). All of them are Data3D meshes (parts of a mesh really) under the name 'SimplygonMaterial':

capture

The viewer loads these correctly as well (different code base, editor & A-Frame share the same loading code), but these scales may throw off a bunch of people in the future.

it seems to be an importer problem, if youagree, can we reopen this issue in https://github.com/archilogic-com/data3d-blender-io
would be a great issue for open source contributions as well

I cross-posted to here archilogic-com/data3d-blender-io#12

I think it would be good to leave this issue open here, for visibility, until export* is behaving as expected from a users perspective. As @stavros-papadopoulos mentioned it's really easy to get tripped up with scale:[0.9, 0.9, 0.9]

Happy to help with testing or identifying the affected pieces :D

thx for moving forward with this.

just in case you need a list of all furniture with scale factor other then 1 in their mesh data - i could do that using this script: https://github.com/archilogic-com/migrate-furniture (it parses data3d of furniture assets in bulk)

This is resolved 🎉