
Simplygon API 4.4 User's Guide
January 23, 2013
1

LEGAL NOTICE
This publication, or parts thereof, may not be reproduced in any form, by any method, for any
purpose.
Donya reserves the right to revise and improve its products as it sees t. This Publication de-
scribes the state of this product at the time of its publication, and may not reect the product at
all times in the future.
DONYA LABS PATENTS AND TRADEMARKS
The following are registered trademarks of Donya Labs in Sweden and other countries: Donya,
Simplygon (trade name/logo), donyalabs.com, Simplygon.com The Simplygon technology is covered
by patents and patents pending.
THIRD-PARTY TRADEMARKS
All other brand names, product names, or trademarks belong to their respective holders.
2

Contents
1 Introduction 6
1.1 Simplygon Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2 What's new in Simplygon? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.1 Version 4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.2 Version 4.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.3 Version 4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.4 Version 4.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Known Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Using the API 8
2.1 Header and library les . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Initializing and deinitializing the API . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4 The IObject interface and RTTI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.5 Smart pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.6 Error handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.7 Event handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.8 Deep Copy and New Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 Data classes 15
3.1 Array types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2 Object collection types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3 Field data objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4 Working with geometry data 21
4.1 Packed geometry data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2 Geometry channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2.1 Vertex-lock channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.2 Working with vertex weights . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2.3 User channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5 Image formats 27
6 ImageData 28
7 Material data 31
7.1 IMaterialTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.2 IMaterial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.3 Material casting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8 Working with transforms 34
8.1 IMatrix4x4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.2 ITransform3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3

9 Working with skinning data 35
9.1 Smooth skinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
9.2 Bones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
10 Working with scene data 37
10.1 IScene . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
10.2 ISceneNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
10.3 ISceneMesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
10.4 ISceneBone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
10.5 Material Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
10.6 Bone Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
11 Processing objects 40
11.1 Settings objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
11.2 Event handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
11.3 Reduction vs Remeshing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
11.4 Reduction processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
11.4.1 Repair settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
11.4.2 Reduction settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
11.4.3 Normal calculation settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
11.4.4 Mapping image settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
11.4.5 Bone reduction settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
11.5 Remeshing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
11.5.1 Remeshing settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
11.5.2 Mapping image settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
12 Material casting 54
12.1 IMaterialCaster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
12.2 IColorCaster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
12.3 INormalCaster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
13 Importers/Exporters 57
13.1 Wavefront (.obj) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
13.1.1 Wavefront Importing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
13.1.2 Wavefront Exporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
14 Examples 59
4

List of Figures
1 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2 Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3 Field data objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4 Vertices and corners shown on cube. . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5 Vertices, corners and triangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6 Skinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7 Simplygon Scenegraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8 Silhouette preservation and multiple UVs using the reduction processor . . . . . . . 42
9 Topological reduction using the remeshing processor . . . . . . . . . . . . . . . . . . 43
10 Simplygon Reduction Processor Overview . . . . . . . . . . . . . . . . . . . . . . . . 44
11 T-Junction processing before and after . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5
评论0