Models by MaNGusT (AR)

Improving the artwork in Warzone2100 - not for mod discussions
i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: Models by MaNGusT (AR)

Post by i-NoD »

Per wrote: If you could just document a few of the things you did on WZM, then perhaps that work would not be wasted, and we can get WZM models into the game with just a tiny bit more work.

MINMAX_TSCEN - what does it mean, and what does its values mean in relation to the standard iIMDShape minmax values (ie are they interchangeable)?

MATERIALS - why was this put in the global section instead of under the MESH part? Shouldn't each mesh be able to have its own materials?

TEAMCOLOURS directive, is this needed anymore, when there is a separate TCMASK directive?
The idea was to offload as much calculation/actions as we could from game engine to model export/creation suite to gain speed-speed-speed in-game.

Whole MINMAX_TSCEN thingy is straight from iIMDShape min, max and "tight sphere center" values, see _imd_load_points function for actual code. I just moved that code to WMIT. Obviously that kind of stuff would slow down game loading on higher-poly models.

IIRC after a small debate on +s and -s we've decided to use a single material per model. While not flexible as it could be, that's more that good enough for RTS game in my view. And its better to design some separated material manager with simple IDs in every mesh if actually needed. Because of that, TEAMCOLOURS directive was born to give some flexibility - it tells us if actual single mesh actually uses TCMASK texture from current model, saving some useless texture fetches.

Oh.. i guess that would be a problem for net code: connectors are using floating-point values in my version... any chance of using fixed point .xx values for those? Its really annoying to have integers there...

Other important thing is: vertex-level access for PIE models aren't a good thing for VBOs. So i came to simple solution: using axis-aligned bbox as vertex source for construction lines. Maybe that's how SupCom style construction born?
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Models by MaNGusT (AR)

Post by Per »

I see. This makes sense.

I have made a quick and dirty WZM loader for git master now. You can see it at #3905. It must be run without shadows, and supports no bells & whistles yet. Construction beam and repair effect just ifdef'ed away for now. The major difference from your old wzm branch is that it uses the same rendering code as the PIE format and it does data loading by adding a new 'WZM' directive to WRF files.

Since I did not have any proper WZM models to test on, I tried using WMIT to convert some PIE models to WZM. Those seemed to lose one side of some polygons somehow. Is this a known defect in WMIT's PIE conversion (double sided polygons?), or is my code at fault somehow? I don't see it.

If someone can post known good WZM models somewhere for me to test, that would help. Also some code review would probably quickly identify me as the problem :)

Anyway, I think building effects such as construction beam and repair should be put into shaders. I plan to give that a shot soon.
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT »

Per wrote:Since I did not have any proper WZM models to test on, I tried using WMIT to convert some PIE models to WZM. Those seemed to lose one side of some polygons somehow. Is this a known defect in WMIT's PIE conversion (double sided polygons?), or is my code at fault somehow? I don't see it.
I've commited the wzm model of viper to AR's repo few days ago. You can take it.

also here is the UFO model by Jorzi. :)
ufo.zip
I also added the ao texture. you can use it instead of diffuse texture.
(2.58 MiB) Downloaded 459 times
Last edited by MaNGusT on 24 Jan 2013, 01:55, edited 1 time in total.
Image
i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: Models by MaNGusT (AR)

Post by i-NoD »

There was a special wzm mod with AR stuff for my try-out branch.

Weren't DS polys split in your PIE optimizer tool? Unlikely that they are preserved for WZM. Even if its so, WMIT disables such a "feature" in viewer.

Btw, 200+ saucers gives a good pressure on GFX part :)
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Models by MaNGusT (AR)

Post by Per »

I found the rendering bug. Now WZM models display fine, and I am working on adding support for the bells & whistles. :)

Question about the wzm mod - I see that it contains most (all?) of the PIE models converted to WZM, and with tangent values. How are these tangent values calculated? When I tried importing PIE and exporting WZM in WMIT, all my tangent values got out as zeroes and ones.
i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: Models by MaNGusT (AR)

Post by i-NoD »

Per wrote:Question about the wzm mod - I see that it contains most (all?) of the PIE models converted to WZM, and with tangent values. How are these tangent values calculated? When I tried importing PIE and exporting WZM in WMIT, all my tangent values got out as zeroes and ones.
That's correct behavior. Only brand new imported OBJs will get you nice normals and resulting tangent stuff.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Models by MaNGusT (AR)

Post by Per »

So you imported the models into some 3D program before going through WMIT to get the tangents?

I am still a bit confused by the MINMAX_TSCEN values. They do not match the values calculated within Warzone at all, so they must mean something different. But what is the difference? And why the difference?
i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: Models by MaNGusT (AR)

Post by i-NoD »

Per wrote:So you imported the models into some 3D program before going through WMIT to get the tangents?

I am still a bit confused by the MINMAX_TSCEN values. They do not match the values calculated within Warzone at all, so they must mean something different. But what is the difference? And why the difference?
No, a few models were imported from OBJ source to test actual tangents. Most of the other stuff was batch-converted from old PIEs though WMIT, it will calculate naive normal, no smoothing, no nothing and this will manifest back in those zeroes and ones... Why even bother with that old stuff? Its like those pesky "crystal clear MP3s" and such... There are great models around waiting for great wz showtime, but they need a new format badly...

You can check MINMAX_TSCEN code in WMIT and wz by yourself, nothing was different year ago, I've checked actual values. But I haven't looked since...
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Models by MaNGusT (AR)

Post by Per »

i-NoD wrote:You can check MINMAX_TSCEN code in WMIT and wz by yourself, nothing was different year ago, I've checked actual values. But I haven't looked since...
I can read the code, but I can't read your mind, especially since you did not document anything. What I am asking for is why you decided to change from the way Warzone does it, to the AABB stuff. What are the advantages?
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT »

Per wrote:
i-NoD wrote:You can check MINMAX_TSCEN code in WMIT and wz by yourself, nothing was different year ago, I've checked actual values. But I haven't looked since...
I can read the code, but I can't read your mind, especially since you did not document anything. What I am asking for is why you decided to change from the way Warzone does it, to the AABB stuff. What are the advantages?
hmm.. :hmm:
I-Nod wrote:Whole MINMAX_TSCEN thingy is straight from iIMDShape min, max and "tight sphere center" values, see _imd_load_points function for actual code. I just moved that code to WMIT. Obviously that kind of stuff would slow down game loading on higher-poly models.
Image
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT »

Per wrote: What are the advantages?
There is a big advantage for high poly models. Currently models have low amount of vertexes and calculating tight bounding spheres in imd load doesn't take too much time. But new models have hundreds of vertexes which will increase calculating time significantly. Much better would be to take pre-calculated values from models. That's the advantage. If I understand correctly.
Image
i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: Models by MaNGusT (AR)

Post by i-NoD »

Per wrote:I can read the code, but I can't read your mind, especially since you did not document anything. What I am asking for is why you decided to change from the way Warzone does it, to the AABB stuff. What are the advantages?
That's strange, because AABB and "TSCEN" stuff are actual wz code offloaded (or moved) from game run-time to wmit "export-time". I haven't changed or added a single bit there, since it wasn't my intention to alter collision logic in any way. ALL values were exactly the same for same model in WZM form and PIE form with in-game calculation during tests.

The only thing added to wzm compared to pie is tangent and handedness info for every vertex and tbn matrix restoration in shader. And hacked AABB data for usage with construction lines, since that's inefficient to grab vbo data from gpu.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Models by MaNGusT (AR)

Post by Per »

That's odd. I'll try to push my WZM loader soon, ignoring the MINMAX_TSCEN numbers, then you can have a look at it, see if you can figure out why the numbers don't match :)
User avatar
MaNGusT
Art contributor
Posts: 1152
Joined: 22 Sep 2006, 10:31
Location: Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT »

Made some texture's work with this rusty piece of.. metal :? any adds?
don't look at polycount, it shows hided objects too
don't look at polycount, it shows hided objects too
Image
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Models by MaNGusT (AR)

Post by Jorzi »

Pretty nice effect, although from far away it looks more like bronze than rust. Still, very nice base layer :)
ImageImage
-insert deep philosophical statement here-
Post Reply