Models by MaNGusT (AR)

Improving the artwork in Warzone2100 - not for mod discussions
User avatar
MaNGusT
Art contributor
Posts: 1007
Joined: 22 Sep 2006, 10:31
Location: Polar region, Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT » 31 Mar 2019, 21:11

Well, I could until my English level allows. Just materials is no longer working and missing some info about pie flags for gfx effect that Cyp did for me

Code: Select all

Change new PIE modes to use flags:
-Premultiplied uses TYPE xx4 
-Additive uses TYPE xx1/xx2 to dis/enable

-TYPE x0x (to not face the camera)
-Roll to camera uses TYPE x1x (to rotate to the camera like a cylinder)
-Pitch to camera uses TYPE x2x (to rotate like a sphere)
You can see use of it with ARmod when buildings destroyed and when minipod fires.
EDIT: What would be the best way to re-implement support for shininess in the pie files for your purposes?
As far as I understand after reading of comments in commit, the only way to re-implement it is to put it into special grayscale texture or unused alpha channel and use via shader. :hmm:
Image

User avatar
MaNGusT
Art contributor
Posts: 1007
Joined: 22 Sep 2006, 10:31
Location: Polar region, Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT » 31 Mar 2019, 22:48

well, I still can control shininess as global parameter via shader. It's enough for current use.
Image

Forgon
Code contributor
Code contributor
Posts: 242
Joined: 07 Dec 2016, 22:23

Re: Models by MaNGusT (AR)

Post by Forgon » 03 Apr 2019, 22:10

MaNGusT wrote:
31 Mar 2019, 21:11
Well, I could until my English level allows. Just materials is no longer working and missing some info about pie flags for gfx effect that Cyp did for me

Code: Select all

Change new PIE modes to use flags:
-Premultiplied uses TYPE xx4 
-Additive uses TYPE xx1/xx2 to dis/enable

-TYPE x0x (to not face the camera)
-Roll to camera uses TYPE x1x (to rotate to the camera like a cylinder)
-Pitch to camera uses TYPE x2x (to rotate like a sphere)
You can see use of it with ARmod when buildings destroyed and when minipod fires.
[...]
Thank you. Could you check the pull request I created based on your comment,
PR 295?

User avatar
MaNGusT
Art contributor
Posts: 1007
Joined: 22 Sep 2006, 10:31
Location: Polar region, Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT » 03 Apr 2019, 22:37

Forgon wrote:
03 Apr 2019, 22:10
Thank you. Could you check the pull request I created based on your comment PR 295?
Seems that now everything is right. Note, to use premultiplied mode when making explosions an artist should place fire effect to rgb channels and smoke to alpha channel. Cyp had created an easy commandline tool for this called premult, but it also can be done by gimp. We use the same technique with normal maps and specular maps. :)
Image

Jorzi
Regular
Regular
Posts: 1977
Joined: 11 Apr 2010, 00:14

Re: Models by MaNGusT (AR)

Post by Jorzi » 04 Apr 2019, 22:07

I think having global shininess etc parameters are perfectly fine. If we need support for a model with exceptional parameters beyond what the textures can a chieve, we can simply define a new custom shader.
ImageImage
-insert deep philosophical statement here-

User avatar
MaNGusT
Art contributor
Posts: 1007
Joined: 22 Sep 2006, 10:31
Location: Polar region, Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT » 04 Apr 2019, 22:33

Jorzi wrote:
04 Apr 2019, 22:07
I think having global shininess etc parameters are perfectly fine. If we need support for a model with exceptional parameters beyond what the textures can a chieve, we can simply define a new custom shader.
Maybe one day we will create shaders for different material types. :-)
Image

User avatar
MaNGusT
Art contributor
Posts: 1007
Joined: 22 Sep 2006, 10:31
Location: Polar region, Russia

Re: Models by MaNGusT (AR)

Post by MaNGusT » 16 Apr 2019, 15:44

I've got an idea how to finally introduce tangent-space normal maps into wz engine without changing model format.
Few years ago Vexed showed me that wz's renderer already supported smooth shading technique. This feature is enabled only for terrain because its mesh has enough polygons to look good when shaded. Units have very lowpoly meshes( just cubes) and shading causes lighting artifacts on them, so it's disabled.
Currently wz without textures looks like this.
12 (1).jpg
The idea is to add a new pie3 type flag that will enable shading on a model. If shading is enabled new models will look so, like all triangles are placed into one smooth group in 3d editor and don't have hard edges.
21 (1).jpg
21 (1).jpg (20.05 KiB) Viewed 96 times
11.jpg
11.jpg (24.96 KiB) Viewed 95 times
This shading technique will allow us to precalculate vertex normals to smooth co-joined triangles and could be used in shader calculations for tangent-space normal mapping(and many other good stuff).
cons:
-Artists will be limited a bit when creating models - can't use 90* angles.
-New models will "eat" a bit more triangles to avoid 90* angles.
-Increased loading time into a map.
pros:
-Will be significantly increased modelling and texturing time.
-New models will be much more detailed via normal map.
-Tangent-space normal maps are easily editable in 2d editors like gimp, photoshop, xnormal and others.
-No need in swap to a completely new model format.
-Fits wz's step-by-step development flow.

I want to know what do current coders think about this idea? Should we prepare a patch for the master branch? Is anybody interested in such update? I don't ask you to make this, just some searching.:)
Attachments
12 (1).jpg
Image

Post Reply