CZM Cones?

Hi all,

With the help of a few here I’m now up and running on creating a web-based visualization prototype for my current customer. I’m working off the viewer branch and have some basic stuff working, a time-based scenario with a few propagated satellites, their orbits, and some fixed Cartographic points. Things are working smoothly, congrats on a truly awesome web-based API.

Are we currently able to create cones via the CZML writer API? I see support for cones, but don’t see how to set the model matrix for them so I’m confused about how they actually work. I created some targeted sensors via the Cesium JS API, but it involved work with the model matrix and I’m not seeing that as I try and transition it to a CZM-based solution.

Thanks again for the great work!

Eric

Hey Eric,

Cone doesn't have a modelMatrix property because the client computes
it automatically based on the position/orientation of the object that
the cone is on. Of course this isn't set in stone since the CZML spec
is still in development; it's just how it works right now. If this
works for you, great; however if your use case causes this to be an
issue, then we'd be happy to figure out how we can tweak the spec to
fit it.

Thanks,

Matt

I don’t know how I missed the Orientation writer, that’s exactly what I was looking for. I’ll work with that, thanks!

Eric

Just a follow up note here since I’m still working on my CZM cones.

The Complex Conic sample app in the Sandbox has never displayed for me. It always causes the WebGL Canvas to lock up, whether I’m using Chrome or Firefox. I got around that by using CustomSensorVolumes when I was toying around with the JS API, they work fine. But now that I’m transitioning to CZM, I’m back to using ComplexConics (this appears to be what the ConeCesiumWriter uses.)

I finally got a stack trace for the lock up, it takes several minutes before the browser finally gives up trying to do whatever it’s doing and spits out this:

[GL] Shader program
link log: (3312,19): warning X3206: implicit truncation of vector type

(3313,21): warning
X3206: implicit truncation of vector type

(3314,23): warning
X3206: implicit truncation of vector type

(1198,25): warning
X3550: array reference cannot be used as an l-value; not natively addressable,
forcing loop to unroll

(1190,25): warning
X3550: array reference cannot be used as an l-value; not natively addressable,
forcing loop to unroll

(1340,21): warning
X3550: array reference cannot be used as an l-value; not natively addressable,
forcing loop to unroll

(3027,6): warning
X3565: loop simulation finished early, use /O1 or above for potentially better
codegen

(3046,6): warning
X3565: loop simulation finished early, use /O1 or above for potentially better
codegen

(2855,6): error
X3507: ‘_ellipsoidSensorIntersection’: Not all control paths return a value

:8080/Source/Renderer/ShaderProgram.js:1760

Uncaught
# :8080/Source/Renderer/ShaderProgram.js:1761

createAndLinkProgram
:8080/Source/Renderer/ShaderProgram.js:1761

ShaderProgram
:8080/Source/Renderer/ShaderProgram.js:1863

Context.createShaderProgram
:8080/Source/Renderer/Context.js:1119

ShaderCache.getShaderProgram
:8080/Source/Renderer/ShaderCache.js:38

ComplexConicSensorVolume.update
:8080/Source/Scene/ComplexConicSensorVolume.js:378

CompositePrimitive.update
:8080/Source/Scene/CompositePrimitive.js:400

Scene._update
:8080/Source/Scene/Scene.js:170

Scene.render
:8080/Source/Scene/Scene.js:181

declare.render
:8080/Apps/DojoWidgets/CesiumWidget.js:317

hitch
:8080/ThirdParty/dojo-release-1.7.2-src/dojo/_base/lang.js:15

I also get the subsequent message ‘drawArguments.shaderProgram is required’ as the tick() function continues to execute.

I’m up to date on my graphics drivers and Google Chrome on the machine that I got the error on. I’m not up to date on either on the other machine I’m working on, but experience the same behavior. I’m currently running Windows XP, though I experienced the same thing on Windows 7 (albeit with outdated graphics drivers.) Do ComplexConics cause this problem for anyone else? I’m going to try and use the WebGLInspector tomorrow but I can’t download it from where I’m at right now. Right now I’m comparing ComplexConicSensorVolume and CustomConicSensorVolume to see if I can spot a problem…

Eric

Hi Eric,

This is a known issue with the complex conic sensor. If you turn ANGLE off - see the Contributor’s Guide - they work OK on most video cards, but still take several seconds to compile.

However, I thought that we actually convert complex conic sensors to custom sensors when processing CZML so I am surprised you are receiving this. Perhaps that is not the default. If you are not happy with turning ANGLE off, override DynamicConeVisualizer with DynamicConeVisualizerUsingCustomSensor.

Regards,

Patrick

While the CZML spec itself is for a cone, we are currently using CustomSensor to visualize them in Cesium until the issues with ComplexConicSensor are fixed. If you look in DynamicScene/CzmlDefaults.js you should see code and comment indicating this. If you are having problems, can you share your CZML file so we can debug?

I found that bug as well, and yes, that is the problem. I turned off Angle but don’t particularly like the side effects, so I’m glad to hear that you’re essentially using CustomSensor instead. I’ll track down why it’s still using ComplexConic, I’m still on the viewer branch and a couple weeks out of date, I need to go back to master now that it contains Matt’s CZML work, maybe that’s my problem.

Matt, if you’re interested, here is my CZML. I was in the middle of (unsuccessfully) trying to get my cone to track my satellite, but that’s beside the point.

Eric

content.czm (64.8 KB)

I’ve updated my local repository and now Cesium is using CustomSensors for my CZM. Good to know about the bug and why my ComplexConicSensorVolumes weren’t working, but sorry to bring up a non-issue. Thanks for the help.