All Products
Search
Document Center

PolarDB:Scene model

Last Updated:Oct 17, 2024

This topic describes the details and usage of the scene model.

Introduction

Overview

GanosBase Scene is a storage structure for 3D models for data analysis and rendering. GanosBase Scene is a spatio-temporal engine extension of PostgreSQL (PolarDB for PostgreSQL). GanosBase Scene stores as much information about 3D models as possible, including materials, textures, skeletons, and animations.

Features

  • GanosBase Scene supports unified management of scene data such as oblique photography and Graphics Language Transmission Format (glTF) data. The engine uses a combination of multi-level data views to store large objects and improve read and write performance.

  • GanosBase Scene enhances the support for the Earth-centered Earth-fixed (ECEF) and east-north-up (ENU) coordinates to process and analyze geographic coordinates and 3D scene data in a centralized manner.

  • GanosBase Scene supports operations on 3D scene data such as spatial relationship identification, closed clipping, geometric simplification, and texture reorganization. This allows you to retrieve and view massive city-level 3D scene data in seconds.

  • GanosBase Scene is compatible with multiple data formats, such as OSGB, glTF, and GLB.

For more information, see Scene SQL references.

Scenarios

GanosBase Scene can be used for the storage, analysis and visualization of 3D spatial data.

  • The management and visualization of oblique photography data.

    Oblique photography data is mainly used for the display of 3D basemaps. The management of oblique photography data is important in surveying and mapping. GanosBase Scene provides various scene types that allows the engine to import, store, compute and render oblique photography data. It also provides unified management of all types of spatial data that integrates visualization and computing, while not causing data redundancy. In addition, GanosBase allows you to store data in Object Storage Service (OSS) and build types only in the database. This allows you to cost-effectively perform operations such as spatial queries, analysis, and rendering on oblique photography objects.

    osgb_visualization.gif

  • Spatial data mining

    GanosBase Scene provides cross-model spatial relationship query capabilities and can be used in a variety of scenarios such as spatial data mining. For example, you can query whether multiple buildings overlap (by determining whether two 3D spatial objects intersect), and other buildings around a building or within a geographic range (by determining whether two 3D spatial objects are inclusive). You can also retrieve areas or objects from the 3D scene (such as a building in a campus with information such as the geometry and surface attributes of the building) for subsequent analysis and application.

    image

  • Campus and urban management and planning

    GanosBase Scene provides advanced spatial analysis capabilities, such as visibility analysis and shadow ratio analysis. Computing and analysis tasks are performed in the database to support more complex business scenarios and consume less GPU resources. The visibility analysis can be used in scenarios such as determining the layout of cameras in the campus and the security planning of key routes for major events. The shadow ratio analysis can be used in scenarios such as the site selection and design of buildings or solar power stations. This helps designers and decision makers achieve scientific planning and management. In addition, GanosBase Scene provides lightweight capabilities such as 3D model simplification, and texture clipping and simplification. This helps improve computing efficiency, accelerate frontend rendering, and better serve upper-layer applications.

    viewshed.gif

    shadow_ratio.gif

Components

Overview

GanosBase Scene provides the glTF and OSGB data types. The 3D virtual reconstruction of the physical world based on technologies such as remote sensing and mapping and intelligent perception generates a large amount of data, such as oblique photography data and 3D surface modeling data. The data usually has many display attributes and complex custom structures. Scene types allow you to manage data assets in a centralized manner, which improves the performance of retrieving and analyzing large-scale 3D scenes, improves the computing capability of super-large 3D models, and supports complex spatial queries and analysis. Scene types are commonly used in scenarios such as the digital base of a city, and virtual reality.

Scene types

glTF

glTF is a 3D file format that stores 3D model information in JSON. It is designed to reduce the size of 3D assets and the time required to decompress and use these assets. glTF files use the .gltf (JSON or ASCII) extension or the .glb (binary) extension. Both .gltf and .glb files can reference external binary data and texture resources. glTF supports 3D model geometry, appearance, scene graph hierarchy, and animation, and is widely used in high-performance transmission and loading of 3D scenes and models.

glTF is a cross-platform format and has become the standard for 3D objects on the web. glTF is defined by the Khronos Group, which is the organization that defined 3D graphics standards for OpenGL and Vulkan. This makes glTF the JPG format for 3D models, which is the standard for web export.

OSGB

OpenSceneGraph Binary (OSGB) is a binary file format for storing 3D graphics and scenes. OpenSceneGraph is an open source 3D graphics rendering engine. OSGB is one of the default file formats used in OpenSceneGraph. OSGB contains scene data such as the geometry, material, texture, lighting, and animation. It provides high-performance data saving and reading, and supports compression and random access. OSGB can be loaded and rendered by the OpenSceneGraph engine to create interactive 3D graphics applications, which are widely used in areas such as visual simulation, gaming, virtual reality, scientific visualization and modeling.

Spatial reference system

The spatial reference system (SRS) defines how to associate a Scene object to a specific location on the surface of the Earth.

GanosBase uses an integer as the SRID to reference the SRS definition. A Scene object is associated with SRS by using its own SRID value.

For more information, see Spatial reference.

Data column view

In GanosBase, the scene_columns view reads all relevant columns of the Scene type from the system catalog table of the database. This view follows the Simple Features Specification for SQL standard of Open Geospatial Consortium (OGC) and can be extended. The view contains the following columns:

Column

Type

Description

f_table_catalog

varchar(256)

The name of the database.

f_table_schema

name

The schema of the table.

f_table_name

name

The name of the table.

f_scene_column

name

The name of a Scene type column in this table.

Execute the following statement to query all Scene type columns in the current database:

SELECT * FROM scene_columns;

Index

Spatial indexes allow GanosBase to avoid global sequential scans of the database when processing large spatial datasets. Spatial indexes organize data in a tree structure that can be quickly traversed to find a specific record.

GanosBase provides GiST indexes for Scene data:

Index

Description

Feature

GiST (Generalized Search Tree)

GiST indexes provide fast queries on spatial relationships such as intersection and inclusion based on the bounding boxes of models.

GiST is the most popular and general spatial index method and provides high query performance.

You can execute the following statements to create a GiST index:

CREATE INDEX <index_name>
ON <table_name>
USING GIST(<column_name>);

Quick start

Overview

This section describes how to use the GanosBase Scene engine, including extension creation, table creation, data insertion, query results, index creation, and spatial query.

Syntax

  • Create an extension.

    CREATE EXTENSION Ganos_scene CASCADE;
    Note

    Create the extension in the public schema to avoid permission issues.

    CREATE extension Ganos_scene WITH schema public cascade;
  • Create a table with Scene columns.

    CREATE TABLE t_scene(
      id integer,
      data scene
    );
  • Insert data into the table.

    --- Insert data into the table.
    INSERT INTO 
      t_scene(id, data)
    VALUES 
      (1, '{"type" : "gltf", "affine" : [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1], "content" : {"accessors":[{"bufferView":0,"componentType":5126,"count":42,"max":[1.0,1.0,1.0],"min":[-1.0,-1.0,-1.0],"type":"VEC3"},{"bufferView":1,"componentType":5126,"count":42,"max":[1.0,1.0,1.0],"min":[-1.0,-1.0,-1.0],"type":"VEC3"},{"bufferView":2,"componentType":5126,"count":42,"max":[0.0],"min":[0.0],"type":"SCALAR"},{"bufferView":3,"componentType":5121,"count":240,"max":[41],"min":[0],"type":"SCALAR"}],"asset":{"generator":"Ganos Scene","version":"2.0"},"bufferViews":[{"buffer":0,"byteLength":504,"target":34962},{"buffer":0,"byteLength":504,"byteOffset":504,"target":34962},{"buffer":0,"byteLength":168,"byteOffset":1008,"target":34962},{"buffer":0,"byteLength":240,"byteOffset":1176,"target":34963}],"buffers":[{"byteLength":1416,"uri":"data:application/octet-stream;base64,AAAAAAAAgD8AAAAAAAAAP70bTz96N54+AAAAP70bTz96N56+AAAAAEDEWT9Qlga/AAAAAEDEWT9QlgY/QMRZP1CWBj8AAAAAAAAAv70bTz96N56+AAAAv70bTz96N54+QMRZv1CWBj8AAAAAAAAAAAAAgL8AAAAAAAAAP70bT796N56+AAAAP70bT796N54+AAAAAEDEWb9QlgY/AAAAAEDEWb9Qlga/QMRZP1CWBr8AAAAAAAAAv70bT796N54+AAAAv70bT796N56+QMRZv1CWBr8AAAAAAACAPwAAAAAAAAAAvRtPP3o3nr4AAAC/vRtPP3o3nj4AAAC/UJYGPwAAAABAxFm/vRtPP3o3nj4AAAA/vRtPP3o3nr4AAAA/UJYGPwAAAABAxFk/AACAvwAAAAAAAAAAvRtPv3o3nr4AAAA/vRtPv3o3nj4AAAA/UJYGvwAAAABAxFk/vRtPv3o3nj4AAAC/vRtPv3o3nr4AAAC/UJYGvwAAAABAxFm/AAAAAAAAAAAAAIA/ejeevgAAAL+9G08/ejeePgAAAL+9G08/ejeePgAAAD+9G08/ejeevgAAAD+9G08/AAAAAAAAAAAAAIC/ejeevgAAAD+9G0+/ejeePgAAAD+9G0+/ejeePgAAAL+9G0+/ejeevgAAAL+9G0+/AAAAAAAAgD8AAAAAAQAAP70bTz96N54+AQAAP70bTz96N56+AAAAAEDEWT9Rlga/AAAAAEDEWT9RlgY/QMRZP1KWBj8AAAAAAQAAv70bTz96N56+AQAAv70bTz96N54+QMRZv1KWBj8AAAAAAAAAAAAAgL8AAAAAAQAAP70bT796N56+AQAAP70bT796N54+AAAAAEDEWb9RlgY/AAAAAEDEWb9Rlga/QMRZP1KWBr8AAAAAAQAAv70bT796N54+AQAAv70bT796N56+QMRZv1KWBr8AAAAAAACAPwAAAAAAAAAAvRtPP3o3nr4BAAC/vRtPP3o3nj4BAAC/UpYGPwAAAABAxFm/vRtPP3o3nj4BAAA/vRtPP3o3nr4BAAA/UpYGPwAAAABAxFk/AACAvwAAAAAAAAAAvRtPv3o3nr4BAAA/vRtPv3o3nj4BAAA/UpYGvwAAAABAxFk/vRtPv3o3nj4BAAC/vRtPv3o3nr4BAAC/UpYGvwAAAABAxFm/AAAAAAAAAAAAAIA/ejeevgEAAL+9G08/ejeePgEAAL+9G08/ejeePgEAAD+9G08/ejeevgEAAD+9G08/AAAAAAAAAAAAAIC/ejeevgEAAD+9G0+/ejeePgEAAD+9G0+/ejeePgEAAL+9G0+/ejeevgEAAL+9G0+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAECAwACBAEABQIBAAYHBAAHAwYACAcGCQoLDAkLDQoJDgsKCQ8QDQkQDA8JERAPEhMUBRIUDhMSFRQTEhYXDhIXBRYSGBcWGRobCBkbERoZHBsaGR0eERkeCB0ZHx4dICEiGCAiHCEgDCIhICMkHCAkGCMgBCQjJSYnFSUnHyYlAycmJSgpHyUpFSglDSkoIxYBBCMBGBYjBQEWBxskBAckCBsHHCQbAhQnAwInBRQCFScUJh0GAyYGHx0mCAYdCxciDAsiDhcLGCIXIRoPDCEPHBohEQ8aKBMKDSgKFRMoDgoTEB4pDRApER4QHyke"}],"meshes":[{"primitives":[{"attributes":{"NORMAL":1,"POSITION":0,"_USER_1":2},"indices":3,"mode":4}]}],"nodes":[{"mesh":0}],"scenes":[{"nodes":[0]}]}}'::scene),
      (2, '{"type" : "gltf", "affine" : [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1], "content" : {"accessors":[{"bufferView":0,"componentType":5121,"count":36,"max":[7],"min":[0],"type":"SCALAR"},{"bufferView":1,"componentType":5126,"count":8,"max":[2.5,0.5,0.5],"min":[1.5,-0.5,-0.5],"type":"VEC3"}],"asset":{"generator":"ganos","version":"2.0"},"bufferViews":[{"buffer":0,"byteLength":36,"target":34963},{"buffer":0,"byteLength":96,"byteOffset":36,"target":34962}],"buffers":[{"byteLength":132,"uri":"data:application/octet-stream;base64,AgEAAQIDBAIAAgQGAQQABAEFBgUHBQYEAwYHBgMCBQMHAwUBAADAPwAAAL8AAAC/AAAgQAAAAL8AAAC/AADAPwAAAD8AAAC/AAAgQAAAAD8AAAC/AADAPwAAAL8AAAA/AAAgQAAAAL8AAAA/AADAPwAAAD8AAAA/AAAgQAAAAD8AAAA/"}],"meshes":[{"primitives":[{"attributes":{"POSITION":1},"indices":0,"mode":4}]}],"nodes":[{"mesh":0}],"scenes":[{"nodes":[0]}]}}'::scene),
      (3, '{"type" : "gltf", "affine" : [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1], "content" : {"accessors":[{"bufferView":0,"componentType":5121,"count":36,"max":[7],"min":[0],"type":"SCALAR"},{"bufferView":1,"componentType":5126,"count":8,"max":[6.5,0.5,0.5],"min":[5.5,-0.5,-0.5],"type":"VEC3"}],"asset":{"generator":"ganos","version":"2.0"},"bufferViews":[{"buffer":0,"byteLength":36,"target":34963},{"buffer":0,"byteLength":96,"byteOffset":36,"target":34962}],"buffers":[{"byteLength":132,"uri":"data:application/octet-stream;base64,AgEAAQIDBAIAAgQGAQQABAEFBgUHBQYEAwYHBgMCBQMHAwUBAACwQAAAAL8AAAC/AADQQAAAAL8AAAC/AACwQAAAAD8AAAC/AADQQAAAAD8AAAC/AACwQAAAAL8AAAA/AADQQAAAAL8AAAA/AACwQAAAAD8AAAA/AADQQAAAAD8AAAA/"}],"meshes":[{"primitives":[{"attributes":{"POSITION":1},"indices":0,"mode":4}]}],"nodes":[{"mesh":0}],"scenes":[{"nodes":[0]}]}}'::scene);
  • Query results.

    SELECT id, ST_AsText(data)
    FROM t_scene;
    -------------------------
      1 | {"type" : "gltf", "affine" : [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1], "content" : {"accessors":[{"bufferView":0,"componentType":5126,"count":42,"max":[1.0,1.0,1.0],"min":[-1.0,-1.0,-1.0],"type":"VEC3"},{"bufferView":1,"componentType":5126,"count":42,"max":[1.0,1.0,1.0],"min":[-1.0,-1.0,-1.0],"type":"VEC3"},{"bufferView":2,"componentType":5126,"count":42,"max":[0.0],"min":[0.0],"type":"SCALAR"},{"bufferView":3,"componentType":5121,"count":240,"max":[41],"min":[0],"type":"SCALAR"}],"asset":{"generator":"Ganos Scene","version":"2.0"},"bufferViews":[{"buffer":0,"byteLength":504,"target":34962},{"buffer":0,"byteLength":504,"byteOffset":504,"target":34962},{"buffer":0,"byteLength":168,"byteOffset":1008,"target":34962},{"buffer":0,"byteLength":240,"byteOffset":1176,"target":34963}],"buffers":[{"byteLength":1416,"uri":"data:application/octet-stream;base64,AAAAAAAAgD8AAAAAAAAAP70bTz96N54+AAAAP70bTz96N56+AAAAAEDEWT9Qlga/AAAAAEDEWT9QlgY/QMRZP1CWBj8AAAAAAAAAv70bTz96N56+AAAAv70bTz96N54+QMRZv1CWBj8AAAAAAAAAAAAAgL8AAAAAAAAAP70bT796N56+AAAAP70bT796N54+AAAAAEDEWb9QlgY/AAAAAEDEWb9Qlga/QMRZP1CWBr8AAAAAAAAAv70bT796N54+AAAAv70bT796N56+QMRZv1CWBr8AAAAAAACAPwAAAAAAAAAAvRtPP3o3nr4AAAC/vRtPP3o3nj4AAAC/UJYGPwAAAABAxFm/vRtPP3o3nj4AAAA/vRtPP3o3nr4AAAA/UJYGPwAAAABAxFk/AACAvwAAAAAAAAAAvRtPv3o3nr4AAAA/vRtPv3o3nj4AAAA/UJYGvwAAAABAxFk/vRtPv3o3nj4AAAC/v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AAAAAAECAwACBAEABQIBAAYHBAAHAwYACAcGCQoLDAkLDQoJDgsKCQ8QDQkQDA8JERAPEhMUBRIUDhMSFRQTEhYXDhIXBRYSGBcWGRobCBkbERoZHBsaGR0eERkeCB0ZHx4dICEiGCAiHCEgDCIhICMkHCAkGCMgBCQjJSYnFSUnHyYlAycmJSgpHyUpFSglDSkoIxYBBCMBGBYjBQEWBxskBAckCBsHHCQbAhQnAwInBRQCFScUJh0GAyYGHx0mCAYdCxciDAsiDhcLGCIXIRoPDCEPHBohEQ8aKBMKDSgKFRMoDgoTEB4pDRApER4QHyke"}],"meshes":[{"primitives":[{"attributes":{"NORMAL":1,"POSITION":0,"_USER_1":2},"indices":3,"mode":4}]}],"nodes":[{"mesh":0}],"scenes":[{"nodes":[0]}]}}
      2 | {"type" : "gltf", "affine" : [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1], "content" : {"accessors":[{"bufferView":0,"componentType":5121,"count":36,"max":[7],"min":[0],"type":"SCALAR"},{"bufferView":1,"componentType":5126,"count":8,"max":[2.5,0.5,0.5],"min":[1.5,-0.5,-0.5],"type":"VEC3"}],"asset":{"generator":"ganos","version":"2.0"},"bufferViews":[{"buffer":0,"byteLength":36,"target":34963},{"buffer":0,"byteLength":96,"byteOffset":36,"target":34962}],"buffers":[{"byteLength":132,"uri":"data:application/octet-stream;base64,AgEAAQIDBAIAAgQGAQQABAEFBgUHBQYEAwYHBgMCBQMHAwUBAADAPwAAAL8AAAC/AAAgQAAAAL8AAAC/AADAPwAAAD8AAAC/AAAgQAAAAD8AAAC/AADAPwAAAL8AAAA/AAAgQAAAAL8AAAA/AADAPwAAAD8AAAA/AAAgQAAAAD8AAAA/"}],"meshes":[{"primitives":[{"attributes":{"POSITION":1},"indices":0,"mode":4}]}],"nodes":[{"mesh":0}],"scenes":[{"nodes":[0]}]}}
      3 | {"type" : "gltf", "affine" : [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1], "content" : {"accessors":[{"bufferView":0,"componentType":5121,"count":36,"max":[7],"min":[0],"type":"SCALAR"},{"bufferView":1,"componentType":5126,"count":8,"max":[6.5,0.5,0.5],"min":[5.5,-0.5,-0.5],"type":"VEC3"}],"asset":{"generator":"ganos","version":"2.0"},"bufferViews":[{"buffer":0,"byteLength":36,"target":34963},{"buffer":0,"byteLength":96,"byteOffset":36,"target":34962}],"buffers":[{"byteLength":132,"uri":"data:application/octet-stream;base64,AgEAAQIDBAIAAgQGAQQABAEFBgUHBQYEAwYHBgMCBQMHAwUBAACwQAAAAL8AAAC/AADQQAAAAL8AAAC/AACwQAAAAD8AAAC/AADQQAAAAD8AAAC/AACwQAAAAL8AAAA/AADQQAAAAL8AAAA/AACwQAAAAD8AAAA/AADQQAAAAD8AAAA/"}],"meshes":[{"primitives":[{"attributes":{"POSITION":1},"indices":0,"mode":4}]}],"nodes":[{"mesh":0}],"scenes":[{"nodes":[0]}]}}
  • Create an index.

     CREATE INDEX idx_t_scene
     ON t_scene
     USING GIST(data);
  • Query spatial data.

    -- The query object intersects with a 3D object.
    SELECT id
    FROM t_scene
    WHERE ST_3DIntersects(data, ST_3DMakeCuboid(3, 3, 3));
    -------------------------
      2
    
     -- The query object is included in a 3D object.
    SELECT id
    FROM t_scene
    WHERE ST_Contains(ST_3DMakeCuboid(3, 3, 3), data);
    -------------------------
      1
  • Spatial computing.

    -- The intersection with a 3D object.
    SELECT ST_asText(ST_Intersection(data, ST_3DMakeCuboid(3, 3, 3))) 
    FROM t_scene
    WHERE id = 2;
    -------------------------
     {"type" : "gltf", "affine" : [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1], "content" : {"accessors":[{"bufferView":0,"componentType":5126,"count":6,"max":[1.5,0.5,0.5],"min":[1.5,-0.5,-0.5],"type":"VEC3"},{"bufferView":1,"componentType":5126,"count":6,"max":[-1.0,0.0,0.0],"min":[-1.0,0.0,0.0],"type":"VEC3"},{"bufferView":2,"componentType":5121,"count":6,"max":[5],"min":[0],"type":"SCALAR"}],"asset":{"generator":"ganos","version":"2.0"},"bufferViews":[{"buffer":0,"byteLength":72,"target":34962},{"buffer":0,"byteLength":72,"byteOffset":72,"target":34962},{"buffer":0,"byteLength":8,"byteOffset":144,"target":34963}],"buffers":[{"byteLength":152,"uri":"data:application/octet-stream;base64,AADAPwAAAL8AAAA/AADAPwAAAD8AAAC/AADAPwAAAL8AAAC/AADAPwAAAD8AAAC/AADAPwAAAL8AAAA/AADAPwAAAD8AAAA/AACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAAECAwQFAAA="}],"meshes":[{"primitives":[{"attributes":{"NORMAL":1,"POSITION":0},"indices":2,"mode":4}]}],"nodes":[{"mesh":0}],"scenes":[{"nodes":[0]}]}}
    
     -- Merge multiple glTF scene objects into one.
    SELECT ST_asText(ST_Combine(data))
    FROM t_scene;
    -------------------------
     {"type" : "gltf", "affine" : [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1], "content" : {"accessors":[{"bufferView":0,"componentType":5126,"count":42,"max":[1.0,1.0,1.0],"min":[-1.0,-1.0,-1.0],"type":"VEC3"},{"bufferView":1,"componentType":5126,"count":42,"max":[1.0,1.0,1.0],"min":[-1.0,-1.0,-1.0],"type":"VEC3"},{"bufferView":2,"componentType":5126,"count":42,"max":[0.0],"min":[0.0],"type":"SCALAR"},{"bufferView":3,"componentType":5121,"count":240,"max":[41],"min":[0],"type":"SCALAR"},{"bufferView":4,"componentType":5121,"count":36,"max":[7],"min":[0],"type":"SCALAR"},{"bufferView":5,"componentType":5126,"count":8,"max":[2.5,0.5,0.5],"min":[1.5,-0.5,-0.5],"type":"VEC3"},{"bufferView":6,"componentType":5121,"count":36,"max":[7],"min":[0],"type":"SCALAR"},{"bufferView":7,"componentType":5126,"count":8,"max":[6.5,0.5,0.5],"min":[5.5,-0.5,-0.5],"type":"VEC3"}],"asset":{"generator":"Ganos Scene","version":"2.0"},"bufferViews":[{"buffer":0,"byteLength":504,"target":34962},{"buffer":0,"byteLength":504,"byteOffset":504,"target":34962},{"buffer":0,"byteLength":168,"byteOffset":1008,"target":34962},{"buffer":0,"byteLength":240,"byteOffset":1176,"target":34963},{"buffer":0,"byteLength":36,"byteOffset":1416,"target":34963},{"buffer":0,"byteLength":96,"byteOffset":1452,"target":34962},{"buffer":0,"byteLength":36,"byteOffset":1548,"target":34963},{"buffer":0,"byteLength":96,"byteOffset":1584,"target":34962}],"buffers":[{"byteLength":1680,"uri":"data:application/octet-stream;base64,AAAAAAAAgD8AAAAAAAAAP70bTz96N54+AAAAP70bTz96N56+AAAAAEDEWT9Qlga/AAAAAEDEWT9QlgY/QMRZP1CWBj8AAAAAAAAAv70bTz96N56+AAAAv70bTz96N54+QMRZv1CWBj8AAAAAAAAAAAAAgL8AAAAAAAAAP70bT796N56+AAAAP70bT796N54+AAAAAEDEWb9QlgY/AAAAAEDEWb9Qlga/QMRZP1CWBr8AAAAAAAAAv70bT796N54+AAAAv70bT796N56+QMRZv1CWBr8AAAAAAACAPwAAAAAAAAAAvRtPP3o3nr4AAAC/vRtPP3o3nj4AAAC/UJYGPwAAAABAxFm/vRtPP3o3nj4AAAA/vRtPP3o3nr4AAAA/UJYGPwAAAABAxFk/AACAvwAAAAAAAAAAvRtPv3o3nr4AAAA/vRtPv3o3nj4AAAA/UJYGvwAAAABAxFk/vRtPv3o3nj4AAAC/vRtPv3o3nr4AAAC/UJYGvwAAAABAxFm/AAAAAAAAAAAAAIA/ejeevgAAAL+9G08/ejeePgAAAL+9G08/ejeePgAAAD+9G08/ejeevgAAAD+9G08/AAAAAAAAAAAAAIC/ejeevgAAAD+9G0+/ejeePgAAAD+9G0+/ejeePgAAAL+9G0+/ejeevgAAAL+9G0+/AAAAAAAAgD8AAAAAAQAAP70bTz96N54+AQAAP70bTz96N56+AAAAAEDEWT9Rlga/AAAAAEDEWT9RlgY/QMRZP1KWBj8AAAAAAQAAv70bTz96N56+AQAAv70bTz96N54+QM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pDRApER4QHykeAgEAAQIDBAIAAgQGAQQABAEFBgUHBQYEAwYHBgMCBQMHAwUBAADAPwAAAL8AAAC/AAAgQAAAAL8AAAC/AADAPwAAAD8AAAC/AAAgQAAAAD8AAAC/AADAPwAAAL8AAAA/AAAgQAAAAL8AAAA/AADAPwAAAD8AAAA/AAAgQAAAAD8AAAA/AgEAAQIDBAIAAgQGAQQABAEFBgUHBQYEAwYHBgMCBQMHAwUBAACwQAAAAL8AAAC/AADQQAAAAL8AAAC/AACwQAAAAD8AAAC/AADQQAAAAD8AAAC/AACwQAAAAL8AAAA/AADQQAAAAL8AAAA/AACwQAAAAD8AAAA/AADQQAAAAD8AAAA/"}],"meshes":[{"primitives":[{"attributes":{"NORMAL":1,"POSITION":0,"_USER_1":2},"indices":3,"mode":4}]},{"primitives":[{"attributes":{"POSITION":5},"indices":4,"mode":4}]},{"primitives":[{"attributes":{"POSITION":7},"indices":6,"mode":4}]}],"nodes":[{"mesh":0},{"mesh":1},{"mesh":2}],"scenes":[{"nodes":[0]},{"nodes":[1]},{"nodes":[2]}]}}
  • Delete the extension (optional).

    DROP EXTENSION Ganos_Scene CASCADE;

SQL statement reference

For more information about SQL statements, see Scene SQL references.