parking garage

7293
18
06-13-2015 02:58 PM
CurtBlondell
New Contributor II

I am trying to find a rule for creating a parking garage, multi-level showing cars and parking spaces, with a green space on top.

I have not found any complete rules, just partial ones (in previous discussions). I am familiar with adjusting existing rules, but

want to know if CE has instructions on how to create a parking garage start-to-finish, tutorial-style. Creating a parking garage with a

polygonal tool is a bit too time consuming. Thanks.

18 Replies
ChrisWilkins
Regular Contributor

Next, you guys should make a ramp. Cut out a hole where you want the ramp and do a shed roof and use comp to remove the top. To get the angle, use:

rampAngle = atan(FloorToFloorHeight / HorizontalLengthOfRamp)

SOH CAH TOA ... tangent(angle) = opposite / adjacent

AliciaNewberry
New Contributor III

Thank you for sharing your rule file, it was just what I needed for my project! Have you had any issues publishing the parking garages to a web scene? I'm having a weird thing happen where the floors don't show up at all in the web scene, but it looks fine in the CE project:

Inside CE:

ParkingDeckExample_InsideCE.PNG

In the browser:

ParkingDeckExample_InBrowser.PNG

My thought initially was to change the colors in the rule file to textures, and to also export them as the original textures when I exported the models, but I still get the same result. Any idea what could be causing this?

ChrisWilkins
Regular Contributor

This is backface culling, which is always on in web scenes. Only one side of a shape will show up when this is on. This is for performance reasons. If you are ready to publish to web scene, then you should turn on "Backface Culling" in the gear-shaped menu in the viewport. When that is turned on, you will see in the viewport just what you will see in the web scene. For the faces that show up this way, you need to run the CGA operation "reverseNormals". If you will see those faces from both sides (like looking into your garage from below), then you'll need to make a copy of the face and reverseNormals on one, while not on the other. You might also need to translate one of the faces very slightly to avoid face clashing (I'm not sure if that will be necessary or not).

Chris

BenjaminChmiel
New Contributor

I'm experiencing the same problem, though I'm not much of a script writer. Where does reverseNormals fit into the CGA rule for this?

CherylLau
Esri Regular Contributor

Imagine a cube with six sides.  Each of the six sides has a normal that points outwards.  That means, if you take the bottom part of the cube to be the floor and the top part of the cube to be the ceiling, then the normal for the floor points down, and the normal for the ceiling points up.  With backface culling, you would only see the outsides of the cube, and you wouldn't see anything if you were inside the cube looking outwards.  So, if the floor has a normal pointing downwards, you would only see the floor if you looked at it from below.  You would only see the ceiling when you look down at it from above.  You can apply reverseNormals to both the floor and the ceiling so that the normals point inwards (relative to the cube we are imagining).  That way if you were standing in the cube, you could see both the floor and the ceiling.  Note that I didn't look at the code, but this is in general how normals would work if you imagine a cube scenario.

BlakeHarcourt
New Contributor II

Glad to hear the rule helped !
I did write it quickly as a concept, so I didn't check how it would look in the web-scene.

Chris Wilkins​ is right, it has to do with the backface culling and using the reversenormals() function will help.
I may get time this afternoon to fix it up and re-publish a file that works in the web-scene.

DevinLavigne
Occasional Contributor III

My advice is not populate the floors with cars unless absolutely necessary. Think about the Cost Benefit of adding this detail vs adding polygons. And be mindful of how its going to be consumed - a rendered snapshot is one thing, but deploying it in a browser is something else. 

JasonPietka1
New Contributor III

I was able to tweak the rule to correct this.

DevinLavigne
Occasional Contributor III

And just so I'm clear - I meant the bottom and middle floors that are covered. I would suggest placing them on the top floor to help convey that it is indeed a parking garage.  I also have customized my rule to randomly place really low-res/-poly cars in stalls adjacent to the openings, but almost never even use it. It just doesn't seem to be worth the performance hit.