CZML in Cesium...

As some of you may already know, I’ve been working on support for visualizing our new CZML specification in Cesium for quite some time now. All work is being done in the viewer branch. I’m not quite ready to make a pull request, but hope to do so within the next few days. In the mean time, I finally got around to updating the wiki with a ton of new information. This includes an updated roadmap a fleshed out architecture overview and the beginning of an in-depth overview of the code (the in-depth overview is a work in progress but I’d love feedback for what’s already there). I’ll also remind everyone of the excellent work being done on the czml-writer project as well. We hope to have converters for most major formats in place soon and the library makes it easy for everyone to generate new content.

If you want to actually start playing with CZML visualization, feel free to sink up to the “viewer” branch. There’s a new application, Cesium Viewer, available from the main page which will eventually be the premier end-user application for visualizing CZML. There are two sample czml files in the Apps/CesiumViewer/Gallery directory that you can just drag-and-drop into the app.

Finally, I want to mention that with the viewer branch, we are also introducing some higher level widgets to help users build new applications. The first of which is a Timeline widget for easily controlling animation but more will follow. We’re also looking into producing specific widgets to help with people using dojo, jQueryUi and other popular toolkits. Of course the Cesium engine itself will never contain any toolkit specific code. There’s no wiki page for these efforts, but I hope to be putting them together soon.

Hopefully all of this will be in master by the end of the month, but in the mean-time I’d love for people to start playing around with it and provide as much feedback as you’re willing to give.

Thanks for reading,

Matt

Matt,

I haven’t ran any of the code yet, but the wiki pages look quite good, covering the right stuff at the right level of abstraction.

I made some minor tweaks, and have a few general comments:

  • In the main code example on both wikis, should the “var visualizers = …” line be last? No lines after it depend on it, and the way the discussion goes, visualization is last.

  • A few figures would be useful. Show the relationship between dynamic objects, visualizers, primitives, etc. I’m sure this is on your list, and I’m just stating the obvious.

  • Another one probably on your list: let’s link to the in-depth guide from at least the main wiki page and the overview, even if it’s not ready for prime-time.

Your writing is good, but here’s a few tips:

  • One of the biggest editorial lines Christophe and I have for OpenGL Insights is to use “we”/“our” instead of “you”/“your.” Here, “we” is the writer and the reader. It builds community; the writer and reader are in it together. As writers, we are not telling the reader what to do; we are saying that we do it too.

  • Use “simply”, “very”, etc. sparingly, especially if it has the potential to insult the reader, e.g., you think it’s simple, but it’s not simple to them. I often make this mistake with “of course” or “obviously.”

  • “it’s” expands to “it is”, which does not imply ownership. “Its implementation is fast” instead of “It’s implementation is fast.”

  • I don’t know how to reference functions. I’ve used clock.tick over clock.tick() because the Java documentation guidelines say that the former is the general function and that the later is the particular overload with no arguments; however, in JavaScript that doesn’t really apply. I use the former because less is more, but I’m perhaps on the fence, especially if it is not clear if the identifier is a function or property from context. There’s no need to beat this to death, but I thought I’d mention it.

Regards,

Patrick

Matt,

I ran the new apps. Here are a few comments. Make issues in github - or just do them - for any you think are worthwhile.

Timeline Demo (I realize that this was initially made for testing)

  • We call this the “Timeline Demo”, but the title on the page is “Test of the timeline.” That should probably be “Timeline Demo” too.

  • Might want to include mouse instructions for using the timeline.

  • It took me a while to realize that the Julian date and span next to the calendars correspond to the timeline, not the calendar.

  • Why does the interval default to August 2010 - 2011? Is basing it on the current date better?

  • Why is the timeline span limited to 12 hours even if the dates are far apart?

  • The reported span between Aug 11 2010 and Aug 11 2010 is 0.01 sec, not 0 sec because of a precision error.

Cesium Viewer

  • We can no longer explicitly set the date. Is that because we still have bigger plans for the UI? (+1 for making it look like YouTube within reason).

  • Imagery

  • Are we going to add other choices beyond Bing? Where is the Bing logo? Where is the Cesium logo?

  • In Chrome stable, I actually generated a WebGL lost context error one time when switching to No Streaming Imagery. If this happens often, Dan or I can look into handling the event, but it is going to be painful.

  • Home View restores 2D and Columbus view to 3D - that is OK with me for now I suppose; however, I expect users will want home views in each mode. Going to Home View in 2D or Columbus view leaves the camera looking down -x (Africa), not -y (US) perhaps because Columbus view coordinates are different than 3D.

  • In Chrome stable, when I go into full-screen, the left half of the timeline disappears.

  • I’m not happy with the globe shading (and I wrote most of it). Ian and I hope to improve it as part of the material system. In the ideal situation, it will actually use the material system.

  • In simple.czml, the AGI label needs a pixel or eye offset so it is in front of the facility. This also exposes some jittering problems in the primitives, which I moved up on the roadmap.

  • Drag and drop is a very nice feature, but the barrier to entry is too high. How many users will browse their filesystem? The in-browser gallery will be sweet.

Also, with respect to your roadmap updates, +1 for the embeddable Cesium Viewer.

Patrick

Thanks Patrick, for both emails. As far as your wiki comments, I'll
be sure to keep them in mind when I'm writing new entries or going
pack to review what I already have, they're all valid points. I'm
ashamed of anywhere I used it's instead of its, my high-school
creative writing teacher would refer to those as 'unforgivables'. :wink:

As for the apps, I'll address the low-hanging fruit ASAP. These apps
are a straight port of our original prototype (which never made it
onto gitHub) so I only changed the minimal amount of code needed to
get them up and running. I should be able to make all requested
changes to the Timeline Demo, but I don't expect to address some of
the Viewer issues until after the initial pull request.

We have huge plans for Viewer, and originally I was hoping to
introduce an awesome re-written Viewer app into master at the same
time as basic CZML processing, but Kevin Ring and Scott Hunter both
convinced me it would be better to get CZML processing into master
first. This way people have an opportunity to comment and review it
and provide feedback that would aid us when working on the "new"
Viewer.

So immediately after CZML processing makes it into master, I plan on
making a prioritized roadmap of what additional features and
enhancement we need to make in order for Viewer to be the premier
Cesium application, and then we'll start hacking away until it
happens.

Okay, that being all said, let me address your specific Viewer comments:

* We can no longer explicitly set the date. Is that because we still have
bigger plans for the UI? (+1 for making it look like YouTube within
reason).

The user never good explicitly set the date, other than clicking on
the timeline. I'm not sure what you mean by this (obviously we will
want this feature).

* Imagery
* Are we going to add other choices beyond Bing? Where is the Bing logo?
Where is the Cesium logo?

I would like to add other choices, like I said, right now this is
straight port so that's what the original prototype had. We will also
eventually support user-defined imagery sources specified via CZML.
The Bing and Cesium logos will be there by the end of today, they were
already on my todo.

* In Chrome stable, I actually generated a WebGL lost context error one
time when switching to No Streaming Imagery. If this happens often, Dan > or I can look into handling the event, but it is going to be painful.

I'm not doing anything special here, so it might be a bug somewhere in
Cesium or maybe something Cesium viewer is doing is taking too long.
In theory, this should happen on the current web-site as well then.

* Home View restores 2D and Columbus view to 3D - that is OK with me for now. I suppose; however, I expect users will want home views in each mode. Going to Home View in 2D or Columbus view leaves the camera looking down -x (Africa), not -y (US) perhaps because Columbus view coordinates are different than 3D.

This will all be done as part of the planned "standard toolbar" widget
for Cesium. Right now there are some issues with camera across
different scene modes that make it hard to work with. I plan on
writing up some issues to talk about what I feel needs to be changed
(for example, switching modes destroys user-created cameras out from
under them).

* In Chrome stable, when I go into full-screen, the left half of the
timeline disappears.

Hopefully it happens in all browsers and is just a simple resize issue
in my code, I'll check it out.

* In simple.czml, the AGI label needs a pixel or eye offset so it is in
front of the facility. This also exposes some jittering problems in the
primitives, which I moved up on the roadmap.

We also need to revisit the clamp to pixel issue with labels, which
still look bad in some cases. I think we're going to need that
uniform for billboard collection after all.

* Drag and drop is a very nice feature, but the barrier to entry is too
high. How many users will browse their filesystem? The in-browser gallery
will be sweet.

This is a documentation problem. You can specify a "source" query
parameter to the viewer to load things via URL instead of
drag-and-drop. For example:
localhost:8080/Apps/CesiumViewer/index.html?source=Gallery/simple.czm
Eventually we'll have a table of contents control to make it easy to
load CZML interactively and/or through a gallery. No reason it can't
be the same exact gallery as SandCastle.

Thanks again,
Matt

This all sounds good. A few comments:

The user never good explicitly set the date, other than clicking on the timeline. I’m not sure what you mean by this (obviously we will want this feature)

I thought I could click on the date in the lower right above the timeline and bring up a calendar. After a second look, that is how the timeline came up, and I like very much that the timeline is up by default now so ignore my comment.

I’m not doing anything special here, so it might be a bug somewhere in Cesium or maybe something Cesium viewer is doing is taking too long. In theory, this should happen on the current web-site as well then.

WebGL lost context would need to be handled in Renderer. No doubt, this has nothing to do with the viewer.

Eventually we’ll have a table of contents control to make it easy to load CZML interactively and/or through a gallery. No reason it can’t be the same exact gallery as SandCastle.

Right on.

Patrick

The viewer branch has been merged into master, containing a record 278 commits and 178 review comments (and pushing the GitHub pull request web UI well past its limits)

One of the last additions was a build process for CesiumViewer itself, using the Dojo build tools to produce a combined, minified, deployable release of the viewer application that stands alone from the source tree and is self contained. The “release” ant target creates this version under Build/Apps/CesiumViewer, and it will be in the release zip files in future releases.

Take a look and let us know if you have feedback, either through GitHub or the dev list. We’ll be updating cesium.agi.com with this version of the viewer soon.

Awesome. I encourage us all to merge master into our branches soon in case there are any conflicts.

Patrick