Photogrammetry material lighting

Hi!
Trying to add photogrammetry tiles and use unlit materials (the model is not de-lighted, and artificial lighting with CesiumSky looks weird…
How can I maintain unlit textures?
tnx


Cesium for Unreal doesn’t (yet) support the KHR_materials_unlit extension that is often used with photogrammetry. You can work around it for now, though, by defining a custom material instance that uses the “unlit” shader type, and setting that as the Material property on the Cesium 3D Tileset.

Kevin

Thanks, Kevin,
I’ve tried creating an unlit material,
but how can I use the texture from the Cesium model to plug into that new unlit material?

Hi @Eytan_Mann ,

You can create a copy of the default tileset material instance in the CesiumForUnreal plugin folder (it’s called MI_CesiumThreeOverlaysAndClipping.uasset). Once you’ve made the necessary tweaks, you can use your custom material on the tileset by adding it to the “Rendering → Material” slot in the tileset’s details panel. There’s a more detailed tutorial on custom tileset materials for reference: Editing Tileset Materials – Cesium

-Nithin

thanks @Nithin_Pranesh ,
I’m can’t seem to figure this out (new to Unreal).
Changed CesiumThreeOverlaysAndClipping to Unilt but getting black



Will appreciate your help!
Eytan

Have you solved it?

no:/
really looking for help from someone…
:pray:
@IndigoYun
@Nithin_Pranesh
@Kevin_Ring

This turned out to be a little trickier than I thought, but I got it working. A few more changes to the material are necessary.

Unlit materials only output the “Emissive” color, which is usually black for glTFs. So we need to copy the base color into the emissive channel. We also need to greatly increase the intensity of the emissive channel so that it can compete with the sunlit (very bright!) lit materials. Here’s how:

  1. Find MI_CesiumThreeOverlaysAndClipping. It’s in the Content Browser under CesiumForUnreal Content → Materials. If you don’t see a CesiumForUnreal folder, click “View Options” in the lower right and check “Show Plugin Content”
  2. Drag MI_CesiumThreeOverlaysAndClipping into your project’s folder using the Content Browser. Choose “Copy”. Rename it to MI_CesiumUnlit.
  3. Create a new “Material Layer Blend” in your project called MLB_ToEmissive. It should look like this:

This MLB is copying the BaseColor into the Emissive Color channel, and multiplying it by 111000.0 along the way. I chose this value because it is the default intensity of the CesiumSunSky’s DirectionalLight. I don’t know if this is “correct”, but seems to work.
4. Double-click MI_CesiumUnlit to open it.
5. On the Details tab, change the “Shading Model” to “Unlit”:


6. On the “Layer Parameters” tab, add a new layer at the top of the stack. Set the “Blend Asset” to MLB_ToEmissive. Set the “Layer Asset” to anything, such as “DefaultLayer”

7. Use MI_Unlit as all three materials on the Tileset:

Let me know if that works for you.

Kevin

Thanks Kevin,
I cannot seem to get this to work. Went through your instructions as much as I could understand, and still getting black UNLIT material.
Here’s what I did:




You got black because you multiplied the BaseColor by 0 instead of by 111000 in MLB_toEmissive. Also, you should define an unlit material instance instead of modifying M_CesiumBaseMaterial. So that you don’t wonder wonder later why lighting doesn’t work.

Have you solved it?

not really, but in the meantime, Cesium for Unity came out, and there it works easily:)

Thanks!

This works for me! Thanks!