Closed frodrigo closed 5 years ago
Hi @frodrigo,
Indeed, vertex normals computation is not implemented. I will read the format spec and proposed normal encoding algorithm and see how complicated it is to extend the implementation.
Adding the vertex normals will make this the "go to" Cesium tile processing tool. Currently the only ones that do it are proprietary. As I understand it, the code "should" be relatively simple once the normals are calculated. The format is simply to add a block of vertex normals (same size as the vertex array) at the end with a type value ("1") and the normals compressed by oct-encoding them.
To give an update, we have a consensus to add normals generation to tin-terrain. However I need to clear some other commitments before giving it a go, ETA is roughly this or next week.
Sorry to pester, just working out timing details for code I'm working on too - is this still looking for a release this week?
@BTolputt tin-terrain is experimental tool which we released to explore the landscape and use cases of Surface Data and 3D Maps.
We put this issue on top of the backlog but cannot commit to specific timeline for it.
However it will help us prioritise the issue if you elaborate your use case of using tin-terrain: What is the industry you are in? What is your final deliverable you are trying to achieve?
Is there a way to contact you privately? Whilst not "super secret" by any means, I don't yet have permission from my bosses to share details to the public, but I can talk to you directly about it. @delfrrr @fester
@BTolputt of course, we will just create a little anonymous survey and I will send you a link. We do not expect/require any secret details!
@delfrrr No problems... though I haven't seen it yet, happy to fill one out and talk to you privately about all the technical details :)
@delfrrr @fester - has the survey been sent (& I've missed it) or is it still to be done?
Hey @BTolputt and @frodrigo , thank you for your patience and finally I'm glad to inform you that there is a way to add normals to the terrain. However, there are some shortcomings:
Because this feature begs for testing, I didn't merge it into master yet but you can check it out from terrain-normals.fester branch. If you have some spare time and a will to help the project, I kindly ask you to give it a go and share whether it works well (i.e. whether the orientation of normals is correct, are there shading problem across tile borders, etc).
In order to try this feature, you need to check out the aforementioned branch, follow normal build instructions and add '--normals' CLI switch to dem2tintiles subcommand.
Just starting to look at. I see you have indentation problem in you new code.
Whoa, my Emacs rebelled against my will. Fixed, thanks for pointing it out.
@fester - thanks for that. Missed it over our long weekend down here but will test tomorrow.
@fester - Tried the new code, but cannot tell whether it works or not as I am having the issue referred to here. Once I get that cleared up, I'll report back with details on the normals. Apologies.
@BTolputt hey! finally put survey together. It would help us if you check it out (it is fully anonymous) https://survey.research-feedback.com/jfe/form/SV_6qVft7VrQfwsDml
@delfrrr - thanks mate. Hope my input helps :)
My test fails. But not sure what wrong, if it's about the top level tiles, bad normals or something else. My tests result in black only.
Thanks for trying, we will investigate the problem ourselves and try to find an issue. It will be very helpful for us if you could publish your code or describe your setup.
On Fri 8 Feb 2019, 16:09 Frédéric Rodrigo, notifications@github.com wrote:
My test fails. But not sure what wrong, if it's about the top level tiles, bad normals or something else. My tests result in black only.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/heremaps/tin-terrain/issues/48#issuecomment-461833132, or mute the thread https://github.com/notifications/unsubscribe-auth/AAANeNZOJ01IXKCn0_HMZFxVU2XBVTaTks5vLZMZgaJpZM4ZmYMW .
@frodrigo We checked it on our side and it works as expected. Probably you see nothing because Cesium can't handle missing tiles all zoomlevels. You can find more details in this comment.
Unfortunately, normals generated with tin-terrain are not smooth because of how we perform tiling and therefore tile borders are visible. Fixing this requires a different approach which I am thinking about now. It's outside this issue and will close it for now.
Unless I'm wrong. The Cesium.SceneMode.SCENE3D is not supported because the normal are not included in the tiles? Do you plan to add normal / allow shadow / SCENE3D?