# Procedural Textures to replace satellite from close-up

**URL:** <https://community.cesium.com/t/procedural-textures-to-replace-satellite-from-close-up/21755>\
**Category:** Cesium for Unreal\
**Created:** [December 29, 2022, 10:22pm UTC](https://community.cesium.com/t/procedural-textures-to-replace-satellite-from-close-up/21755 "2022-12-29T22:22:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Knedlik\_MCPE](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/knedlik_mcpe/32/11818_2.png) [@Knedlik\_MCPE](https://community.cesium.com/u/Knedlik_MCPE)\
**Post date:** [December 29, 2022, 10:22pm UTC](https://community.cesium.com/t/procedural-textures-to-replace-satellite-from-close-up/21755/1 "2022-12-29T22:22:56Z")

</div>

Hello!  
I’m trying to make a combat sim in UE5 with Cesium, but I’m not sure how I could implement using tileable textures based on the pixel color in the satellite image. Is it currently possible?  
Thanks in advance,  
-Knedlik

---

<div class="post-metadata">

**Author:** ![UniversPP](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/universpp/32/11831_2.png) [@UniversPP](https://community.cesium.com/u/UniversPP)\
**Post date:** [January 1, 2023, 1:40pm UTC](https://community.cesium.com/t/procedural-textures-to-replace-satellite-from-close-up/21755/2 "2023-01-01T13:40:19Z")

</div>

Up ! :]

---

<div class="post-metadata">

**Author:** ![mahalobay](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mahalobay/32/4112_2.png) [@mahalobay](https://community.cesium.com/u/mahalobay)\
**Post date:** [January 2, 2023, 3:20pm UTC](https://community.cesium.com/t/procedural-textures-to-replace-satellite-from-close-up/21755/3 "2023-01-02T15:20:46Z")

</div>

A World-Aligned Texture node (google for how to use and apply) should get you the independence you need from uvs. How to apply it would depend on your setup of course. If you are overlaying satellite imagery with your detail textures, you’ll need to copy the Cesium materials to your project and modify it as necessary 🙂

---

<div class="post-metadata">

**Author:** ![Knedlik\_MCPE](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/knedlik_mcpe/32/11818_2.png) [@Knedlik\_MCPE](https://community.cesium.com/u/Knedlik_MCPE)\
**Post date:** [January 2, 2023, 3:32pm UTC](https://community.cesium.com/t/procedural-textures-to-replace-satellite-from-close-up/21755/4 "2023-01-02T15:32:22Z")

</div>

I’m not sure if there’s not a misunderstanding. I want to use textures based on the satellite image’s colors.

---

<div class="post-metadata">

**Author:** ![mahalobay](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mahalobay/32/4112_2.png) [@mahalobay](https://community.cesium.com/u/mahalobay)\
**Post date:** [January 2, 2023, 3:58pm UTC](https://community.cesium.com/t/procedural-textures-to-replace-satellite-from-close-up/21755/5 "2023-01-02T15:58:23Z")

</div>

You can. That’s what copying the Cesium materials allows you to do. Those materials can be edited and you can add texture functions that blend detail textures with the satellite images.

---

<div class="post-metadata">

**Author:** ![Knedlik\_MCPE](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/knedlik_mcpe/32/11818_2.png) [@Knedlik\_MCPE](https://community.cesium.com/u/Knedlik_MCPE)\
**Post date:** [January 2, 2023, 4:30pm UTC](https://community.cesium.com/t/procedural-textures-to-replace-satellite-from-close-up/21755/6 "2023-01-02T16:30:56Z")

</div>

I do not mean to just blend them. I want to for example apply a sand material/texture where the satellite image is yellow, and do this only when the camera is x away from the ground otherwise lerp them until it’s y from the ground.

---

<div class="post-metadata">

**Author:** ![mahalobay](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mahalobay/32/4112_2.png) [@mahalobay](https://community.cesium.com/u/mahalobay)\
**Post date:** [January 2, 2023, 5:05pm UTC](https://community.cesium.com/t/procedural-textures-to-replace-satellite-from-close-up/21755/7 "2023-01-02T17:05:40Z")

</div>

Gotcha. The lerp can be handled by a distance-to-camera function. The other bit about applying a sand texture where the image is yellow is more complicated, depending on your level of fidelity required. You can use some sort of a color function to determine if the incoming color is yellow, and use that to drive the blending alpha, but note that “yellow” comes in a large range of RGB values that also already have textural detail in them, so the hard part is determining what is “sand”, “rocks” etc. I don’t know if there’s a good easy way of doing that yet. If you find it I’d love to hear more about it 🙂

---

<div class="post-metadata">

**Author:** ![Knedlik\_MCPE](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/knedlik_mcpe/32/11818_2.png) [@Knedlik\_MCPE](https://community.cesium.com/u/Knedlik_MCPE)\
**Post date:** [January 2, 2023, 5:17pm UTC](https://community.cesium.com/t/procedural-textures-to-replace-satellite-from-close-up/21755/8 "2023-01-02T17:17:02Z")

</div>

Do you by any chance know how to get the color as a vec3 in the graph? If that’s possible, then I think I can handle it.

---

<div class="post-metadata">

**Author:** ![mahalobay](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mahalobay/32/4112_2.png) [@mahalobay](https://community.cesium.com/u/mahalobay)\
**Post date:** [January 2, 2023, 6:19pm UTC](https://community.cesium.com/t/procedural-textures-to-replace-satellite-from-close-up/21755/9 "2023-01-02T18:19:58Z")

</div>

I do not at the moment. For my implementation I am currently running a line trace at runtime to get a color value for wheel dust, but this is obviously not feasible for what you are trying to do. Would love to hear if you figure out a solution!

---

<div class="post-metadata">

**Author:** ![Knedlik\_MCPE](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/knedlik_mcpe/32/11818_2.png) [@Knedlik\_MCPE](https://community.cesium.com/u/Knedlik_MCPE)\
**Post date:** [January 3, 2023, 6:44am UTC](https://community.cesium.com/t/procedural-textures-to-replace-satellite-from-close-up/21755/10 "2023-01-03T06:44:00Z")

</div>

Update: Seems that editing the baseColor in the raster overlay layer allows what I’m going for. Now I wonder if it’s feasible to release it with an edited raster overlay layer and not break any rules.

---

<div class="post-metadata">

**Author:** ![mahalobay](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mahalobay/32/4112_2.png) [@mahalobay](https://community.cesium.com/u/mahalobay)\
**Post date:** [January 3, 2023, 4:25pm UTC](https://community.cesium.com/t/procedural-textures-to-replace-satellite-from-close-up/21755/11 "2023-01-03T16:25:41Z")

</div>

I believe that is the whole point of allowing a raster overlay 🙂

Good luck!
