-
Notifications
You must be signed in to change notification settings - Fork 157
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
Comments
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. |
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? |
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. |
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. |
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 |
@ediebold, this should be fixed in the latest master. Feel free to re-open if there are any more issues with this model. |
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](https://user-images.githubusercontent.com/3262375/35318261-a6a12aba-012e-11e8-9cbf-1e7c6c8c43e8.png)
Here is the gltf:
![screen shot 2018-01-24 at 5 46 59 pm](https://user-images.githubusercontent.com/3262375/35318264-a8cd4b98-012e-11e8-9985-e115e85576e9.png)
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.
The text was updated successfully, but these errors were encountered: