I just pushed two changes to the renderer.
The first is that the SHADERS directive in PIE files should now immediately follow the LEVEL directive, so that you can set a different shader for each level on a model. Having the SHADERS directive after the texture directives will still work, but is to be considered deprecated now.
The second is that rendering of multiple mesh levels for features, structures and wall sections should now work. It does not work for models using .ani animation, since they use their own rendering path. If more than one level of a structure has connectors, turrets will be rendered on all of them (likely creating duplicate turrets). This has only a cosmetic effect, and is unlikely to work as anticipated. We should change the connectors description later to allow for more precise placement of turrets. For defensive structures with more than one level, all levels will be pulled to the ground. We should add per-level flags to the PIE format to allow us to stop individual levels from being pulled to the ground. For now, you can prevent the whole model from being pulled to ground with the 0x00001000 model flag.
Feedback and testing welcome.
Multi-level rendering work
Re: Multi-level rendering work
Hmm, interesting, I can think of a few extra possibilities which this adds...
-insert deep philosophical statement here-
Re: Multi-level rendering work
Question. The ANI format supports scaling the model in three dimensions each frame. However, this support has never been implemented in the game itself (the values are simply ignored). Is there a use case for this, or should we just drop this from our animation support? It is not really hard to support, it just bloats the animation definition and calculations (and eventually the shader that will handle it once we move from the fixed pipeline).
Re: Multi-level rendering work
As long as everything is converted into one 4x4 matrix, it shouldn't bloat anything.
I think it's good to have it, it's a pretty standard feature, after all
I think it's good to have it, it's a pretty standard feature, after all
-insert deep philosophical statement here-
Re: Multi-level rendering work
Is scaling in three dimensions a pretty standard feature, too? Or would it be enough to limit it to simply a single-value scaling factor?
Re: Multi-level rendering work
Having scaling on 3 dimensions available can be quite useful, for example if you want to make moving parts that stretch.
-insert deep philosophical statement here-