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

"instancing" being lost on conversion #135

Closed
ediebold opened this issue Jan 24, 2018 · 7 comments
Closed

"instancing" being lost on conversion #135

ediebold opened this issue Jan 24, 2018 · 7 comments
Labels

Comments

@ediebold
Copy link

I seem to be having issues when a component is used multiple times in a model (sorry, if that's unclear, but I'm unsure of the technical terms). I have attached a small example file that exemplifies the issue:

26_MODELS_CAMP_Walkway.zip

Below is what the original dae looks like:
screen shot 2018-01-24 at 5 46 55 pm

Here is the gltf:
screen shot 2018-01-24 at 5 46 59 pm

As you can see, only one instance of the main sized floorboard is kept in the gltf. I've gone through the text of both files a bit, and the gltf only seems to contain a single reference to the floorboard object.

@lasalvavida
Copy link
Contributor

Hi @ediebold!

A few things. It looks like you're using the 1.0 converter. I was going to suggest the 2.0 converter, but it doesn't convert this properly either.

One thing worth noting, your cameras have an aspect ratio of zero and the 2.0 json writer is choking on the infinities that it ends up generating. I'm not sure if this is a bug in OpenCOLLADA or a case I need to handle explicitly, but we'll get to the bottom of it.

@ediebold
Copy link
Author

ediebold commented Jan 29, 2018

Thanks @lasalvavida.

I had noticed the camera problems, and had just been manually removing all the cameras from the JSON after conversion, which is a fine workaround, but it'd be great to handle this earlier.

I wasn't aware there's a 2.0 converter - what do I need to do differently to output in 2.0? I would prefer to be doing that from now on. Do I just add a flag saying "-v 2.0"?

Is the camera issue causing the instancing bug? Or is it a separate issue?

@lasalvavida
Copy link
Contributor

If you're building from source, checkout the 2.0 branch.

There's also precompiled 2.0 binaries in releases.

The instancing is a separate issue from the cameras.

@ediebold
Copy link
Author

Thanks- I'll switch my branch.

Do you have much of an idea about what is going wrong with the instancing, and how difficult it will be to fix? I'm happy to help out with the fix if you can point me in the right direction.

@lasalvavida
Copy link
Contributor

Instancing issues were a known problem in the 1.0 converter. The 2.0 converter is supposed to handle them correctly. It looks like the transforms are getting messed up in the 2.0 converter.

I only had time to run it through the converter and see what it looked like; I'll have to dig into your COLLADA a little more to see for sure

@lasalvavida
Copy link
Contributor

@ediebold, try the fix-model-instancing branch, it seems to work for me.
screenshot from 2018-02-16 10 17 25

I'll open up a pull request after #83 merges since that is the base for this branch.

@lasalvavida
Copy link
Contributor

@ediebold, this should be fixed in the latest master. Feel free to re-open if there are any more issues with this model.

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

No branches or pull requests

2 participants