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
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 <SPAN class="operator token">--</SPAN><SPAN class="operator token">></SPAN> Paint Report Paint <SPAN class="operator token">--</SPAN><SPAN class="operator token">></SPAN> <SPAN class="token function">color</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"#FF0000"</SPAN><SPAN class="punctuation token">)</SPAN> Report <SPAN class="operator token">--</SPAN><SPAN class="operator token">></SPAN> <SPAN class="token function">report</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"facadearea"</SPAN><SPAN class="punctuation token">,</SPAN> geometry<SPAN class="punctuation token">.</SPAN><SPAN class="token function">area</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN> NIL<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
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
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.