I have seen related information on the Cesium for Unreal forum. I’m wondering if this has been addressed for Cesium for Unity?
Hi @ximi22,
Cesium for Unity does not currently support HoloLens. I believe there was another forum user who was trying to get it to work, but unfortunately they haven’t opened a draft PR with their changes.
@janine and @ximi22
Yes, we are still planning to try to get Cesium for Unity working on HoloLens. We just haven’t yet gotten the time to look deeper into it. But it is our plan to take the time now in the foreseeable future. So hopefully, we could make a pull request before too long.
Hi @JakobAnarkyLabs , I just wondering are there any update of Cesium for Unity support Hololens?
We just opened a pull request that adds support for UWP / HoloLens:
If you want to try it prior to the next official release, you can get a pre-built version from that branch here:
https://github.com/CesiumGS/cesium-unity/suites/14876684397/artifacts/847462724
Extract the .tgz file and then install it using the Unity Package Manager.
Hi folks!
It looks like the PR has been merged, so is UWP/Hololens officially supported?
Yes, it was added in v1.6.0 back in September.
After some tests and a built for ARM64 i’ve got there :
- perf with URP was terrible, so I set up a project with built-in render pipeline
- OS interfers with camera, i need to separate the camera used by cesium for frustum from the main because it’s also used for positionning by the hololens
- shader is not compatible with Single Pass Instanced rendering
- memory keeps growing until it’s crashing. I fix it somehow by decreasing the max cache size of each tileset
So it’s quite promising. I would need to have this separation between Cesium camera used for frustum, and the one used for rendering and positionning by the device. I 'm going to make a try…
I guess i will bounce on the tweaks of dhyams that I’ve found here: Add support for multiple cameras · Issue #327 · CesiumGS/cesium-unity · GitHub
With that I have two cameras, one for the rendering and one for the cesium frustum.
And now I have a parallax issue: If i control zoom level by changing the observer’s height the tiles’ height changes as well, and the dynamic camera stays at origin. I don’t see any option to change this.
Maybe I can try to apply a scale factor on the cesium root, to compensate for the zoom?
Sounds like you need to disable the CesiumOriginShift component. It’s added to the Cesium DynamicCamera by default.
Alternatively, you can add a CesiumGlobeAnchor
component to other objects in the scene so that they’re adjusted appropriately when the origin shifts.
Right now I’ve put the CesiumOriginShift component on the dynamiccamera projection on the ground, it does the trick more or less (still need some tweaks).
I have another issue with shaders because the shaders are shadergraph, they sort of work with built-in RP, apart for the Single Pass Instanced rendering
Since URP is not an option on Hololens2 due to performance i have to convert those shaders to HLSL and I don’t see what’s the purpose of _overlay0TranslationAndScale parameter
Consider starting a new thread when you’re asking an unrelated question like this.
I don’t quite understand why shadergraph doesn’t work with Single Pass Instanced rendering. That seems like a rather odd Unity limitation. And switching to HLSL is likely to be a lot of work, including ongoing maintenance with each new release of Cesium for Unity. But I can answer your immediate question at least. _overlay0TranslationAndScale
is used to translate and scale the texture coordinates used with the first raster overlay. If you’re not using raster overlays, it does nothing.
the shadergraph shader supports only SRP, and though it works in editor with built-in RP it does not support automatic swith to single pass instanced rendering.
cf. https://forum.unity.com/threads/built-in-renderers-shader-graph-single-pass-instanced-mode-broken-in-vr.1145351/
I’ve made a basic substitute for the default raster overlay using HLSL that does the job.
That being said I apologize for the diggression, I will start new threads for unrelated topics