I really wonder why the image is only partly loaded (or partly used). It seems like only 1/4 of the height and 1/4 of the width are being read, instead of 100% of it. That would be very hard to debug. do you have a project reproducing this?
Yes! I thought I shared here, but here it is.
-
git clone https://github.com/DOEHOONLEE/babylonTester.git -
npm install -
Please fix the below
.babylonused for the test is in the assets folder named as ‘test2.babylon’ and the texture used isartwork.png
Please upload somewhere online and use them as remote assets. I tried to load them by
const rawContent = fs.readFileSync('/Users/david/Documents/dummy2.babylon')
const base64Content = Buffer.from(rawContent).toString('base64')
const base64ModelString = `data:base64,${base64Content}`
const { meshes, skeletons } = await BABYLON.SceneLoader.ImportMesh('', '', base64ModelString, scene)
but it did not work. I wish I could share my own remote folder, but I don’t own one right now
I’m sorry.
// line 18 && 19 in file [fileName].ts
// const rootURL = 'https://playground.babylonjs.com/scenes/Dude/'
// const babylonModel = `${fileName}.babylon`
// change them to the remote URL
const rootURL = 'https://playground.babylonjs.com/scenes/Dude/'
const babylonModel = `${fileName}.babylon`
-
npm run dev -
go to
localhost:3000/api/Dude
If you would like to update/modify the texture, it is at line 46 in file ModelBuilder.ts
// this.scene.getMeshByName('Plane').material.albedoTexture.updateURL('BASE64 HERE..')
@RaananW , I thought it could be a problem with the 3D modeling tool we are using, but since the behavior is the same on the Dude.babylon from Babylon Mesh Library, I guess not… ![]()
I really wonder why the image is only partly loaded (or partly used). It seems like only 1/4 of the height and 1/4 of the width are being read, instead of 100% of it. That would be very hard to debug.
→ Can you give me a tip for debugging? where I should be looking at? Is the code for texture mapping on vertices in @core?