Manual Collada For Esko Studio PDF
Manual Collada For Esko Studio PDF
com
November 7, 2012
Introduction
This document document describes how to prepare 3D Collada files that can be used by Studio Designer and
Studio Visualizer.
Studio is Esko’s unique 3D packaging design and visualization solution. In Studio Designer (one of the Studio
components), you can see the 3D object in the artwork editor (either Illustrator, ArtPro or PackEdge) and apply
artwork to it. In Studio Visualizer (another Studio component) it is really easy to create real-time moving visuals
of packaging with complex print with an large range of materials and finishing options. The packaging 3D models
(or Structural Designs, as we like to call them) can be made in ArtiosCAD or tthe Studio Toolkits. They can also be
downloaded from the online Shapes store.
But you can also model them in other 3D software, import them in Studio as Collada files and apply print to them.
Thanks to this capability just about any packaging shape can be visualized. But such a 3D Collada file has to be
properly prepared.
Collada is also the format of most of the items offered on Shapes, the online store of packaging resources. The
Collada items on the Shapes store are prepared according to the guidelines in this document.
Pre-requisites
Making shapes with the purpose-made Studio Toolkits is an easy and a pleasant experience. But making a
custom shape (one that is not possible to create with the Toolkits and not available on the Shapes store) is not
easy. It is a technical and possibly labour-intensive process. But if you plan to use this shape in Studio for more
than one artwork variation, then that will be time well spent.
This document assumes that you have experience with a 3D design application like Maya, Modo, Cinema4D or
3DS Max. You really need such a 3D design application, even if you already have 3D data from a CAD application
(like SolidWorks, Catia, Iges, AutoCAD, ...). These CAD applications have limited or no UV-mapping (Texture
Coordinate) editing features.
You also need a basic understanding of XML and you need to understand the basic concepts of Esko Studio.
Workflow
To prepare a custom shape for Studio, you need to run over the following tasks. The rest of the document will
describe more details about these tasks.
About Collada
For the custom 3D shapes, we have chosen for the Collada file format. Collada is an open and public file format,
originally developed by Sony but now controlled by a non-profit consortium. Collada is intended as an
intermediate format for transporting data from one digital content creation (DCC) tool to another. Applications
exist to support that usage for several DCCs, including Maya (using ColladaMaya); 3ds Max (using ColladaMax);
LightWave 3D (version 9.5); Cinema 4D (MAXON); Softimage|XSI; Side Effect's Houdini; MeshLab; SketchUp,
Blender, Modo and Strata 3D. COLLADA .dae files can be used in Adobe Photoshop software since version CS3.
Game engines, such as Unreal engine, have also adopted this format, so has Google for its 3D warehouse and
GoogleEarth.
For Studio, Collada was a perfect candidate. However, we had to define some Esko extensions to the format to
make it practical for the printing and packaging industry (more about this later).
Step 1: The modeling
To make your own shapes for Studio, you will probably model the object first in a 3D application (like 3DS Max,
Maya, Cinema 4D or Strata CX). We assume that you are experienced with such software. This chapter contains
instructions for making 3D models, specifically for Studio.
Geometry
A strong feature of Studio, is that the models are rendered in real-time. With the mouse, the user can turn and flip
the model as if he is holding it in his hand. To make sure that your models look good and perform well in real-time
rendering conditions it is important to follow a few guidelines:
Labels
If you are modeling a container with a label on it, you are advised to create separate geometry for the label. If you
take that approach then the Visualizer user can choose a transparent label substrate, or a die-cut operation and
see the container material underneath the label. It is tempting to use the container surfaces and simulate the
label with textures (e.g. stencil buffers or decals) but with that approach it would not work with transparent
substrates or die-cuts.
Number of Triangles
The models in a Collada file are triangulated. With more triangles you can get a more accurate geometry, but the
file size will increase and rendering speed will slow down. A collada file of 25.000 triangles should render fine on
typical Studio. Obviously you should aim at an efficient use of the triangles and avoid having many triangles that
don’t contribute to the geometric accuracy.
Normals
When you triangulate your model, you should pay special attention to the normals. Too often, the modeling
software will generate inferior normals. Shiny surfaces are most sensitive to the quality of normals.
The normal data should be present in the Collada file. Without it, Studio is not able to apply any shading.
Scale
On a 3D rendering you don’t really see the absolute size of objects. Some interchange formats are also dubious
about units. This is probably why 3D data is often not properly dimensioned. However, if you want your shapes to
be compatible with other shapes, it is important that your geometry has the right absolute size.
Z-Fighting
As with most real-time rendering software, Studio uses a z-buffer to determine visual priorities. To avoid z-fighting,
do not use coinciding surfaces. If you need to model two layers (like a label on a bottle), make sure the top layer
(the label) has an offset. It is also safer if the layers have the same triangulation (except for the offset of course).
The best way to test your models against unwanted z-fighting is to proceed to step 2 and try them out in
Designer and Visualizer1. For a typical packaging object, an offset of 0.2 mm is more than sufficient.
1 If you don’t own Studio software yourself, you can still use the free Studio Visualizer viewer to open Collada files. Just
download the Studio Visualizer trial from www.esko.com.
Even though we’re not ready yet, you can already skip to step 2 and create a Collada file to test in Visualizer. Pay
attention to the rendering speed, z-fighting, etc. You won’t be able to add any print yet. For that you need a
Printable Area tag:
About texturing
Most of this chapter is about how to prepare the printable parts for texturing. In the collada file, these parts will
not be texture-mapped yet, only prepared for texturing. The actual texture will be added in Studio based on PDF
data. Of course you can also use texturing in not printable parts of your model. (To simulate a material for
example). Please be moderate in the resolution of that texture. The material definition will need to refer to an
image file. The referred image needs to be inside the Collada archive (see Step 4: Packing).
In the Collada file, the texture coordinates are scaled into a square of 0..1, however, the file also contains a
<printable_area> tag (see later) with the proper texture scaling factors: hsizemm by vsizemm.
When you load a Collada file and a PDF file, Studio will
take a rectangular portion of the PDF file as specified by
the printable area of the Collada file (hsizemm by
vsizemm).
Without the right texture coordinates the artwork will not be placed correctly on the model. It is possible that you
see the artwork distorted or you don’t see any artwork at all or that the printable parts shows a single color.
3D modeling software have many tools to make and edit the UV-mapping. This document assumes that you
know how to use these tools. 3D CAD software has little to no tools for UV mapping. Below are some more hints
that are specific to Studio:
Beware of seams
You will need to pay particular attention to this on seams of revolved surfaces. You may need to replicate a
column of vertices to avoid range overflow and still get the correct rendered result. Simply creating a cylinder and
exporting it to Collada will likely result in texture coordinates outside the 0..1 range, so please be aware of this
restriction.
This does not apply to non-printable areas. The texture wrapping modes (clamp, repeat etc) in the Collada file will
be honored for non-print-areas, so their texture coordinate range is unrestricted. This is very useful if you have a
small repeating texture to use on the non-print-areas for example.
With paper, board and most flexible foils, there is no shrink or stretch involved. So 1 mm on the model should
correspond to 1 mm in the PDF file. This can be particularly challenging at curved parts.
Mind the manufacturing process: With conical labels, the
Check for unwanted distortions: A texture of a UV mapping should describe the downward bending,
millimeter grid is a great test to spot unwanted UV because that is also what happens with a real label.
mapping artefacts. This one looks fine.
Material Definition
Photo-realism
Photorealistic render software can take minutes or hours to calculate a single image. So it is understandable that
a real-time rendering engine like Visualizer does not have the same range of effects at its disposal. Certain effects
like refraction, caustics or depth-of-field are currently not possible.
Some effects are possible if you hard-code them in the model: You can calculate a shadow (i.e. with ambient
occlusion) and add it to your model as a shadow. It is currently not possible to apply such a shadow to a
printable part. That texture will be ignored by the print modeling.
Step 2: Export to Collada
When the modeling is complete, you export to a Collada file. It is possible that you need the latest version of your
modeling software, or a 3rd party plug-in to be able to save as a Collada file (.dae):
XML Code
When you export to a collada file, this is how the material definitions can look. In a Collada file, the materials are
listed in the <library_material> tag. Each material uses one or more effects, which are listed in the
<library_effects> tag.
Transparency <library_materials>
3D tools are not always consistent when <material id="black-id" name="black">
<instance_effect url="#black-fx"/>
defining material properties. If you want a </material>
transparent material in Visualizer2, you need </library_materials>
<library_effects>
to use a <transparency> tag. For <effect id="black-fx" name="black">
transparent surfaces, Visualizer uses the <profile_COMMON>
<technique sid="common">
<diffuse> color as a transparency filter.
<phong>
White (1 1 1 1) means unfiltered <diffuse>
transparency. <color>0.02 0.02 0.02 1 </color>
</diffuse>
<specular>
Double-sided geometry <color>0.06 0.06 0.06 1 </color>
Also notice the MAX3D extension to flag a </specular>
<transparency>
triangle double-sided (marked in bold). By
<float>0.5</float>
default all geometry in a Collada file is single- </transparency>
sided. The double-sided flag is often needed <shininess>
<float>0.5</float>
for transparent surfaces, but it can also be </shininess>
interesting for modeling paper of foils. If you </phong>
</technique>
create Collada with an application other than </profile_COMMON>
3DS Max, you might need to insert this extra
<extra>
tag manually.
<technique profile="MAX3D">
<faceted>0</faceted>
Printable Part <double_sided>1</double_sided>
When inspecting the materials, try to identify <wireframe>0</wireframe>
<face_map>0</face_map>
the material that correspond to the printable </technique>
part. You’ll need to enter it’s material_id later </extra>
</effect>
(in this example that is black_id) </library_effects>
2 Studio Designer doesn’t support transparency. The material will show as opaque.
Step 3: The Printable Part
The whole point of making a Collada file for Visualizer is to apply print modeling. Artwork from a PDF file is to be
applied on the 3D model. Visualizer can only apply print to a Collada file if that file contains a printable part.
Material
As you can see the printable_area refers to a front material and a back material. This is how you select what parts
of the model are printable: Visualizer will apply print modeling to all the parts in the Collada file that use one of
these materials mentioned in this tag. These values are material id’s (without the quotes). So you might need to
have a look at the <library_material> tag to check what material id to use (in this example the material is
material_id.
<library_materials>
...
<material id="material_id" name="material_name">
<instance_effect url="#effect_id"/>
</material>
...
</library_materials>
hsizemm, vsizemm
To make sure the PDF data is mapped correctly on the 3D model, the printable area also defines a flat
representation (<flatrep>). Currently we only support a rectangle. The rectangle has a physical size (hsizemm
and vsizemm, values are in millimeters). In Visualizer, this rectangle will be used to clip the artwork before it
applied to the shape. You can choose the size of this rectangle. It should be large enough to include all the print,
but not unnecessarily large (that would reduce the resolution). For more information on this, see the section below
on UV mapping.
Single sided
If you don’t care about backside of your printed substrate (because it is only visible from the front), then you set
the backmaterial to an un-existing id. You should also not set the double-sided flag on the front material so that
back side of the area will then never be rendered.
You can do this in the Collada file, you make sure each printable part uses a different material and include more
than one printable_area tag in the XML code. However, you should be aware that not all Studio components will
be able to handle this. In the latest version of Studio, there is limited support for Collada files with multiple
printable parts:
In Studio Designer 10, you can place a Collada file with multiple printable parts, but you can only apply artwork to
one of the parts (you can choose which one). The earlier release (Studio 7.4) does not support it and will behave
unstable.
In Studio Visualizer 10, you can also choose which part to apply artwork on. Furthermore, there is a possibility to
apply different artwork to each part (this workaround involves creating intermediate collada files. See the Visualizer
manual for more details on this workflow). The earlier release (Visualizer 7.6) does not support it and will behave
unstable.
3 You could also consider the two labels as a single printable part: You would layout the UV mapping of both labels on a
single rectangular area.
Artwork Template
In the printable_area tag, there is subtag flatrep that describes the
flat representation. The only flat representation that is supported is a
rectangle. So the Studio operator will see a rectangle that needs to be
aligned with the artwork. To assist an artwork designer in preparing
artwork for this shape more easily, we strongly advice that you also
prepare an artwork template in Adobe Illustrator. That way, the
Visualizer user can be sure that his artwork will fit on your shape. You
can put the template in a non-printable layer.
Often there will be a template available (a.k.a. the “die”, “key lines”, “CAD file”, “technical file”). In that case you
should make sure that your UV mapping is compatible with that template so that Visualizer can combine your
shape with the production-ready PDF artwork.
Step 4: Packing
Collada Archive
There are two types of Collada files. The ‘regular’ Collada files have the extension .dae. They are based on XML,
so you can inspect and edit them in your favorite text or XML editor. Then there are also Collada Archives. They
have the the extension .zae. A Collada archive is nothing more than a ZIP archive with a regular Collada file inside
(and some more files). You can use your favorite ZIP utility to unpack a .zae file, or pack files into a .zae. Here’s
how the exact content of a .zae archive is supposed to be:
A Manifest File
The manifest file is called manifest.xml. It is a very small XML file just to point out which of the included Collada
files is the main one. It should always be there, even if there is only one Collada file.
<?xml version="1.0"?>
<dae_root>can330ml.dae</dae_root>
The manifest file has to be at the top level of the ZIP archive, not in a folder.
Image Files
A Collada file also contains material definitions. When a material requires a texture, it will refer to one or more
separate image files. Those image files should also be in the archive. Studio supports the following file formats:
• All-in-one: A regular Collada file may refer to other files and require those files to be present (such as image
files for the textures or other Collada files for parts). A Collada archive contains all its data within a single file.
This makes it easier and fool-proof to manage and share 3D assets.
• File-size: Because of the ZIP-compression, a Collada archive file is typically four times smaller than the
equivalent Collada file.
1. First you collect the collada file(s) and the required texture image files into a folder.
2. Then you make a manifest file (see above), you can do this in a simple text or XML editor. You put the
manifest file in the same folder.
3. Then you pack the content of the folder in a zip file. You have to add the files directly to the zip, and not
pack the containing folder. That would introduce an extra folder level in the zip file.