Multi-level rendering work

Improving the artwork in Warzone2100 - not for mod discussions

Multi-level rendering work

Postby Per » 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.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
 
Posts: 3605
Joined: 03 Aug 2006, 19:39

Re: Multi-level rendering work

Postby Jorzi » 23 Apr 2015, 14:04

Hmm, interesting, I can think of a few extra possibilities which this adds...
ImageImage
-insert deep philosophical statement here-
Jorzi
Regular
Regular
 
Posts: 1944
Joined: 11 Apr 2010, 00:14

Re: Multi-level rendering work

Postby Per » 27 Apr 2015, 00:00

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).
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
 
Posts: 3605
Joined: 03 Aug 2006, 19:39

Re: Multi-level rendering work

Postby Jorzi » 29 Apr 2015, 08:37

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

Re: Multi-level rendering work

Postby Per » 30 Apr 2015, 09:16

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?
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
 
Posts: 3605
Joined: 03 Aug 2006, 19:39

Re: Multi-level rendering work

Postby Jorzi » 30 Apr 2015, 12:37

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


Return to Artwork