Select to view content in your preferred language

Getting reflections on CityEngine generated mesh in UE5

1034
4
Jump to solution
09-12-2023 11:01 PM
CODEWYR
Emerging Contributor

I just started using CityEngine with UE5 and I'm already loving it. After playing around, I wanted to know how I can add reflections to generated mesh. Similar to what we can see in this demo for CityEngine. It looks beautiful.

 

images (9).jpeg

0 Kudos
1 Solution

Accepted Solutions
BenjaminSteger1
Esri Contributor

The easiest way would be to already set the correct value in CGA, this would create all material instances with the correct value. 

Otherwise a slightly faster approach directly in Unreal would be to open the Parent Material, delete the connection to the roughness value in the material and connect a constant value node with the desired value.

BenjaminSteger1_0-1694599001180.png

Another approach would be to use Editor Utility Widgets https://docs.unrealengine.com/5.3/en-US/scripting-the-unreal-editor-using-blueprints/ to adjust all the materials via blueprint scripting, but it would probably take some time to get started with this approach.

View solution in original post

4 Replies
BenjaminSteger1
Esri Contributor

Hi,

The easiest way to add reflections to your scene is to decrease the roughness value on your building materials (I got similar results to the screenshot when I set them between 0.05-0.1). This can either be done in Unreal https://docs.unrealengine.com/4.27/en-US/Resources/ContentExamples/MaterialNodes/1_4/ or already in CGA https://doc.arcgis.com/en/cityengine/latest/cga/cga-material-attribute.htm
Improving the reflections can be done in multiple ways, I would suggest to look at the following website https://docs.unrealengine.com/5.3/en-US/reflections-environment-in-unreal-engine/

Best,
Benjamin

0 Kudos
CODEWYR
Emerging Contributor

I appreciate your response on this. So if I go in to the generated mesh > then materials > I see a bunch of materials there. What I also see is a Parent Material (opaque). I can go into each material and set the roughness value from there but that would take a lot of time, because that would take ages, is there any way I can adjust the roughness for all those materials. I'm sorry if this is a noob question.

0 Kudos
BenjaminSteger1
Esri Contributor

The easiest way would be to already set the correct value in CGA, this would create all material instances with the correct value. 

Otherwise a slightly faster approach directly in Unreal would be to open the Parent Material, delete the connection to the roughness value in the material and connect a constant value node with the desired value.

BenjaminSteger1_0-1694599001180.png

Another approach would be to use Editor Utility Widgets https://docs.unrealengine.com/5.3/en-US/scripting-the-unreal-editor-using-blueprints/ to adjust all the materials via blueprint scripting, but it would probably take some time to get started with this approach.

CODEWYR
Emerging Contributor

Thank you. It works.

0 Kudos