[x3d-public] considering general conversion of metadata
Michalis Kamburelis
michalis.kambi at gmail.com
Mon Apr 10 13:29:35 PDT 2017
2017-04-10 16:12 GMT+02:00 Don Brutzman <brutzman at nps.edu>:
>> E.g. when generating X3D from Blender, we could export Blender's
>> "Custom Properties" to X3D metadata. This is how you define custom
>> metadata in Blender:
>> https://docs.blender.org/manual/de/dev/data_system/custom_properties.html
[...]
>>
>> I hope to improve the Blender X3D exporter some day to enable this:)
>
>
> cool. wondering, is there a Blender example with metadata in Custom
> Properties that we might use to show a mapping to MetadataSet?
>
> it would be good to compare source-to-source to explore a mapping
>
It's easy to create such example in Blender:)
I have done it, and committed to
- https://github.com/castle-engine/demo-models/blob/master/x3d/blender_custom_properties.blend
- https://github.com/castle-engine/demo-models/blob/master/x3d/blender_custom_properties.x3d
(Choose "Download" on these pages to download a particular file, or
use GIT to clone the entire demo-models repository). The Blender model
shows :
- Any number of properties is allowed on any Blender "data block",
which can be an object, or a mesh, or a material.
- Each property is a name and a value. The type of the property is
automatically detected from the value by Blender -- if it's an integer
or a float, Blender detects it and shows a nice slider for it.
- A simple Python script shows that the data is available in Python
(so it can be used when exporting), the properties are nicely visible
(and typed, as string or int or float).
Attaching also a screenshot from Blender, if you don't have the time
to actually run it now:)
You can imagine that these properties could be inserted by the
File->Export->X3D in Blender to the appropriate X3D file. The X3D file
that I link above was created by Blender exporter, but then I inserted
the custom properties (as X3D MetadataXxx nodes) manually:
https://github.com/castle-engine/demo-models/commit/f0abfe5e7778375105f2b42b7375116db5e002f8
This shows the work that could be done by the Blender X3D exporter in
the future.
- Blender "object" is a Transform "MyObject_TRANSFORM" in X3D,
- Blender mesh is a Group "group_ME_Cube" in X3D (because Blender's
mesh can contain any number of materials),
- Blender material is an X3D Material.
Regards,
Michalis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: custom_properties_blender.png
Type: image/png
Size: 365161 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170410/37e60e4d/attachment-0001.png>
More information about the x3d-public
mailing list