Fuzzy Objects

945
2
Jump to solution
05-18-2020 09:19 PM
DerrickLim
New Contributor II

Is there a possible solution to how i can fix the fuzziness of my output object in City Engine? Is there something to do with how i write my CGA rule? Thanks! 

- Derrick

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
ThomasFuchs
Esri Regular Contributor

Hi Derrik,

in 3D rendering the phenomenon creating those fuzzy surfaces is called Z-fighting. It occurs when two or more primitives have very similar distances to the camera. This would cause them to have near-similar or identical values in the z-buffer, which keeps track of depth. This then means that when a specific pixel is being rendered, it is nearly random which one of the two primitives gets drawn in that pixel because the z-buffer cannot distinguish precisely which one is farther from the other.

To avoid this from happening in your CGA code, it is important to add NIL to the leaf shapes that are not needed to be drawn. e.g.:

Generate --> Paint Report
	
Paint --> color("#FF0000")

Report -->
	report("facadearea", geometry.area())
	NIL

View solution in original post

2 Replies
ThomasFuchs
Esri Regular Contributor

Hi Derrik,

in 3D rendering the phenomenon creating those fuzzy surfaces is called Z-fighting. It occurs when two or more primitives have very similar distances to the camera. This would cause them to have near-similar or identical values in the z-buffer, which keeps track of depth. This then means that when a specific pixel is being rendered, it is nearly random which one of the two primitives gets drawn in that pixel because the z-buffer cannot distinguish precisely which one is farther from the other.

To avoid this from happening in your CGA code, it is important to add NIL to the leaf shapes that are not needed to be drawn. e.g.:

Generate --> Paint Report
	
Paint --> color("#FF0000")

Report -->
	report("facadearea", geometry.area())
	NIL
DerrickLim
New Contributor II

Hey Thomas, you're right and thanks for that! 

I readjusted my cga rule and include the NIL as suggested to counter the Z-fighting. Cheers mate

0 Kudos