Multi-level rendering work
Posted: 19 Apr 2015, 21:46
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.
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.