CSG to Wavefront Object
Two things are now mostly done. CSG brushes can be exported to Wavefront Object files. There’s no material support, normals, or UVs at this time. I also don’t currently export it to anywhere other than the fixed location of D:\csg.obj. For testing, this is okay but I’d prefer to be able to export each section as its own group in the tree for better organisation when dealing with it in Maya. Also, handling the workflow of refreshing the CSG back to Maya may be a challenge.
The other thing that’s mostly done is the operations. Union, difference, and intersection work. Sort of. Some faces are, well, facing the wrong way. I also haven’t tried it on more complex trees. It may be absolutely broken with another brush added to the tree. In the meantime, enjoy the pictures of what it looks like in the editor and when imported into Maya.
This is quite an exciting development, as it means I’m not a complete moron. From here, the next logical step would seem to be adding in support for creating brushes in the editor and retaining the operations to perform. The issue I’m facing is how to create and manipulate these brushes. I’d either need to create a proxy for the brush until it could be instanced or create the brushes procedurally in real-time while. It may be that the solution lies somewhere inbetween. For a cylinder, defining the ends first with a polygonal representation of the brush, then when it’s extruded along the axis perpendiuclar to the end piece, that will be the brush proper. Another architectural struggle for me to figure out as a non-tools programmer.
Lights and lightmapping would be neat to get going after this stage, though I think after lights may start to come some real greyboxing.