hi,I use CesiumUrlTemplateRasterOverlay to load my local png server(url is http://192.168.2.174:8013/{z}/{x}/{y}.png),the png has transparent channel,but in unity,it has a white background,I want to know how to use the transparent png?
Can anybody answer this question?Thanks
@azrogers, @Kevin_Ring, @janine Sorry to bother you. Could you please reply?
@yuzhe I’m not exactly clear on what you’re looking to do here, but I can think of two possibilities:
If you want there to be multiple overlays on a single tileset, with the overlay with the transparent PNGs showing through to the overlay beneath it, this should work as long as the overlays have different Material Key properties. Make sure that the bottom one has the Material Key of 0, the second one the Material Key of 1, and so on.
If you want there to be holes in the tileset where your raster overlay is transparent, this will probably require modifying the material. You can find the default materials in Packages/Cesium for Unity/Source/Runtime/Resources. We’re looking for CesiumDefaultTilesetShader and CesiumDefaultTilesetMaterial. Make copies of these to your project and rename them. Be sure to change CesiumDefaultTilesetMaterial’s Shader property to point to the renamed CesiumDefaultTilesetShader you copied over. Now, in the shader, you’ll want to hook up the raster overlay’s color Alpha value up to the Alpha output that is currently connected to the Clipping input.
@azrogers very thanks,I change Material Key, now everything is fine.![]()