Destroying CityEngine Buildings

2515
4
10-14-2015 12:40 PM
ThomasBrown2
New Contributor

Hello all,

I'm currently working on a script that can be introduced to .cga code to show damage to buildings and other items within the scene. I'm currently working from the information at this link: simple procedural destruction . I'm able to get it to depict damage to the buildings, but my damage is showing up underneath the buildings, and the building models themselves are still in tact. Does anyone have any ideas? I'm currently playing with the z values to see if I can move the debris polygons to the level of the original models. Any assistance is appreciated. Thanks in advance.

Here's a screenshot of my progress so far:

ceprocdmg.JPG

-Tommy

0 Kudos
4 Replies
MatthiasBuehler
Regular Contributor

Guess who created that rule you're referring to ...

Matt

0 Kudos
ThomasBrown2
New Contributor

It was you! I recognize it from the original post. Have you had similar

experiences with the destroyed fragments ending up below the models?

Tommy Brown

0 Kudos
MatthiasBuehler
Regular Contributor

I did not have that issue .. of course .. haha ..

you have to make sure that the rubble 'knows' how far to fall down.

basically, use a generic attribute with scope.elevation at the very beginning of the shape. this saves the 'soil' height the building stands on. then, translate each piece by it's own scope.elevation minus the building's floor height.

make sense?

Matt

0 Kudos
ThomasBrown2
New Contributor

I see. Yes that makes sense. Thank you!

0 Kudos