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

[Cesium3DTileStyleEngine] Missing support of access to values which are not in batch table, but present #4654

Open
SunBlack opened this issue Nov 16, 2016 · 4 comments

Comments

@SunBlack
Copy link

It is currently not possible to access coordinates from a Cesium3DTileStyle.

An example would be:

tileset.style = new Cesium3DTileStyle({
	"color" : {
		"conditions" : [
			["(${x} < ${offset} || ${x} > ${offset} + ${maxHeight})", "rgb(255, 255, 255)"],
			[true, "rgb((${x} - ${offset})/${maxHeight}, 230, 230)"],
		]
	}
});

It would be also nice if you have access to BoundingBoxes and other properties of a tileset, so a support of following attributes would be nice:

  • x/y/z
  • bounding box of current tile
  • bounding box of root tileset
  • level in tree of current tile, starting from root tileset
@lilleyse
Copy link
Contributor

Thanks for the suggestions, I will add them to the styling roadmap.

For point clouds, accessing the position is already available. The spec hasn't been updated yet, but here is a draft:

${POSITION} is an array of three values representing the xyz coordinates of the point before the RTC_CENTER and tile transform are applied. When the positions are quantized, ${POSITION} refers to the position after the QUANTIZED_VOLUME_SCALE is applied, but before QUANTIZED_VOLUME_OFFSET is applied.

There are also a few examples in the Sandcastle demo:
http://cesium-dev.s3-website-us-east-1.amazonaws.com/cesium/3d-tiles/Apps/Sandcastle/index.html?src=3D%20Tiles%20Point%20Cloud%20Styling.html&label=Showcases

@SunBlack
Copy link
Author

Well thanks for the hint with ${POSITION}. But without access to any offset it is currently not really usefull with point clouds (or I need to adjust each tile to have same RTC-Center ;-) ).

@lilleyse
Copy link
Contributor

Yeah pretty much, we've wanted to support bounding volume information in the styling for a while.

@pjcozzi
Copy link
Contributor

pjcozzi commented Dec 20, 2016

we've wanted to support bounding volume information in the styling

CC CesiumGS/3d-tiles#127

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

No branches or pull requests

3 participants