While I have done some classic shading work in CE, I'm interested in the new PBR shading capability. Could someone possibly do a demo or a rundown of the essentials of PBR in CE? I'm in architecture and I'm intersted in learning how to set up realistic textures. But there are so many material attributes and material maps, it's a bit of a maze for me. And even after researching some generic PBR info, it doesn't seem to translate directly to the concepts used in CE. While PBR concepts like Albedo, AO, are not concepts in CE, CE concepts like opacity, emissive and occlusion are not concepts in PBR. Or are they just different names for identical/similar things?
Here is how the CGA material attributes correspond to the GLTF material spec based on Physically-Based Rendering (PBR).
CGA material attributes
material shape attributes—ArcGIS CityEngine Resources | Documentation
GLTF material spec
https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-material
CGA material attributes | GLTF material spec |
---|---|
material.color.{r|g|b} | pbrMetallicRoughness.baseColorFactor, RGB components |
material.opacity | pbrMetallicRoughness.baseColorFactor, A component |
material.colormap | pbrMetallicRoughness.baseColorTexture, RGB channels |
material.opacitymap | pbrMetallicRoughness.baseColorTexture, A channel |
material.metallic | pbrMetallicRoughness.metallicFactor |
material.roughness | pbrMetallicRoughness.roughnessFactor |
material.metallicmap, B channel | pbrMetallicRoughness.metallicRoughnessTexture, B channel |
material.roughnessmap, G channel | pbrMetallicRoughness.metallicRoughnessTexture, G channel |
material.normalmap | normalTexture |
material.occlusionmap, R channel | occlusionTexture, R channel |
material.emissivemap | emissiveTexture |
material.emissive | emissiveFactor |
material.opacitymap.mode | alphaMode |
material.opacitymap.cutoff | alphaCutoff |
The zip file attached (PBR_Demo.zip) is a CityEngine demo project that sets PBR materials in CGA.
I have downloaded a material from Quixel, and there is four pictures, an albedo, a displacement, a Normal and a Roughness map. I have made the albedo and the normal map work but is unsure on how to make the two other maps work. This is the code so fare:
brickMap01 = "/CityVR_2/assets/textures/PBR/Wall/Brick/Brick_Modern_ufoqbe2g_2K_surface_ms/ufoqbe2g_2K_Albedo.jpg"
bumpMap01 = "/CityVR_2/assets/textures/PBR/Wall/Brick/Brick_Modern_ufoqbe2g_2K_surface_ms/ufoqbe2g_2K_Displacement.jpg"
normalMap01 = "/CityVR_2/assets/textures/PBR/Wall/Brick/Brick_Modern_ufoqbe2g_2K_surface_ms/ufoqbe2g_2K_Normal.jpg"
roughnessMap01 = "/CityVR_2/assets/textures/PBR/Wall/Brick/Brick_Modern_ufoqbe2g_2K_surface_ms/ufoqbe2g_2K_Roughness.jpg"
WallMaterial01 -->
set(material.colormap.su,1/1.440)
set(material.colormap.sv,1/1.440)
set(material.colormap,brickMap01)
set(material.normalmap.su,1/1.440)
set(material.normalmap.sv,1/1.440)
set(material.normalmap,normalMap01)
set(material.roughnessmap.su,1/1.440)
set(material.roughnessmap.sv,1/1.440)
set(material.roughnessmap, roughnessMap01)
projectUV(0)