vJSONToOBJ
Convert point, edge, UV and UV edge arrays into Wavefront OBJ ASCII text, with an optional 4x4 matrix applied to the points.

vJSONToOBJ takes arrays on its Points, Edges, UVs and UV Edges sockets and outputs OBJ text. A matrix on the Matrix socket transforms the points before they are written.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Edges | DATATYPE | — | Array of face index lists. Each entry becomes one f line. |
| Points | DATATYPE | — | Array of points. Each entry becomes one v line. |
| UVs | DATATYPE | — | Array of texture coordinates. Each entry becomes one vt line. |
| UV Edges | DATATYPE | — | Array of UV index lists, matched to the entries of the Edges array. |
| Matrix | Text | — | A 4x4 matrix as JSON text that is applied to the points. Without it the identity matrix is used. |
+1 more parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Show Input | Integer | 1.0 | Shows or hides the five input sockets. Default on. |
Read the full description
The text starts with a comment line and the line g default. Every entry of the Points array becomes a v line with X, Y and Z written to four decimal places. Every entry of the UVs array becomes a vt line. Entries with two values get a third value of 0, and entries with one value get two values of 0 in the UVs list.
Each entry of the Edges array becomes one f line. Its numbers are the vertex indices of the face and are written as they are, without any change. If the UV Edges array has an entry at the same position, each vertex is written as vertex/uv/. Otherwise it is written as vertex//.
Points are multiplied by the matrix from the Matrix socket before writing, in the row-vector form that puts the translation in the last row. Without a connected matrix the identity matrix is used, so the points are unchanged. A point entry that does not have two or three values is treated as the origin before the transform.
The output is plain text, not an array. Show Input is on by default and shows the five sockets. The node does not write a file. Connect the text to a node that saves text, or copy it from the viewer.
Example Connections
- Write a generated grid as OBJ text
- Transform the points with a matrix
vJSONPointsOnGrid.Output -> vJSONToOBJ.ArrayPoints
vJSONPointsOnGrid.Output -> vJSONToOBJ.ArrayPoints
vMatrixCreateTRS.Output -> vJSONToOBJ.Matrix