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

problem converting ply with attribute based on 4 components RGBA #133

Open
ua4192 opened this issue Jan 13, 2022 · 9 comments
Open

problem converting ply with attribute based on 4 components RGBA #133

ua4192 opened this issue Jan 13, 2022 · 9 comments

Comments

@ua4192
Copy link

ua4192 commented Jan 13, 2022

Hi Federico.

As I am having problems with the nxsbuild version that allow to convert glb files and came back to the default nxsbuild that support only ply and obj formats.

I have modifued the PLYExporter.js and PLYLoader.js from THREEJS libraries in order to export the color attribute with 4 components instead the 3 that come by default.

I am able to export the ply and load them again without any problems but the nxsbuild command fails.

Fatal error: virtual memory error mapping block: access is denied

As I am no able to attach the ply here, I will send it to you by mail if you can provide me a mail address.

Many many thanks for your support
Best regards

@ua4192
Copy link
Author

ua4192 commented Jan 14, 2022

Hi Federico.

I sent you the ply file by mail.

Best regards

@ponchio
Copy link
Contributor

ponchio commented Jan 14, 2022

Hi,
Meshlab complains about bad index (out of range of the vertices array). I am afraid this file has some problems too...

@ua4192
Copy link
Author

ua4192 commented Jan 15, 2022

Hi Federico.

I will have a look on the files on Monday and will come back to you.

Many thanks for your support.

@ua4192
Copy link
Author

ua4192 commented Feb 3, 2022

Hi Federico.

I have finally ended to conver my ply file with rgba attributes.

If I use the nxs file it works properly but if I conver the nxs to nxz using the command:
nxsedit test.nxs -o text.nxz -z -C 8
or
nxsedit test.nxs -o text.nxz -z -C 8 -A 8
or
nxsedit test.nxs -o text.nxz -z -C 8 -A 8 -Y 8

The alfa attribute is not properly retrieved giving me wrong values.

I am using 8 bit (Uint8Array(4*nvertices)) in my ply file

Maybe this error has been already fixed in the last release (not yet in releases section on github)?

Still looking forward for this new compilation on github.

Best regards and as always many thanks in advanced for your support.

@ponchio
Copy link
Contributor

ponchio commented Feb 4, 2022

Hi,
I tested a bit and it looks like the problem is not in the nxsedit compression but in the javascript.
corto.js just decodes the first 3 colors.
corto.em.js (the emscripten, way faster javascript lib), works properly insted.

I guess you are still using corto.js, (which is for example used in older 3DHOP version, the latest should use corto.em.js).

If this is still not the case, could you provide me a full sample to debug the issue?

@ua4192
Copy link
Author

ua4192 commented Feb 7, 2022

Hi Federico.

I have just check my libs and I think I am using corto.em.js.

I had a look in my nexus.js library and here you can see:

var corto = null;
function loadCorto() {

	corto = new Worker(path.replace('nexus.js', 'corto.em.js'));
	corto.requests = {};
	corto.count = 0;
	corto.postRequest = function(node) {
		corto.postMessage({ buffer: node.buffer, request:this.count, rgba_colors: true, short_index: true, short_normals: true});
		node.buffer = null;
		this.requests[this.count++] = node;
	}
	corto.onmessage = function(e) {
		var request = e.data.request;
		var node = this.requests[request];
		delete this.requests[request];
		node.model = e.data.model;
		readyNode(node);
	};
}

About the example I will try to make one for you. The current file I am using it's about 400MB

Best regards

@ponchio
Copy link
Contributor

ponchio commented Feb 8, 2022 via email

@ua4192
Copy link
Author

ua4192 commented Feb 10, 2022

Hi Federico.

My problem is that my company proxy constraints don't allow me to update any file via github.

My only option is to send the file by mail.

I guess you need the ply file, don't you?

If this is the case the option you have mentioned that is for reduce the size of nxz file is not valid for me, isn't it?

Best regards and many thanks as always.

@ponchio
Copy link
Contributor

ponchio commented Feb 10, 2022

If the problems happens between nxz and nxs, I just need the nxs and the nxz (so I can compare with my nxz version).
And I would need a sample of the rendering code (html+js), so I can quickly check if the problem is in nxs or in the js.

The options I mentioned (--size, allows you to cut the size of the nxs (end than create also the nxz from it) to a manageable size and send it by mail (the alpha problem doesn't seem to be related to size).

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

2 participants