Hi Peter,
I'm assuming you want the objects on the same 'area' of your page. Not two separate boxes.
I'm investigating the same type of thing, my first guess is it won't work :( We'll have to somehow figure out how to get the render-loops combined on the same OpenGL context, which might be possible, or might be a rewrite of cesium, i'm not quite sure yet.
Cesium's 3D library is pretty whacky for any realtime animation, recreating everything constantly, something simple that would be like 10% of a single core in Three.js pegs my CPU in cesium. There is a lot of VBO creation/destruction going on. Simply rotating the ModelMatrix for objects causes the entire object to be recreated, and there seems to be no realistic object hierarchy, kind of bizarre for a 3D engine.
If we can somehow clone the Cesium GL Context into three.JS's WebGLRenderer (or vice versa) and maintain the state (Scene Projections/etc) I think its our best bet. That could be pretty tricky, and will surely require some internal changes to one of the libraries :(
The other option is just drop back to all custom model rendering and not use three.js (There is a SandCastle example), this obviously is far from ideal.
Peter -
It's been a long time since I've dealt with 3D hardware so I may be just out of date. I know in windows it used to be forbidden to have two OpenGL contexts on top of each other. Having two contexts on the same page for sure is fine. The resources shouldn't be mixed up, they should be completely separated (I know in NativeGL there is a way to share across contexts/threads, but WebGL is different so i'm unsure).
I'm unsure how you are going to make one 'transparent', but curious if you get this to work. Generally the render target is a separate memory buffer, so having it be 'transparent' doesn't really mean anything. The output is usually a flip or a copy to the target area, flips imply the memory isn't actually moving at all but the HW that updates the RAMDAC has specialized code that says 'hey, at buffer address X actually copy the memory from Y instead'. You would have to render to a target, then copy that target onto the final target. Otherwise you'd just be transparent onto some random garbage or whats already been drawn. Maybe this is implicitly done somehow by WebGL?
Patrick -
The PolyLineCollection will recreate itself on its ModelMatrix change, I think it does this due to 2D/Columbus mode in which it needs to re-project itself. I guess its semi-unavoidable in cases like that. But in the 3D mode there is no need to recreate or project anything.
A bigger issue i'm having right now is needing to update the path, adding a point about every 100ms or so (becoming circular at some threshold). Ideally this would only project only the 'new' point since the others have not changed, but the code is structured such that every point is re-projected, for static views that's fine, but for updating/dynamic content its a bit much. Considering that Cesium has CZML for dynamic/live views I would have thought the base code was a bit more prepared for this.
It performs ok, but its chewing up the entire CPU core (even at a forced 20fps instead of 60fps). And there are other things that on the page that need some of that good old CPU time :)
--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/phXlN-aPAHE/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/phXlN-aPAHE/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/phXlN-aPAHE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
has anybody succeeded using three.js together with cesium, in the meantime?
hi,
has anybody succeeded using three.js together with cesium, in the meantime?
--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/phXlN-aPAHE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.