What is a 'Collada' scene graph? - collada

What is a Collada scene graph?
Can I take a scene that I've downloaded from Google 3D warehouse and somehow convert it to a Collada scene graph?
Does the process somehow segment the scene?

COLLADA is the standard XML description language available for most if not all 3D applications. Google Earth is using COLLADA for the 3D models placed on to of the earth. Google Sketchup can import and export COLLADA models. Google Warehouse offer most if not all models in the COLLADA format. Google KMZ format is a ZIP file that contains COLLADA (.DAE) files(s), textures, and GIS placement information.
XML is a text based format, so you can look into a COLLADA document with any text editor, although a XML editor is highly recommended for large files, or for easier navigation. COLLADA is defined by its specification (in English and Japanese) and its Schema (.xsd) which enable COLLADA documents to be tested for validation by standard XML tools. Editors such as 'daenotepad' available on github will also provide help editing COLLADA documents based on the information stored in the schema.
A COLLADA document contains many different elements, one of the element is the < visual_scene > which contains the instance of geometries withing the the visual scene organized in a tree of locations. That is what is often referred incorrectly as the 'scene graph'. A scene graph is a run-time technology used by a lot of 3D rendering engines, which is similar to the but has many active run-time attributes such as 'switch' 'Level of detail' 'script' ... which COLLADA is not defining. COLLADA is merely defining the necessary data for enabling any applications, scene graph based or not, modeling tools or graphics engines to find the information they need a and communicate back and forth.

Related

Can't use custom 3D model for visualization

I'm using the Modelica.Mechanics.MultiBody.Visualizers.FixedShape to render custom 3D models. I tried using .dxf and .stl in ASCII format but none works.
For .dxf I get no error but the model doesn't show up.
For .stl I get an error saying there is no plugin for that file type.
Please see the highlighted portions in the above image. OpenModelica supports adding an external shape using the format shapeType=modelica://<Modelica-name>/<relative-path-file-name>. Preferably create a Resources folder in the same level under the library folder and add dxf files in them. The following animation shows the same. Hope this helps!

The pictures (JPEG file) in BIM model are not shown in Forge Viewer

I create BIM model and place the pictures (JPEG file) on the model's wall using 'place decal' function and change the graphic display option to 'realistic'. The result is as picture 1.
After that, I upload model to Forge viewer. However the pictures are not shown.
My questions are:
1) Why are the pictures in my revit model not shown in Forge viewer? How can I fix this?
2) If I can fix and the pictures are shown, can I change or replace the pictures in Forge Viewer later?
Please help, thank you.
Re 1: it's possible that decals in Revit models are currently not supported by the Forge Model Derivative service. I will talk to the engineering team and update this answer when I hear back from them. In the meantime, double check whether the decal image is embedded in the Revit file or referenced externally. If the image is referenced, you would have to include it with the *.rvt file in a zip archive when uploading & translating it in Forge.
Re 2: modifying textures of existing objects in Forge Viewer is possible but more involved. It would be easier to create new geometry (for example, using SceneBuilder), and overlay the existing decals.

Cannot view/access attribute data from KML file in QGIS

Using QGIS, when I convert a SHP file with several columns of attribute data into a KML for use in a Google Environment (e.g. Google Earth, Fusion Tables, Google Maps), I'm not able to view the attribute data following the conversion (while still using QGIS) — all I can see are two columns headers "Name" and "Description" with no cell values. Yet, if I take that same KML and load it into Google Fusion Tables, for example, suddenly all the attributes from the original SHP files are visible.
Is there a way to view the attributes of a KML while in QGIS?
I have not enough reputation to put this in a comment, thats why I give you the hit here...
Think, same problem is discussed here:Not Importing ExtendedData from KML and solution comes with gdal-2.0.2-4

Java converter from kml/shapefile to Geojson

I would like to write a command line program using Java that take in KML/Shapfile and output GeoJSON file.
What I usually did is go over ogre2ogre and manually convert my file.
Once I got the GeoJson I modified the content of it a little bit before output final GeoJSON.
I would like to skip the manual part and find some API that do the conversion for me.
Anyone could help please.
Thanks
OSMBonusPack provides a KML+GeoJSON toolkit, with both a KML parser/writer and a GeoJSON parser/writer, all in Java.
So this allows to read KML content, and write it as GeoJSON.
You can test this conversion using the demo app OSMNavigator.
It is targeting Android, so for your need you would have to pick the relevant classes, and remove code sections you don't need (icon loading, overlay building, Parcelable implementation, for instance).

Protect KML file from downloading or accessing

I am trying to protect my KML file, from being downloaded or its data extracted easily. All I want is the file to be viewed in google maps or google earth, but no one is allowed to download it or extract the data "easily" (the kml file isnt going to be available publicly). My kml files are a result of deep and exclusive analysis that is a signature I want to hide from competitors.
Also are there any alternatives to convert kml to a format that data cant be obtained easily from it. My KML files have polygons in 3D.
I understand the concept of everything that can be seen can be downloaded or extracted somehow,
I have 4 answers or 0 answers, depending on your project.
Using Google Maps Api for Business (~ 10.000$ per year) you can
generate a Client ID and use that to protect a Fusion Table (can
create in Google Drive) where you can import your KML and which you
then can display using the Google Maps Api. It would be the perfect solution, but without Google Maps Api for Business your Fusion Table is not protected and so anybody can access
it in Google Drive and view and copy-paste the Kml
representation of the polygons.
Using Google Maps Engine (/Lite) you can import your
Kml to Google as well (if you use Lite then you first need to import to Google
"My Maps" and from within Google Maps Engine Lite you can then
import from "My Maps"). I don't know the pricing for non-lite. A
Google Maps Engine Map can be shared so its only viewable and in
this only viewable version I have not found a way to download or
view the raw-kml-data which would be what we want. Sounds all good,
but you are limited to 3 layers in Maps Engine Lite and I have not found a way to import all my polygons (districts in
my case) into one layer at once. I can only import them bit by bit as it seems (managed to import 10 polygons with a total of 353 Points into one layer). Each import results in one layer, can't move stuff from one layer to another and for some reason there are some polygons that I can't seem to import. Edit:
I can import all polygons, one polygon (due to algorithmic simplification of my polygons) got an intersection (line crossing) and as soon as I fixed that part the import didn't throw any errors anymore, but I see now that I can only embed that map using an iframe having the legend included as well, so this solution is nothing for me.
Restrict access to a KML on your server to Google servers only using a white list of Google Maps servers which might request your
KML. Problem: can't find such a list online... must collect in some
way first.
Also there are blog entries Protecting KML Files from general public access in Google
Maps
and Protect KML / KMZ Files from Unauthorized Access Using
Cryptography
Your question is based on a fallacy of computer security known as "security through obscurity". The fallacy is this. You say you don't want it downloaded "easily." You can make it hard, but as long as its possible as soon as one person figures it out they write a script to do it automatically and its then "easy." There is no answer to your question because it is impossible. Any content you make available is pirateable, and any data is reconstructable.
Why not just save the kml file(s) and cut/paste onto a password encrypted usb drive, like Kingston or Kanguru defender. Then just open the kml from your usb disk.
you can check the $_SERVER["HTTP_USER_AGENT"] variable and if is from google then generate the kml from php.
$agent = "Kml-Google";
$google = strpos($_SERVER["HTTP_USER_AGENT"], $agent);
($google !== FALSE) or die;
header('Content-Type: application/vnd.google-earth.kml+xml kml');
header('Content-Disposition: attachment; filename="otras.kml"');
?>
<?xml version="1.0" encoding="UTF-8"?>
<kml xml ...

Resources