Select to view content in your preferred language

data transformation flow from 2D GIS features to Unity

1037
4
Jump to solution
06-13-2022 12:20 PM
coryeicher
Occasional Contributor

Hello,

Summary: What is the simplest way to take some 2D point, line, polygon GIS features and display them in Unity as Data Layers? Link

Context/Details:

I am assembling an example Unity-based VR application that will display two sets of data:
1) interior building assets including: rooms with floors and walls, linear features such as cables, and smaller 3D volumes inside the rooms like closets/cabinets
2) exterior assets including linear features including cables and pipes, points including joints/junctions, as well as polygon areas such a property poly or building buffer poly

Though my main focus will be 1), I already have data for 2) and I am trying to prove that this will work...

...I've taken a good look through the doc, but what is the simplest way to display these 2D objects in Unity? Most of the doc says to go through an SLPK, and here's a page with several ways to create one (link). None of these seem to match my input data case (2D point, line, polys).

I have some other bigger picture questions, but will cut it off there.

Thanks,

-Cory

CORY EICHER
www.eichcorp.com
cory@eichcorp.com
Tags (4)
0 Kudos
1 Solution

Accepted Solutions
coryeicher
Occasional Contributor

Replying here since I did get a little more clarity. The following steps are looking pretty good on my end:

  1. I created some new feature classes. A couple have geometry type "3D Ohject" (for "3d points" and "3D polygons") and one is just a z-enabled Line feature class.
  2. I used the Editor to create some Spheres and 3D Geometries. I used GP to load the non-z line features into the z-enabled feature class.
  3. I added all of these feature classes to an ArcGIS Pro Scene and symbolized. I tweaked the line layer's elevation properties.
  4. I used ArcGIS Pro > Share > Scene to publish to AGOL...
  5. ... this resulted in a "Web Scene" with several layers, notably the layers based on the above feature classes are listed as "ArcGISSceneServiceLayer" layers. Drilling into one of these shows each is a "Scene Layer - 3D Object". 
  6. This layer type matches the Linz, Austria Scene "Buildings" layer I was able to display in Unity using the SDK. Still need to confirm with my data.

-Cory

CORY EICHER
www.eichcorp.com
cory@eichcorp.com

View solution in original post

4 Replies
coryeicher
Occasional Contributor

Replying here since I did get a little more clarity. The following steps are looking pretty good on my end:

  1. I created some new feature classes. A couple have geometry type "3D Ohject" (for "3d points" and "3D polygons") and one is just a z-enabled Line feature class.
  2. I used the Editor to create some Spheres and 3D Geometries. I used GP to load the non-z line features into the z-enabled feature class.
  3. I added all of these feature classes to an ArcGIS Pro Scene and symbolized. I tweaked the line layer's elevation properties.
  4. I used ArcGIS Pro > Share > Scene to publish to AGOL...
  5. ... this resulted in a "Web Scene" with several layers, notably the layers based on the above feature classes are listed as "ArcGISSceneServiceLayer" layers. Drilling into one of these shows each is a "Scene Layer - 3D Object". 
  6. This layer type matches the Linz, Austria Scene "Buildings" layer I was able to display in Unity using the SDK. Still need to confirm with my data.

-Cory

CORY EICHER
www.eichcorp.com
cory@eichcorp.com
LDD_NW
by
New Contributor II

I was able to convert 2D point data to 'Scene Layer - 3D Object' using your instructions! I am able to view everything in Quest 2. I now just need to work out how to call the layers in Unity so I can create buttons to turn the layers on and off. Some things I did that might be helpful for anyone else trying to go from 2D points > 3D Object : 

  1. My 2D data had no height attribute as it just marked a location, I added an extra data field in the attributes table and set the value of all to 1
  2. Used the Geoprocessing tool called 'Feature to 3D by Attribute' to create feature layer with a z coordinate.
  3. Used the Geoprocessing tool 'Create 3D Object Scene Layer Content' to create a .slpk file of the 3D Object Scene Layer. I then drag this into the ArcGIS online 'my content' tab to host and share.
0 Kudos
coryeicher
Occasional Contributor

Quick clarification. I wasn't able to view the line feature class in Unity (it displays fine in the ArcGIS Online  Scene Viewer). Instead I created some cylindrical multipatches.

CORY EICHER
www.eichcorp.com
cory@eichcorp.com
0 Kudos
Matt_Nelson
Esri Contributor

Yea we don't have native support for feature layers yet so that additional work you did is necessary. 

0 Kudos