postprocess.py 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. # <hr>Calculates the tangents and bitangents for the imported meshes.
  2. #
  3. # Does nothing if a mesh does not have normals. You might want this post
  4. # processing step to be executed if you plan to use tangent space calculations
  5. # such as normal mapping applied to the meshes. There's a config setting,
  6. # <tt>#AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE<tt>, which allows you to specify
  7. # a maximum smoothing angle for the algorithm. However, usually you'll
  8. # want to leave it at the default value.
  9. #
  10. aiProcess_CalcTangentSpace = 0x1
  11. ## <hr>Identifies and joins identical vertex data sets within all
  12. # imported meshes.
  13. #
  14. # After this step is run, each mesh contains unique vertices,
  15. # so a vertex may be used by multiple faces. You usually want
  16. # to use this post processing step. If your application deals with
  17. # indexed geometry, this step is compulsory or you'll just waste rendering
  18. # time. <b>If this flag is not specified<b>, no vertices are referenced by
  19. # more than one face and <b>no index buffer is required<b> for rendering.
  20. #
  21. aiProcess_JoinIdenticalVertices = 0x2
  22. ## <hr>Converts all the imported data to a left-handed coordinate space.
  23. #
  24. # By default the data is returned in a right-handed coordinate space (which
  25. # OpenGL prefers). In this space, +X points to the right,
  26. # +Z points towards the viewer, and +Y points upwards. In the DirectX
  27. # coordinate space +X points to the right, +Y points upwards, and +Z points
  28. # away from the viewer.
  29. #
  30. # You'll probably want to consider this flag if you use Direct3D for
  31. # rendering. The #aiProcess_ConvertToLeftHanded flag supersedes this
  32. # setting and bundles all conversions typically required for D3D-based
  33. # applications.
  34. #
  35. aiProcess_MakeLeftHanded = 0x4
  36. ## <hr>Triangulates all faces of all meshes.
  37. #
  38. # By default the imported mesh data might contain faces with more than 3
  39. # indices. For rendering you'll usually want all faces to be triangles.
  40. # This post processing stepaiProcess_ForceGenNormals
  41. ## <hr>Removes some parts of the data structure (animations, materials,
  42. # light sources, cameras, textures, vertex components).
  43. #
  44. # The components to be removed are specified in a separate
  45. # configuration option, <tt>#AI_CONFIG_PP_RVC_FLAGS<tt>. This is quite useful
  46. # if you don't need all parts of the output structure. Vertex colors
  47. # are rarely used today for example... Calling this step to remove unneeded
  48. # data from the pipeline as early as possible results in increased
  49. # performance and a more optimized output data structure.
  50. # This step is also useful if you want to force Assimp to recompute
  51. # normals or tangents. The corresponding steps don't recompute them if
  52. # they're already there (loaded from the source asset). By using this
  53. # step you can make sure they are NOT there.
  54. #
  55. # This flag is a poor one, mainly because its purpose is usually
  56. # misunderstood. Consider the following case: a 3D model has been exported
  57. # from a CAD app, and it has per-face vertex colors. Vertex positions can't be
  58. # shared, thus the #aiProcess_JoinIdenticalVertices step fails to
  59. # optimize the data because of these nasty little vertex colors.
  60. # Most apps don't even process them, so it's all for nothing. By using
  61. # this step, unneeded components are excluded as early as possible
  62. # thus opening more room for internal optimizations.
  63. #
  64. aiProcess_RemoveComponent = 0x10
  65. ## <hr>Generates normals for all faces of all meshes.
  66. #
  67. # This is ignored if normals are already there at the time this flag
  68. # is evaluated. Model importers try to load them from the source file, so
  69. # they're usually already there. Face normals are shared between all points
  70. # of a single face, so a single point can have multiple normals, which
  71. # forces the library to duplicate vertices in some cases.
  72. # #aiProcess_JoinIdenticalVertices is #senseless# then.
  73. #
  74. # This flag may not be specified together with #aiProcess_GenSmoothNormals.
  75. #
  76. aiProcess_GenNormals = 0x20
  77. ## <hr>Generates smooth normals for all vertices in the mesh.
  78. #
  79. # This is ignored if normals are already there at the time this flag
  80. # is evaluated. Model importers try to load them from the source file, so
  81. # they're usually already there.
  82. #
  83. # This flag may not be specified together with
  84. # #aiProcess_GenNormals. There's a configuration option,
  85. # <tt>#AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE<tt> which allows you to specify
  86. # an angle maximum for the normal smoothing algorithm. Normals exceeding
  87. # this limit are not smoothed, resulting in a 'hard' seam between two faces.
  88. # Using a decent angle here (e.g. 80 degrees) results in very good visual
  89. # appearance.
  90. #
  91. aiProcess_GenSmoothNormals = 0x40
  92. ## <hr>Splits large meshes into smaller sub-meshes.
  93. #
  94. # This is quite useful for real-time rendering, where the number of triangles
  95. # which can be maximally processed in a single draw-call is limited
  96. # by the video driverhardware. The maximum vertex buffer is usually limited
  97. # too. Both requirements can be met with this step: you may specify both a
  98. # triangle and vertex limit for a single mesh.
  99. #
  100. # The split limits can (and should!) be set through the
  101. # <tt>#AI_CONFIG_PP_SLM_VERTEX_LIMIT<tt> and <tt>#AI_CONFIG_PP_SLM_TRIANGLE_LIMIT<tt>
  102. # settings. The default values are <tt>#AI_SLM_DEFAULT_MAX_VERTICES<tt> and
  103. # <tt>#AI_SLM_DEFAULT_MAX_TRIANGLES<tt>.
  104. #
  105. # Note that splitting is generally a time-consuming task, but only if there's
  106. # something to split. The use of this step is recommended for most users.
  107. #
  108. aiProcess_SplitLargeMeshes = 0x80
  109. ## <hr>Removes the node graph and pre-transforms all vertices with
  110. # the local transformation matrices of their nodes.
  111. #
  112. # The output scene still contains nodes, however there is only a
  113. # root node with children, each one referencing only one mesh,
  114. # and each mesh referencing one material. For rendering, you can
  115. # simply render all meshes in order - you don't need to pay
  116. # attention to local transformations and the node hierarchy.
  117. # Animations are removed during this step.
  118. # This step is intended for applications without a scenegraph.
  119. # The step CAN cause some problems: if e.g. a mesh of the asset
  120. # contains normals and another, using the same material index, does not,
  121. # they will be brought together, but the first meshes's part of
  122. # the normal list is zeroed. However, these artifacts are rare.
  123. # @note The <tt>#AI_CONFIG_PP_PTV_NORMALIZE<tt> configuration property
  124. # can be set to normalize the scene's spatial dimension to the -1...1
  125. # range.
  126. #
  127. aiProcess_PreTransformVertices = 0x100
  128. ## <hr>Limits the number of bones simultaneously affecting a single vertex
  129. # to a maximum value.
  130. #
  131. # If any vertex is affected by more than the maximum number of bones, the least
  132. # important vertex weights are removed and the remaining vertex weights are
  133. # renormalized so that the weights still sum up to 1.
  134. # The default bone weight limit is 4 (defined as <tt>#AI_LMW_MAX_WEIGHTS<tt> in
  135. # config.h), but you can use the <tt>#AI_CONFIG_PP_LBW_MAX_WEIGHTS<tt> setting to
  136. # supply your own limit to the post processing step.
  137. #
  138. # If you intend to perform the skinning in hardware, this post processing
  139. # step might be of interest to you.
  140. #
  141. aiProcess_LimitBoneWeights = 0x200
  142. ## <hr>Validates the imported scene data structure.
  143. # This makes sure that all indices are valid, all animations and
  144. # bones are linked correctly, all material references are correct .. etc.
  145. #
  146. # It is recommended that you capture Assimp's log output if you use this flag,
  147. # so you can easily find out what's wrong if a file fails the
  148. # validation. The validator is quite strict and will find #all#
  149. # inconsistencies in the data structure... It is recommended that plugin
  150. # developers use it to debug their loaders. There are two types of
  151. # validation failures:
  152. # <ul>
  153. # <li>Error: There's something wrong with the imported data. Further
  154. # postprocessing is not possible and the data is not usable at all.
  155. # The import fails. #Importer::GetErrorString() or #aiGetErrorString()
  156. # carry the error message around.<li>
  157. # <li>Warning: There are some minor issues (e.g. 1000000 animation
  158. # keyframes with the same time), but further postprocessing and use
  159. # of the data structure is still safe. Warning details are written
  160. # to the log file, <tt>#AI_SCENE_FLAGS_VALIDATION_WARNING<tt> is set
  161. # in #aiScene::mFlags<li>
  162. # <ul>
  163. #
  164. # This post-processing step is not time-consuming. Its use is not
  165. # compulsory, but recommended.
  166. #
  167. aiProcess_ValidateDataStructure = 0x400
  168. ## <hr>Reorders triangles for better vertex cache locality.
  169. #
  170. # The step tries to improve the ACMR (average post-transform vertex cache
  171. # miss ratio) for all meshes. The implementation runs in O(n) and is
  172. # roughly based on the 'tipsify' algorithm (see <a href="
  173. # http:www.cs.princeton.edugfxpubsSander_2007_%3ETRtipsy.pdf">this
  174. # paper<a>).
  175. #
  176. # If you intend to render huge models in hardware, this step might
  177. # be of interest to you. The <tt>#AI_CONFIG_PP_ICL_PTCACHE_SIZE<tt>config
  178. # setting can be used to fine-tune the cache optimization.
  179. #
  180. aiProcess_ImproveCacheLocality = 0x800
  181. ## <hr>Searches for redundantunreferenced materials and removes them.
  182. #
  183. # This is especially useful in combination with the
  184. # #aiProcess_PretransformVertices and #aiProcess_OptimizeMeshes flags.
  185. # Both join small meshes with equal characteristics, but they can't do
  186. # their work if two meshes have different materials. Because several
  187. # material settings are lost during Assimp's import filters,
  188. # (and because many exporters don't check for redundant materials), huge
  189. # models often have materials which are are defined several times with
  190. # exactly the same settings.
  191. #
  192. # Several material settings not contributing to the final appearance of
  193. # a surface are ignored in all comparisons (e.g. the material name).
  194. # So, if you're passing additional information through the
  195. # content pipeline (probably using #magic# material names), don't
  196. # specify this flag. Alternatively take a look at the
  197. # <tt>#AI_CONFIG_PP_RRM_EXCLUDE_LIST<tt> setting.
  198. #
  199. aiProcess_RemoveRedundantMaterials = 0x1000
  200. ## <hr>This step tries to determine which meshes have normal vectors
  201. # that are facing inwards and inverts them.
  202. #
  203. # The algorithm is simple but effective:
  204. # the bounding box of all vertices + their normals is compared against
  205. # the volume of the bounding box of all vertices without their normals.
  206. # This works well for most objects, problems might occur with planar
  207. # surfaces. However, the step tries to filter such cases.
  208. # The step inverts all in-facing normals. Generally it is recommended
  209. # to enable this step, although the result is not always correct.
  210. #
  211. aiProcess_FixInfacingNormals = 0x2000
  212. ## This step generically populates aiBone->mArmature and aiBone->mNode generically
  213. # The point of these is it saves you later having to calculate these elements
  214. # This is useful when handling rest information or skin information
  215. # If you have multiple armatures on your models we strongly recommend enabling this
  216. # Instead of writing your own multi-root, multi-armature lookups we have done the
  217. # hard work for you :)
  218. aiProcess_PopulateArmatureData = 0x4000
  219. ## <hr>This step splits meshes with more than one primitive type in
  220. # homogeneous sub-meshes.
  221. #
  222. # The step is executed after the triangulation step. After the step
  223. # returns, just one bit is set in aiMesh::mPrimitiveTypes. This is
  224. # especially useful for real-time rendering where point and line
  225. # primitives are often ignored or rendered separately.
  226. # You can use the <tt>#AI_CONFIG_PP_SBP_REMOVE<tt> option to specify which
  227. # primitive types you need. This can be used to easily exclude
  228. # lines and points, which are rarely used, from the import.
  229. #
  230. aiProcess_SortByPType = 0x8000
  231. ## <hr>This step searches all meshes for degenerate primitives and
  232. # converts them to proper lines or points.
  233. #
  234. # A face is 'degenerate' if one or more of its points are identical.
  235. # To have the degenerate stuff not only detected and collapsed but
  236. # removed, try one of the following procedures:
  237. # <br><b>1.<b> (if you support lines and points for rendering but don't
  238. # want the degenerates)<br>
  239. # <ul>
  240. # <li>Specify the #aiProcess_FindDegenerates flag.
  241. # <li>
  242. # <li>Set the <tt>AI_CONFIG_PP_FD_REMOVE<tt> option to 1. This will
  243. # cause the step to remove degenerate triangles from the import
  244. # as soon as they're detected. They won't pass any further
  245. # pipeline steps.
  246. # <li>
  247. # <ul>
  248. # <br><b>2.<b>(if you don't support lines and points at all)<br>
  249. # <ul>
  250. # <li>Specify the #aiProcess_FindDegenerates flag.
  251. # <li>
  252. # <li>Specify the #aiProcess_SortByPType flag. This moves line and
  253. # point primitives to separate meshes.
  254. # <li>
  255. # <li>Set the <tt>AI_CONFIG_PP_SBP_REMOVE<tt> option to
  256. # @code aiPrimitiveType_POINT | aiPrimitiveType_LINE
  257. # @endcode to cause SortByPType to reject point
  258. # and line meshes from the scene.
  259. # <li>
  260. # <ul>
  261. # @note Degenerate polygons are not necessarily evil and that's why
  262. # they're not removed by default. There are several file formats which
  263. # don't support lines or points, and some exporters bypass the
  264. # format specification and write them as degenerate triangles instead.
  265. #
  266. aiProcess_FindDegenerates = 0x10000
  267. ## <hr>This step searches all meshes for invalid data, such as zeroed
  268. # normal vectors or invalid UV coords and removesfixes them. This is
  269. # intended to get rid of some common exporter errors.
  270. #
  271. # This is especially useful for normals. If they are invalid, and
  272. # the step recognizes this, they will be removed and can later
  273. # be recomputed, i.e. by the #aiProcess_GenSmoothNormals flag.<br>
  274. # The step will also remove meshes that are infinitely small and reduce
  275. # animation tracks consisting of hundreds if redundant keys to a single
  276. # key. The <tt>AI_CONFIG_PP_FID_ANIM_ACCURACY<tt> config property decides
  277. # the accuracy of the check for duplicate animation tracks.
  278. #
  279. aiProcess_FindInvalidData = 0x20000
  280. ## <hr>This step converts non-UV mappings (such as spherical or
  281. # cylindrical mapping) to proper texture coordinate channels.
  282. #
  283. # Most applications will support UV mapping only, so you will
  284. # probably want to specify this step in every case. Note that Assimp is not
  285. # always able to match the original mapping implementation of the
  286. # 3D app which produced a model perfectly. It's always better to let the
  287. # modelling app compute the UV channels - 3ds max, Maya, Blender,
  288. # LightWave, and Modo do this for example.
  289. #
  290. # @note If this step is not requested, you'll need to process the
  291. # <tt>#AI_MATKEY_MAPPING<tt> material property in order to display all assets
  292. # properly.
  293. #
  294. aiProcess_GenUVCoords = 0x40000
  295. ## <hr>This step applies per-texture UV transformations and bakes
  296. # them into stand-alone vtexture coordinate channels.
  297. #
  298. # UV transformations are specified per-texture - see the
  299. # <tt>#AI_MATKEY_UVTRANSFORM<tt> material key for more information.
  300. # This step processes all textures with
  301. # transformed input UV coordinates and generates a new (pre-transformed) UV channel
  302. # which replaces the old channel. Most applications won't support UV
  303. # transformations, so you will probably want to specify this step.
  304. #
  305. # @note UV transformations are usually implemented in real-time apps by
  306. # transforming texture coordinates at vertex shader stage with a 3x3
  307. # (homogenous) transformation matrix.
  308. #
  309. aiProcess_TransformUVCoords = 0x80000
  310. ## <hr>This step searches for duplicate meshes and replaces them
  311. # with references to the first mesh.
  312. #
  313. # This step takes a while, so don't use it if speed is a concern.
  314. # Its main purpose is to workaround the fact that many export
  315. # file formats don't support instanced meshes, so exporters need to
  316. # duplicate meshes. This step removes the duplicates again. Please
  317. # note that Assimp does not currently support per-node material
  318. # assignment to meshes, which means that identical meshes with
  319. # different materials are currently #not# joined, although this is
  320. # planned for future versions.
  321. #
  322. aiProcess_FindInstances = 0x100000
  323. ## <hr>A postprocessing step to reduce the number of meshes.
  324. #
  325. # This will, in fact, reduce the number of draw calls.
  326. #
  327. # This is a very effective optimization and is recommended to be used
  328. # together with #aiProcess_OptimizeGraph, if possible. The flag is fully
  329. # compatible with both #aiProcess_SplitLargeMeshes and #aiProcess_SortByPType.
  330. #
  331. aiProcess_OptimizeMeshes = 0x200000
  332. ## <hr>A postprocessing step to optimize the scene hierarchy.
  333. #
  334. # Nodes without animations, bones, lights or cameras assigned are
  335. # collapsed and joined.
  336. #
  337. # Node names can be lost during this step. If you use special 'tag nodes'
  338. # to pass additional information through your content pipeline, use the
  339. # <tt>#AI_CONFIG_PP_OG_EXCLUDE_LIST<tt> setting to specify a list of node
  340. # names you want to be kept. Nodes matching one of the names in this list won't
  341. # be touched or modified.
  342. #
  343. # Use this flag with caution. Most simple files will be collapsed to a
  344. # single node, so complex hierarchies are usually completely lost. This is not
  345. # useful for editor environments, but probably a very effective
  346. # optimization if you just want to get the model data, convert it to your
  347. # own format, and render it as fast as possible.
  348. #
  349. # This flag is designed to be used with #aiProcess_OptimizeMeshes for best
  350. # results.
  351. #
  352. # @note 'Crappy' scenes with thousands of extremely small meshes packed
  353. # in deeply nested nodes exist for almost all file formats.
  354. # #aiProcess_OptimizeMeshes in combination with #aiProcess_OptimizeGraph
  355. # usually fixes them all and makes them renderable.
  356. #
  357. aiProcess_OptimizeGraph = 0x400000
  358. ## <hr>This step flips all UV coordinates along the y-axis and adjusts
  359. # material settings and bitangents accordingly.
  360. #
  361. # <b>Output UV coordinate system:<b>
  362. # @code
  363. # 0x|0y ---------- 1x|0y
  364. # | |
  365. # | |
  366. # | |
  367. # 0x|1y ---------- 1x|1y
  368. # @endcode
  369. #
  370. # You'll probably want to consider this flag if you use Direct3D for
  371. # rendering. The #aiProcess_ConvertToLeftHanded flag supersedes this
  372. # setting and bundles all conversions typically required for D3D-based
  373. # applications.
  374. #
  375. aiProcess_FlipUVs = 0x800000
  376. ## <hr>This step adjusts the output face winding order to be CW.
  377. #
  378. # The default face winding order is counter clockwise (CCW).
  379. #
  380. # <b>Output face order:<b>
  381. # @code
  382. # x2
  383. #
  384. # x0
  385. # x1
  386. # @endcode
  387. #
  388. aiProcess_FlipWindingOrder = 0x1000000
  389. ## <hr>This step splits meshes with many bones into sub-meshes so that each
  390. # su-bmesh has fewer or as many bones as a given limit.
  391. #
  392. aiProcess_SplitByBoneCount = 0x2000000
  393. ## <hr>This step removes bones losslessly or according to some threshold.
  394. #
  395. # In some cases (i.e. formats that require it) exporters are forced to
  396. # assign dummy bone weights to otherwise static meshes assigned to
  397. # animated meshes. Full, weight-based skinning is expensive while
  398. # animating nodes is extremely cheap, so this step is offered to clean up
  399. # the data in that regard.
  400. #
  401. # Use <tt>#AI_CONFIG_PP_DB_THRESHOLD<tt> to control this.
  402. # Use <tt>#AI_CONFIG_PP_DB_ALL_OR_NONE<tt> if you want bones removed if and
  403. # only if all bones within the scene qualify for removal.
  404. #
  405. aiProcess_Debone = 0x4000000
  406. ## <hr>This step will perform a global scale of the model.
  407. #
  408. # Some importers are providing a mechanism to define a scaling unit for the
  409. # model. This post processing step can be used to do so. You need to get the
  410. # global scaling from your importer settings like in FBX. Use the flag
  411. # AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table to configure this.
  412. #
  413. # Use <tt>#AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY</tt> to setup the global scaling factor.
  414. #
  415. aiProcess_GlobalScale = 0x8000000
  416. ## <hr>A postprocessing step to embed of textures.
  417. #
  418. # This will remove external data dependencies for textures.
  419. # If a texture's file does not exist at the specified path
  420. # (due, for instance, to an absolute path generated on another system),
  421. # it will check if a file with the same name exists at the root folder
  422. # of the imported model. And if so, it uses that.
  423. #
  424. aiProcess_EmbedTextures = 0x10000000
  425. ##
  426. #
  427. aiProcess_ForceGenNormals = 0x20000000
  428. ## <hr>Drops normals for all faces of all meshes.
  429. #
  430. # This is ignored if no normals are present.
  431. # Face normals are shared between all points of a single face,
  432. # so a single point can have multiple normals, which
  433. # forces the library to duplicate vertices in some cases.
  434. # #aiProcess_JoinIdenticalVertices is *senseless* then.
  435. # This process gives sense back to aiProcess_JoinIdenticalVertices
  436. #
  437. aiProcess_DropNormals = 0x40000000,
  438. ##
  439. #
  440. aiProcess_GenBoundingBoxes = 0x80000000
  441. aiProcess_GenEntityMeshes = 0x100000
  442. aiProcess_OptimizeAnimations = 0x200000
  443. aiProcess_FixTexturePaths = 0x200000
  444. aiProcess_EmbedTextures = 0x10000000,
  445. ## @def aiProcess_ConvertToLeftHanded
  446. # @brief Shortcut flag for Direct3D-based applications.
  447. #
  448. # Supersedes the #aiProcess_MakeLeftHanded and #aiProcess_FlipUVs and
  449. # #aiProcess_FlipWindingOrder flags.
  450. # The output data matches Direct3D's conventions: left-handed geometry, upper-left
  451. # origin for UV coordinates and finally clockwise face order, suitable for CCW culling.
  452. #
  453. # @deprecated
  454. #
  455. aiProcess_ConvertToLeftHanded = ( \
  456. aiProcess_MakeLeftHanded | \
  457. aiProcess_FlipUVs | \
  458. aiProcess_FlipWindingOrder | \
  459. 0 )
  460. ## @def aiProcessPreset_TargetRealtimeUse_Fast
  461. # @brief Default postprocess configuration optimizing the data for real-time rendering.
  462. #
  463. # Applications would want to use this preset to load models on end-user PCs,
  464. # maybe for direct use in game.
  465. #
  466. # If you're using DirectX, don't forget to combine this value with
  467. # the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
  468. # in your application apply the #aiProcess_TransformUVCoords step, too.
  469. # @note Please take the time to read the docs for the steps enabled by this preset.
  470. # Some of them offer further configurable properties, while some of them might not be of
  471. # use for you so it might be better to not specify them.
  472. #
  473. aiProcessPreset_TargetRealtime_Fast = ( \
  474. aiProcess_CalcTangentSpace | \
  475. aiProcess_GenNormals | \
  476. aiProcess_JoinIdenticalVertices | \
  477. aiProcess_Triangulate | \
  478. aiProcess_GenUVCoords | \
  479. aiProcess_SortByPType | \
  480. 0 )
  481. ## @def aiProcessPreset_TargetRealtime_Quality
  482. # @brief Default postprocess configuration optimizing the data for real-time rendering.
  483. #
  484. # Unlike #aiProcessPreset_TargetRealtime_Fast, this configuration
  485. # performs some extra optimizations to improve rendering speed and
  486. # to minimize memory usage. It could be a good choice for a level editor
  487. # environment where import speed is not so important.
  488. #
  489. # If you're using DirectX, don't forget to combine this value with
  490. # the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
  491. # in your application apply the #aiProcess_TransformUVCoords step, too.
  492. # @note Please take the time to read the docs for the steps enabled by this preset.
  493. # Some of them offer further configurable properties, while some of them might not be
  494. # of use for you so it might be better to not specify them.
  495. #
  496. aiProcessPreset_TargetRealtime_Quality = ( \
  497. aiProcess_CalcTangentSpace | \
  498. aiProcess_GenSmoothNormals | \
  499. aiProcess_JoinIdenticalVertices | \
  500. aiProcess_ImproveCacheLocality | \
  501. aiProcess_LimitBoneWeights | \
  502. aiProcess_RemoveRedundantMaterials | \
  503. aiProcess_SplitLargeMeshes | \
  504. aiProcess_Triangulate | \
  505. aiProcess_GenUVCoords | \
  506. aiProcess_SortByPType | \
  507. aiProcess_FindDegenerates | \
  508. aiProcess_FindInvalidData | \
  509. 0 )
  510. ## @def aiProcessPreset_TargetRealtime_MaxQuality
  511. # @brief Default postprocess configuration optimizing the data for real-time rendering.
  512. #
  513. # This preset enables almost every optimization step to achieve perfectly
  514. # optimized data. It's your choice for level editor environments where import speed
  515. # is not important.
  516. #
  517. # If you're using DirectX, don't forget to combine this value with
  518. # the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
  519. # in your application, apply the #aiProcess_TransformUVCoords step, too.
  520. # @note Please take the time to read the docs for the steps enabled by this preset.
  521. # Some of them offer further configurable properties, while some of them might not be
  522. # of use for you so it might be better to not specify them.
  523. #
  524. aiProcessPreset_TargetRealtime_MaxQuality = ( \
  525. aiProcessPreset_TargetRealtime_Quality | \
  526. aiProcess_FindInstances | \
  527. aiProcess_ValidateDataStructure | \
  528. aiProcess_OptimizeMeshes | \
  529. 0 )