๐Ÿงต#Gltf export

iuriineves

hi! the website is https://mii.nxw.pw/. i found that the issue was the shaders, and importing it to blender with the built in shader options worked. this, however, revealed another problem: a part of the model is completely broken

iuriineves

there's some of the shape of the head left on this, which suggests theres some issues with the position of some vertices

iuriineves

how does the view in another window work? does it use a model extracted from the website or does it directly take the data and use it?

marwi123
marcel ๐ŸŒต โ†—

Well view in new window is just taking the three.js geometry, cloning it and rendering again.

Export also uses three.js - they have an exporter feature. Not sure how familiar you are with that.

You mentioned an error, was that error just a blender import error or some error on export?

iuriineves

i was able to salvage half of the model by deleting the bad vertices and using mirror modifiers

iuriineves

<@272528485732450305> is the exported model supposed to include textures? the model is missing the textures

marwi123
marcel ๐ŸŒต โ†—

It will include textures for known shaders. The website seems to use custom shaders (?) so they might not be included in the export (or fail to import in blender since blender doesn't know about it but more likely is custom shaders are not supported)

iuriineves

yep, that seems about right. changing the shader option to "no lighting" helps a bit, but still gives a threejs error

iuriineves

i made a small python script that pulls the bad vertices to its correct place, so the head is mostly fixed. the issue now is that some parts of the model dont export as the image type they use is not supported by threejs when exporting

iuriineves

Error exporting selection as GLTF: THREE.GLTFExporter: Invalid image type. Use HTMLImageElement, HTMLCanvasElement, ImageBitmap or OffscreenCanvas. (Scene)

marwi123
marcel ๐ŸŒต โ†—

Maybe changing the material on the object before export might help. You could create a dummy cube and then take its material on your object you try to export - altough there's currently no way to re-assign the textures from the previous material... mmh

marwi123
marcel ๐ŸŒต โ†—

What three version is your websit using? it's displayed int the top toolbar since the last update

marwi123
marcel ๐ŸŒต โ†—

Just took a look - lots of custom props and settings per material so unfortunately nothing I can help with right now. It could be done with baking the materials to a standard material (which would include all custom shading to be baked to shaders) it would be possible. But that's not in scope right now.

Why are you trying to export those in the first place if I may ask?

iuriineves

the app's 3d exporter is currently broken (wouldnt surprise me if they're having a similar issue), and i would like to use the 3d models for a private project

iuriineves

its honestly not that important, but its been a hella of a ride trying to understand whats going on and fixing it lol