Multi-level rendering work

Improving the artwork in Warzone2100 - not for mod discussions
Post Reply
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Multi-level rendering work

Post by Per »

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.
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Multi-level rendering work

Post by Jorzi »

Hmm, interesting, I can think of a few extra possibilities which this adds...
ImageImage
-insert deep philosophical statement here-
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Multi-level rendering work

Post by Per »

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).
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Multi-level rendering work

Post by Jorzi »

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
ImageImage
-insert deep philosophical statement here-
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Multi-level rendering work

Post by Per »

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?
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Multi-level rendering work

Post by Jorzi »

Having scaling on 3 dimensions available can be quite useful, for example if you want to make moving parts that stretch.
ImageImage
-insert deep philosophical statement here-
Post Reply