meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
vertexpacker [2022/06/15 14:23] kingvertexpacker [2023/04/03 18:40] (current) steph.jorgensen
Line 1: Line 1:
-====== Vertex Packing ======+====== Vertex packing ======
  
 In export formats that support it (currently only STSDK, used with the SpeedTree SDK), vertex packing lets you have complete control over the data stored in each vertex in the exported file, which allows the file data to be loaded directly into render buffers at runtime.  In export formats that support it (currently only STSDK, used with the SpeedTree SDK), vertex packing lets you have complete control over the data stored in each vertex in the exported file, which allows the file data to be loaded directly into render buffers at runtime. 
Line 58: Line 58:
 </code> </code>
  
-===== Packing Script =====+===== Packing script =====
  
 During vertex packing, the packing script specified in the description XML file is run for each vertex. This script is written in Lua. While this documentation cannot cover every aspect of the Lua language, you can find additional info at [[http://www.lua.org/|www.lua.org]] and [[https://www.tutorialspoint.com/lua/index.htm|Lua Tutorials]]. During vertex packing, the packing script specified in the description XML file is run for each vertex. This script is written in Lua. While this documentation cannot cover every aspect of the Lua language, you can find additional info at [[http://www.lua.org/|www.lua.org]] and [[https://www.tutorialspoint.com/lua/index.htm|Lua Tutorials]].
Line 96: Line 96:
 |  print|<string> |output information to the SpeedTree Modeler Console. This is usually used for debugging, but since it is run for every vertex, be careful printing too much. | |  print|<string> |output information to the SpeedTree Modeler Console. This is usually used for debugging, but since it is run for every vertex, be careful printing too much. |
  
-=== Saving Vertex Data ===+=== Saving vertex data ===
  
 To place any of the input vertex data into the final vertex attributes in the export file, you use the set_attribute function or the set_attribute_integer function (when strict adherence to integers is wanted). To place any of the input vertex data into the final vertex attributes in the export file, you use the set_attribute function or the set_attribute_integer function (when strict adherence to integers is wanted).
Line 103: Line 103:
  
  
-=== Batching Control ===+=== Batching control ===
  
 The geometry in the tree is as batched as much as possible, just like in other file formats. Without any further input, the tree will be batched into as few draw calls as it can, depending on the number of separate materials occur after atlassing.  The geometry in the tree is as batched as much as possible, just like in other file formats. Without any further input, the tree will be batched into as few draw calls as it can, depending on the number of separate materials occur after atlassing.