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

Using KHR_materials_common with B3DM models and CESIUM_RTC #4669

Closed
JDepooter opened this issue Nov 18, 2016 · 2 comments
Closed

Using KHR_materials_common with B3DM models and CESIUM_RTC #4669

JDepooter opened this issue Nov 18, 2016 · 2 comments

Comments

@JDepooter
Copy link
Contributor

I'm trying to create 3D Tiles datasets (see attachment) which use both the CESIUM_RTC and KHR_materials_common extensions. I'm running into a few problems getting it to render in Cesium.

  1. It appears that Cesium cannot use the KHR_materials_common extension when loading a B3DM file. I am getting a shader compiler error due to missing technique information. The generated shader requires a technique which includes a batch id attribute and parameter.

  2. Similar to the first issue, the KHR_materials_common extension cannot be used with the CESIUM_RTC extension. In order to get this to work, the generated technique requires a CESIUM_RTC_MODELVIEW parameter. Thanks to the people in this thread for the information on how to do this.

It was my understanding that the KHR_materials_common extension is intended to allow glTF creators to output geometry with a simple material description, rather than require every glTF file to contain techniques/shaders/programs/etc. In this respect, I think it works well for stand-alone glTF models. It would be great if it would work in 3D Tiles datasets as well.

I have made some small modifications to my local cesium environment which allows it to use all of these extensions. I've not submitted it as a pull request because I've only done the bare minimum to get things working, and I'm sure I've missed some details. It would be great if something like this would be merged into the 3d tiles implementation.

@lilleyse
Copy link
Contributor

Yes this seems like an oversight and it would be worthwhile for us to have some test tilesets that use the KHR_materials_common extension.

I took a quick look at your changes and they seem pretty good. Definitely consider opening a PR.

@pjcozzi
Copy link
Contributor

pjcozzi commented Dec 20, 2016

Fixed in #4684 thanks to @JDepooter!

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

3 participants