3MFConsortium / spec_core

3MF's Core specification
BSD 2-Clause "Simplified" License
56 stars 16 forks source link

Object thumbnails are defined as 3D Texture instead of thumbnail like the root thumbnail #2

Closed KrisIverson closed 6 years ago

KrisIverson commented 6 years ago

Following up on the Core spec change around thumbnails:

The problem was identified and discussed in the 3MF face to face that the root thumbnail part is described and stored with a thumbnail relationship and a thumbnail part. However, at the object level, another thumbnail representing the object was stored inconsistently as a 3D Texture. We briefly looked at it and brainstormed how we could fix this by changing the object level thumbnail to be stored as a Thumbnail part and appropriate indexed by a Thumbnail relationship as described in section 2.1.1. However, we want to ensure that consumers can still read existing 3MFs that may have object thumbnails as 3D Texture while requiring Producers to do the right thing and write out as Thumbnail.

I took a look at this and propose the following:

1) We change the language of the object thumbnail attribute to indicate it should be using Thumbnail relationship and Thumbnail part instead of 3D Texture

Path to a thumbnail of type JPEG or PNG that represents a rendered image of the object 2) We change the confusing description of 3D Texture to describe what it is actually used for:

3D Texture Contains a texture used to apply color to a 3D object in the 3D Model part or a stream of data representing complex information in a binary format (for use by future extensions) 3D Model OPTIONAL

3) We change the description of thumbnail at the Object section: Object thumbnails MUST have an appropriate thumbnail relationship to the model part as described in section 2.1.1. Consumers MAY find additional thumbnails associated with the 3D Texture relationship, for backwards compatibility. Producers MUST store thumbnails with the thumbnail relationship in an associated thumbnail part.

4) We add an optional new attribute on Model indicating (just like object) which thumbnail represents the full model – defining exactly which element in the thumbnail relationship represents the root

5) Indicate if there is only one thumbnail in the thumbnail relationship, it SHOULD be considered the root thumbnail for the model

6) Any tests that currently search for object thumbnails should use thumbnail relationship and parts and not 3D Texture

7) Add a test to validate all thumbnails are referenced by the thumbnails relationship

jordig100 commented 6 years ago

Added thumbnail clarification in version 1.2.3:

Thumbnail | Contains a small JPEG or PNG image that represents the 3D objects in the package or the package as a whole. | Package | OPTIONAL -- | -- | -- | --

and:

Object thumbnails MUST have an appropriate 3D Texturethumbnail relationship to the model part as described in section 2.1.1. Consumers MAY find additional thumbnails associated with the 3D Texture relationship, for backwards compatibility. Producers MUST store thumbnails with the thumbnail relationship in an associated thumbnail part.