SOLVED Connect to asset database without Cinema4d?

What underlining technology is used in the asset database browser in Cinema4D? Is the asset database using some common backend (MongoDB / SQL / SQLite) or is it all custom developed for Cinema?

I'm concerned about leveraging Cinema4D Asset Database in a team operation to store important elements of our 3D Operation, if under the hood, the database has been custom rolled for C4D. Why you may ask? Two main reasons

  1. If other systems that are not C4D need to tap into a c4d asset database to read data.
  2. If we ever need to do a mass data migration out of a c4d asset database down the road for whatever reason.
  3. If Maxon decides to increase licensing cost of Cinema by 10000000000000000% and we need to move to a different solution (however unlikely).

Can a database connection be made without C4D? Are there any enterprise team pipeline TDs here that could pipe-in with their thoughts as well? If Maxon is black boxing user data with the C4D asset browser, that's a major concern for a production database...

Thank you,
Clayton

Hello @clayton_krause,

Thank you for reaching out to us. We understand your concerns, some of which have been addressed with the concept of watch folders in 2023.0. I would also recommend reading the Asset API Handbook, especially its database and metadata section, as it will also line out of the technical architecture of the Asset API.

General Asset API Architecture

There are in principle two types of asset databases. Asset databases which are located at a URL in the file scheme, e.g., file://x:/assets/ where x is either a drive on your local machine or a network drive from a file server. And asset databases which are located at a URL in the http(s) scheme, e.g., https://assets.mycompany.com. The first option is currently available for all users of Cinema 4D, the second option is currently only available for Maxon, as the exact setup of such 'online' database is not public knowledge.

All assets and asset databases, both local and online, are serialized into two things. Their primary content, e.g., a texture or an object, and their metadata, e.g., their name, keywords, what the bit rate of an image is, what the point count of an object is, etc.

Content is and always has been stored in its native format. There was no black boxing going on at any point. When you ingest a texture asset into an asset database, the database will contain exactly that texture file. The only difference is here that Cinema 4D will rename all these primary content files to asset.xxx where xxx is the natural file extension of that file, e.g., *.png for a texture file which has been ingested and provided as a png file. All scene element content is stored as Cinema 4D files, i.e., scene assets, object assets, and material assets. Generic file assets, e.g., a PDF or TXT are also stored in their native format.

The name of the asset and all its other metadata are being serialized to JSON (with the extension *.meta). In our APIs AssetDescriptionInterface is the primary interface to interact with such asset metadata, but since it is just JSON, nothing prevents you from harvesting the data from another app or just opening a text editor and reading it. The primarily relevant meta files for each asset are net.maxon.asset.metaproperties.meta and the string meta files.

Asset databases are an extension of the node system of Cinema 4D and serialize into a JSON schema designed for that system. There is no DBMS backend for this, Cinema 4D, its Nodes and Asset API are the DBMS. But since data is serialized as JSON for the metadata and the native format for the primary content, nothing prevents you from doing whatever you want with this data. Other than with a DBMS, there is no compression, encryption, or general paging/blobbing layer which you must understand to get hold of your data.

Structure and Content of an Asset Database

The here used SDK example database can be downloaded from https://developers.maxon.net/ in the S26.1 section.

0deae00e-bb35-43eb-876a-ca0a8eebc6d3-image.png
The content of the SDK asset database, its local version is identical to the online version provided by Maxon in structure and data. Each subdirectory, except for the '_index' and 'databaseinfo...' directories, is an asset in the database and there are four file assets in the database, the directories prefixed with '_file'.

1578f4dd-4ea8-42ca-b5cc-d9fb1623d496-image.png
A serialized asset on disk. The file called 'asset' always holds the primary data of the asset. The metadata, including the name of the asset, is stored in the JSON files with the extension '.meta'.

{
	"identification": "net.maxon.asset.metadata",
	"content": {
		"dataType": "net.maxon.interface.datadictionary-C",
		"content": {
			"referenceDataType": "net.maxon.interface.datadictionary-C",
			"_impl": {
				"_mode": 1,
				"_keyType": "net.maxon.datatype.internedid",
				"_fastData": [
					"net.maxon.asset.metaproperties.base.automaticpreview",
					{
						"dataType": "bool",
						"content": true
					},
					"net.maxon.asset.metaproperties.base.fileformat",
					{
						"dataType": "net.maxon.interface.string-C",
						"content": "png"
					},
					"net.maxon.asset.metaproperties.media.bitdepth",
					{
						"dataType": "int64",
						"content": 8
					},
					"net.maxon.asset.metaproperties.media.colorprofile",
					{
						"dataType": "net.maxon.interface.string-C",
						"content": "sRGB IEC61966-2.1"
					},
					"net.maxon.asset.metaproperties.media.dpi",
					{
						"dataType": "float64",
						"content": 72.0
					},
					"net.maxon.asset.metaproperties.media.height",
					{
						"dataType": "int64",
						"content": 2048
					},
					"net.maxon.asset.metaproperties.media.pixelformat",
					{
						"dataType": "<net.maxon.image.interface.pixelformat>C",
						"content": {
							"referenceClassType": "net.maxon.image.class.pixelformat.RGB.U8"
						}
					},
					"net.maxon.asset.metaproperties.media.width",
					{
						"dataType": "int64",
						"content": 2048
					}
				]
			}
		}
	}
}

The content of the metaproperties file for that texture asset in the SDK database. It is just a JSON file. The keys/indices are identical to the one described in our SDK documentation for asset metadata access.

Cheers,
Ferdinand

Hello @clayton_krause,

Thank you for reaching out to us. We understand your concerns, some of which have been addressed with the concept of watch folders in 2023.0. I would also recommend reading the Asset API Handbook, especially its database and metadata section, as it will also line out of the technical architecture of the Asset API.

General Asset API Architecture

There are in principle two types of asset databases. Asset databases which are located at a URL in the file scheme, e.g., file://x:/assets/ where x is either a drive on your local machine or a network drive from a file server. And asset databases which are located at a URL in the http(s) scheme, e.g., https://assets.mycompany.com. The first option is currently available for all users of Cinema 4D, the second option is currently only available for Maxon, as the exact setup of such 'online' database is not public knowledge.

All assets and asset databases, both local and online, are serialized into two things. Their primary content, e.g., a texture or an object, and their metadata, e.g., their name, keywords, what the bit rate of an image is, what the point count of an object is, etc.

Content is and always has been stored in its native format. There was no black boxing going on at any point. When you ingest a texture asset into an asset database, the database will contain exactly that texture file. The only difference is here that Cinema 4D will rename all these primary content files to asset.xxx where xxx is the natural file extension of that file, e.g., *.png for a texture file which has been ingested and provided as a png file. All scene element content is stored as Cinema 4D files, i.e., scene assets, object assets, and material assets. Generic file assets, e.g., a PDF or TXT are also stored in their native format.

The name of the asset and all its other metadata are being serialized to JSON (with the extension *.meta). In our APIs AssetDescriptionInterface is the primary interface to interact with such asset metadata, but since it is just JSON, nothing prevents you from harvesting the data from another app or just opening a text editor and reading it. The primarily relevant meta files for each asset are net.maxon.asset.metaproperties.meta and the string meta files.

Asset databases are an extension of the node system of Cinema 4D and serialize into a JSON schema designed for that system. There is no DBMS backend for this, Cinema 4D, its Nodes and Asset API are the DBMS. But since data is serialized as JSON for the metadata and the native format for the primary content, nothing prevents you from doing whatever you want with this data. Other than with a DBMS, there is no compression, encryption, or general paging/blobbing layer which you must understand to get hold of your data.

Structure and Content of an Asset Database

The here used SDK example database can be downloaded from https://developers.maxon.net/ in the S26.1 section.

0deae00e-bb35-43eb-876a-ca0a8eebc6d3-image.png
The content of the SDK asset database, its local version is identical to the online version provided by Maxon in structure and data. Each subdirectory, except for the '_index' and 'databaseinfo...' directories, is an asset in the database and there are four file assets in the database, the directories prefixed with '_file'.

1578f4dd-4ea8-42ca-b5cc-d9fb1623d496-image.png
A serialized asset on disk. The file called 'asset' always holds the primary data of the asset. The metadata, including the name of the asset, is stored in the JSON files with the extension '.meta'.

{
	"identification": "net.maxon.asset.metadata",
	"content": {
		"dataType": "net.maxon.interface.datadictionary-C",
		"content": {
			"referenceDataType": "net.maxon.interface.datadictionary-C",
			"_impl": {
				"_mode": 1,
				"_keyType": "net.maxon.datatype.internedid",
				"_fastData": [
					"net.maxon.asset.metaproperties.base.automaticpreview",
					{
						"dataType": "bool",
						"content": true
					},
					"net.maxon.asset.metaproperties.base.fileformat",
					{
						"dataType": "net.maxon.interface.string-C",
						"content": "png"
					},
					"net.maxon.asset.metaproperties.media.bitdepth",
					{
						"dataType": "int64",
						"content": 8
					},
					"net.maxon.asset.metaproperties.media.colorprofile",
					{
						"dataType": "net.maxon.interface.string-C",
						"content": "sRGB IEC61966-2.1"
					},
					"net.maxon.asset.metaproperties.media.dpi",
					{
						"dataType": "float64",
						"content": 72.0
					},
					"net.maxon.asset.metaproperties.media.height",
					{
						"dataType": "int64",
						"content": 2048
					},
					"net.maxon.asset.metaproperties.media.pixelformat",
					{
						"dataType": "<net.maxon.image.interface.pixelformat>C",
						"content": {
							"referenceClassType": "net.maxon.image.class.pixelformat.RGB.U8"
						}
					},
					"net.maxon.asset.metaproperties.media.width",
					{
						"dataType": "int64",
						"content": 2048
					}
				]
			}
		}
	}
}

The content of the metaproperties file for that texture asset in the SDK database. It is just a JSON file. The keys/indices are identical to the one described in our SDK documentation for asset metadata access.

Cheers,
Ferdinand

Thank you for the reply. Good information.