Flickering colours

667
2
12-16-2013 05:42 AM
CarolineSteer
New Contributor III
Hi there,

I'm currently trying to recreate something similar to the Esri Campus ( http://www.arcgis.com/home/item.html?id=9c0e319bfaff4d33a0fe2da97c2c3fd7). I am currently using CGA to colour the floor by the room usage however when I do, the colour flickers in both CityEngine itself and in a web scene. Is this my graphics card suffering or is there a way around this in order to create solid colour?

[ATTACH=CONFIG]29909[/ATTACH]

This is the code:
attr orange = "#ffc04c"
attr grey = "#dadae3"
attr blue = "#00c6bd"
attr beige = "#f5f5dc"
attr green = "#7aa37a"
attr Type = ""


Lot -->

case Type == "Lift":  color(blue)
case Type == "Bathroom" : color(orange)
case Type == "Meeting Room" : color(beige)
case Type == "Storage" : color (green)
else : color(grey)

Thanks!
Caroline
Tags (2)
0 Kudos
2 Replies
MatthiasBuehler1
Frequent Contributor II
Hi,


You're creating polygons which are exactly on top of each other, so-called 'co-planar polygons'. In 3d, it's not possible to just hide some polygons by 'layering' as e.g. in Photoshop or 'painting over regions'.

When 2 polygons are coplanar, these display-issues come up. It's an effect called 'z-fighting'. The problem is that the graphics card tries do display both polygons ( both are valid of course ). so in some small regions, one polygon is shown, in an other small region, the other polygon is shown, causing that 'flickering'. That's a fundamental thing that cannot be solved.

The ONLY way to fix this is to separate the polygons a bit spatially.
E.g. move the floor polygons 1 cm up or move the white big polygon 1 cm down

Shape -->
    alignScopeToAxes(y)
    t (0,-.01,0)
    Done.


Ok ? :)
0 Kudos
DavidGisa
New Contributor

Hi, 
so i wanted to color my ground, but if i use the color operation the Origin shape dosen´t dissipiere. Instet both colored and origin shape exist as co-planar polygons.

even if I extrude them und NIL the bottom the Origin shape stays.

Is there an Option so i can see the Rule Results without the origin Shape?

0 Kudos