Ive heard alot about rendering units through Lua, and it just so happens that SWS has a need for it. Ive got the script mostly working, with just a few things to finish up.
Firstly, I can draw the unit model, but it doesn't look like an actual unit. It has not got the proper shading, lighting and reflections that other, 'real' units have. It has incorrect (or a complete lack of) z-order sorting. It stands out like a sore thumb and looks kinda horrible. How would I get the unit looking like an actual real unit?
Secondly, is there a way to just draw a model loaded from the VFS, instead of using gl.UnitShape() to draw a unit from a unitDefID? The units needing to be drawn do not need to be actual valid units, all I need is the model, but with gl.UnitShape they need to be valid models
The script that I have so far can be found here: http://pastebin.com/m4b6c871d
Ignore the debugging cruft in there, its not the final version
Thanks