Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute paths being saved in packaged glb #8

Open
antpb opened this issue Apr 4, 2022 · 1 comment
Open

Absolute paths being saved in packaged glb #8

antpb opened this issue Apr 4, 2022 · 1 comment

Comments

@antpb
Copy link
Contributor

antpb commented Apr 4, 2022

When saving a file from the blender exporter to glb, the audio files are saved as expected in the file. I am noticing that the file paths though remain the same absolute paths as in blender. Heres the example output from using an exported glb with audio in a basic threejs implementation of omi audio using three-omi package:

fetch for "https://xp3d.io/Users/myusername/Downloads/synth.mp3" responded with 404: Not Found

Notice the Users/myusername/Downloads path.

Still digging but something seems off on the export. I think we should strip the paths to their last level where the file name is defined but I've not yet been able to make the parser happy that way.

@antpb
Copy link
Contributor Author

antpb commented Apr 15, 2022

Here are some comparisions on an omi object created in blender vs with the hubs transform tool

// made with blender extension
{
	"OMI_audio_emitter": {
		"audioSources": [
			{
				"name": "",
				"uri": "//../Desktop/click.mp3",
				"mimeType": "audio/mpeg"
			}
		],
		"audioEmitters": [
			{
				"type": "positional",
				"gain": 0,
				"loop": false,
				"playing": false,
				"source": 0,
				"coneInnerAngle": 6.2831854820251465,
				"coneOuterAngle": 1.3962633609771729,
				"coneOuterGain": 0,
				"distanceModel": "inverse",
				"maxDistance": 0.5,
				"refDistance": 2,
				"rolloffFactor": 1,
				"name": "click"
			}
		]
	}
},
// made with gltf transform
{
	"OMI_audio_emitter": {
		"audioSources": [
			{
				"bufferView": 8,
				"mimeType": "audio/mpeg"
			}
		],
		"audioEmitters": [
			{
				"type": "global",
				"gain": 0.28999999165534973,
				"loop": true,
				"autoPlay": true,
				"source": 0
			}
		]
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant