uC3D ‐ 3D Product Visualization - XMPieLab/uStore-NG GitHub Wiki

What is uC3D?

uC3D (stands for "You See 3D") is a technology that renders variable data print ready designs on top of 3D models.
It allows you to present the finished product to your customer as it would look in real life.

Where do I start?

The first thing you'll need is a dieline. This dieline will be the base for the VDP template and for the 3D model.

To be able to present your products in 3D, you need a 3D model in a Collada format.
There are a few options to obtain such 3D models:

  1. Create a dieline in Illustrator and fold it using a tool like Origami or Esko
  2. Create a 3D model from a dieline using a 3D modeling tool like Blender.
  3. You can also purchase a 3D model and adapt it to your needs.

The dieline will also be used to create an InDesign template that will eventually be used to create variable print ready PDFs and their PNG equivalents for 3D preview.

Once you have the InDesign (or XLIM) ready in uProduce and a 3D model, you'll be ready to create a product in uStore.
This product requires configuration of the 3D representation in a JSON format.

JSON who?

JSON is a data format similar to XML. In uC3D the JSON tells uStore how to render the 3D model and has the following format:

{
    "materials":
    [{
            "materialName": "Material1",
            "mapFileIndex": 1,
            <advancedMaps>,
            "default3dCharacteristics": ["default"],
            "materialSelection": ["dial1", "dial2"],
            <staticAttributes>
        }, 
        <more materials>
    ],
    "runAnimation": false,
    "sceneBackground": "ffffff",
    "tilt": { "x": 0, "y": 0, "z": 0 },
    "rotationSpeed": 3,
    "lightingColor": "ffffff",
    "lightingBrightness": 1,
    "addSurroundingLights": false
}

materialName - The name of a material in the 3D model you want to control. "default" denotes the first material found in the model. The name is case sensitive.
mapFileIndex - The position of the page that is composed by InDesign/XLIM that contains the design to be used for the material. 1 denotes the first page.
<advancedMaps> - More pages in InDesign/XLIM that can control a lot of aspects dynamically. See advancedMaps below.
default3dCharacteristics - The default material characteristics to load for this material, denoted by the name of the record in Presets > Global Configuration > 3D Characteristics table. These characteristics are applied first, and then may be overridden by other settings in the Advanced Configuration JSON on each individual 3D product or by a Dial used in the materialSelection.
materialSelection - Names of uStore Dials that can affect the characteristics of the material. The selected value of such Dial is then searched as the name in Presets > Global Configuration > 3D Characteristics table, and the corresponding properties are applied on the model.
<staticAttributes> - Attributes that affect the characteristics of the material statically (as opposed to dynamically from InDesign/XLIM).
runAnimation - If the 3D model contains an animation (like folding and unfolding), should uStore play this animation? Accepted values: true or false.
sceneBackground - Background color behind the 3D model in hex color code.
tilt - Tilting the model around the x, y or z axis. Useful when the model is "lying down". Accepted values are integers between -360 and 360 representing the degree of rotation.
rotationSpeed - The speed of the rotation around the Z axis. 0 denotes no rotation. Accepted values are integers between 1 to 6 which represent slow to fast speeds.
lightingColor - The color of the ambient light in hex color code.
lightingBrightness - The brightness of the ambient light. Accepted values are decimals between 0 for dim to 2 for bright light.
addSurroundingLights - Add spot lights around the 3D model. Accepted values: true or false.

advancedMaps

    "roughnessMapFileIndex": 2,
    "metalnessMapFileIndex": 3,
    "bumpMapFileIndex": 4,
    "alphaMapFileIndex": 5,
    "normalMapFileIndex": 6,
    "displacementMapFileIndex": 7

All of these maps are dynamically generated by InDesign/XLIM. The map's FileIndex is its page number in the resulting proof composition.
roughnessMapFileIndex - Roughness controls how matte or glossy the material is. The green channel controls how rough (matte) a pixel on the material will be. 0 in the green channel yields a highly glossy material, 255 in the green channel yields a very matte (non reflective) material.
metalnessMapFileIndex - Metalness controls how metallic the material is. The blue channel controls how metallic a pixel will be. 0 in the blue channel yields a non metallic material, 255 yields a metallic material.
bumpMapFileIndex - A bump map is used to create embossment or debossment on the material surface. It is a map of grey tones. A midtone black (hex #808080) denotes no embossment or debossment. The lighter the grey is, the higher the embossment is. The darker the grey is, the lower the debossment is.
alphaMapFileIndex - The alpha map is used to create holes in the 3D model. This map is white and uses black to denote holes.
normalMapFileIndex - The normal map affect the surface normal for each pixel fragment and changes the way the color is lit. Normal maps do not change the actual shape of the mesh surface, only the lighting. Sometimes called the purple map, the image contains different levels of red and blue. Blue indicates a surface movement towards the viewer, red indicates a movement away from the viewer.
displacementMapFileIndex - The displacement map affects the position of the mesh's vertices. Unlike other maps which only affect the light and shade of the material the displaced vertices can cast shadows, block other objects, and otherwise act as real geometry. The displacement texture is an image where the value of each pixel (white being the highest) is mapped against, and repositions, the vertices of the mesh.

staticAttributes

    "aoMapIntensity": 1,
    "bumpScale": 1,
    "color": "ffffff",
    "displacementBias": 0,
    "displacementScale": 1,
    "emissive": "000000",
    "emissiveIntensity": 1,
    "envMapIntensity": 1,
    "mapsRepeatType": null,
    "metalness": 0.5,
    "normalScale": null,
    "opacity": 1,
    "roughness": 0.5,
    "transparent": false,
    "defaultMaps": {
        <mapList>
    }, 
    "maps": {
        <mapList>
    }

aoMapIntensity - Intensity of the ambient occlusion effect. Default is 1. Zero is no occlusion effect. Usefull when the ambient light is good for one material but too harsh for another material, in that case you can apply lower aoMapIntensity to the latter.
bumpScale - How much the bump map affects the material. Typical ranges are 0-1. Default is 1.
color - Color of the material. Default is set to white: "ffffff".
displacementBias - The offset of the displacement map's values on the mesh's vertices. Without a displacement map set, this value is not applied. Default is 0.
displacementScale - How much the displacement map affects the mesh (where black is no displacement, and white is maximum displacement). Without a displacement map set, this value is not applied. Default is 1.
emissive - Emissive (light) color of the material, essentially a solid color unaffected by other lighting. Default is black: "000000".
emissiveIntensity - Intensity of the emissive light. Modulates the emissive color. Default is 1.
envMapIntensity - Scales the effect of the environment map by multiplying its color. Accepted values are Floating point numbers.
mapsRepeatType -
metalness - How much the material is like a metal. Non-metallic materials such as wood or stone use 0.0, metallic use 1.0, with nothing (usually) in between. Default is 0.5. A value between 0.0 and 1.0 could be used for a rusty metal look. If metalnessMap is also provided, both values are multiplied.
normalScale - How much the normal map affects the material. Typical ranges are 0-1. Default is a Vector2 set to (1,1).
opacity -
roughness - How rough the material appears. 0.0 means a smooth mirror reflection, 1.0 means fully diffuse. Default is 0.5. If roughnessMap is also provided, both values are multiplied.
transparent -
defaultMaps - see mapList below.
maps - see mapList below.

mapList

Several texture maps can be loaded either from "defaultMaps" or "maps" parameters.
defaultMaps - texture maps that are pre-loaded on the uStore server. defaultMaps are located at X:\XMPie\uStore\App\uStoreShared\ProductModels\Default - Out-of-the-box, XMPie provides the BWclouds.png environment Map file at this location.
maps - texture maps that are uploaded in a zip file together with the Collada 3D model when defining the 3D product in uStore admin. The following texture maps can be used:

    "aoMap": "<filename>",
    "alphaMap": "<filename>",
    "bumpMap": "<filename>",
    "displacementMap": "<filename>",
    "emissiveMap": "<filename>",
    "envMap": {"image": "<filename>", "mapping":305, "encoding": 3001}, 
    "map": "<filename>",
    "metalnessMap": "<filename>",
    "normalMap": "<filename>",
    "roughnessMap": "<filename>"
    }

envMap mapping Sets the texture mapping mode used to map the environment to the 3D model. Accepted values are the integers from the list below:

300 = UVMapping 
301 = CubeReflectionMapping
302 = CubeRefractionMapping
303 = EquirectangularReflectionMapping
304 = EquirectangularRefractionMapping
305 = SphericalReflectionMapping

300 (UVMapping) is the default and maps the texture using the mesh UV's coordinates.

envMap encoding Sets the encoding used to map the environment to the 3D model. Accepted values are the integers from the list below:

3000 = LinearEncoding
3001 = sRGBEncoding
3002 = RGBEEncoding
3003 = LogLuvEncoding
3004 = RGBM7Encoding
3005 = RGBM16Encoding
3007 = GammaEncoding
3200 = BasicDepthPacking
3201 = RGBADepthPacking

3001 (sRGBEncoding) is the default encoding.

Tutorial videos and samples

Several tutorial videos with resource files to download and try are available for registered XMPie customers at campus.xmpie.com

⚠️ **GitHub.com Fallback** ⚠️