New Models for 3.0, that make use of the mask feature wanted

Improving the artwork in Warzone2100 - not for mod discussions
Post Reply
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

New Models for 3.0, that make use of the mask feature wanted

Post by Buginator » 07 Mar 2010, 04:29

With the merging of the shaders branch into trunk, we are now looking to populate trunk with the new, improved models.

In short, if you want the model to be used in trunk, then we must get permission, and a valid license agreement so we may distribute the work as part of the game.

More details will soon follow.

Forum member Berg has fixed all of the original models to use TCmask. This job is done! A big should out goes to him!

For *new* models, we are still looking for a complete set...

i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: New Models for 3.0, that make use of the mask feature wa

Post by i-NoD » 07 Mar 2010, 04:30

Here is a small guide for TCMask #851 feature. To use it you must have at least a 3d model file (.3ds or similar) and a diffuse texture. You'll have to make a .pie file from your model and a special mask from diffuse texture. Plus you'd make some modifications to game's .wrf files if you're going to test your work.
  • If you have a .3ds file then you'll need to convert it into PIE format with 3ds2pie. Grab renewed 3ds2pie win-tool (requires VC++ 2008 SP1 Redistributable Package (x86) to run) or compile it from source by yourself. Just check 'Enable TCMask texture' during conversion to activate the feature for your model or it will not work.
  • If you got a .pie file by other means then you'll need alter it to enable masking. Open .pie file in your favorite text editor and change standard type from

    Code: Select all

    TYPE 200
    to

    Code: Select all

    TYPE 10200
    It's unlikely to happen, but you will need to add 10000 to any other value. Consult with PIE3 format specs, if you'll detect something unusual.
Now you should prepare a diffuse texture. For example I'll take some standard WarZone texture Image.

After you've identified some area that will use team coloration make this area monochrome (try to keep you color range with decimal values 96+-48). In fact, this feature could take 3-rd frame from old team animation and give you all the other colors. Here I've converted 1-st 'green team' frame to monochrome colors:
page-16-droid-drives.png
Diffuse texture
page-16-droid-drives.png (41.78 KiB) Viewed 10031 times
Using the same area you'll need to create a special TCMask texture. It will only utilize alpha channel:
  • Coloration area should be filled with opaque black color #000000FF
  • All other pixels should be completely transparent #00000000
page-16_tcmask.png
TCMask texture
page-16_tcmask.png (370 Bytes) Viewed 8234 times
You may save it as 1-bit alpha .png file.

i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: New Models for 3.0, that make use of the mask feature wa

Post by i-NoD » 07 Mar 2010, 04:30

TCMask texture name is expected to be in form of 'page-<diffuse page number>_tcmask'. For previous example it's the following pair: 'page-16-droid-drives.png' and 'page-16_tcmask.png'.

To test your model in-game:
  1. Add as new one or replace some existing model with your TCMasked .pie
  2. Add/replace diffuse texture into 'texpages' folder
  3. Add mask texture into the same 'texpages' folder
  4. Modify limiter_tex.wrf and vidmemX.wrf files (grab them from mp folder for skirmish mods) with TCMASK line:

    Code: Select all

    file		TEXPAGE	"page-16-droid-drives.png"
    file		TCMASK	"page-16_tcmask.png"
  5. Run current trunk version of the game and check for results
Here is a windows trunk build based on revision 10396. Please post all TCMask related issues into this tread and bugs into #851.

Both diffuse and mask textures could be up to 2048px x 2048px is size. However it's best to keep some proportions between model's element size and its texture island size, so when textures will be downscaled in-game (for gfx adapters with small amount of video memory) it won't be too much blurred, like factory on the screenshots below :wink:
The fact is that both factory and the lab do have same sized 1024px textures. All is fine when you set up game to use 1048px textures, but feel the difference when they are downscaled to 256px. If you can, please check you work at 512px at least.

User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: New Models for 3.0, that make use of the mask feature wanted

Post by Buginator » 07 Mar 2010, 04:32

Some screen shots of a sample of what is going on...
wz2100_shot_001_3.png
wz2100_shot_004_3.png
Note: don't mind the fps, this is from a linux box using a very old radeon 9600.

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

Re: New Models for 3.0, that make use of the mask feature wanted

Post by MaNGusT » 07 Mar 2010, 17:25

Note: don't mind the fps, this is from a linux box using a very old radeon 9600.
No, you just forgot to turn off a shadows. ;)
Image

User avatar
Olrox
Art contributor
Posts: 1999
Joined: 03 Jul 2007, 19:10

Re: New Models for 3.0, that make use of the mask feature wanted

Post by Olrox » 07 Mar 2010, 19:21

Whoa, nice truck ;)
Hey, sorry if that's off-topic, really.


I guess that the best way to avoid problems with license would be to publish the models under CC0, right?

BTW, I can adapt the truck model so that the "container" is larger (and thus, making it more distinguished as a *truck*). I've almost forgot about that model. Right now I'm able to handle game files. Or do you think it's good enough as it is? That wouldn't represent changes to the tex page, most probably.

~Olrox

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

Re: New Models for 3.0, that make use of the mask feature wanted

Post by MaNGusT » 07 Mar 2010, 19:32

Olrox wrote: I've almost forgot about that model.
I have the modified version of your truck model. I've reduced a polycount and bla bla bla... :ninja:
Image

i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: New Models for 3.0, that make use of the mask feature wa

Post by i-NoD » 22 Mar 2010, 01:55

Bump...
A small guide has been added as second and third posts. I hope it is understandable enough.. :lecture:

User avatar
Olrox
Art contributor
Posts: 1999
Joined: 03 Jul 2007, 19:10

Re: New Models for 3.0, that make use of the mask feature wa

Post by Olrox » 23 Mar 2010, 00:12

i-NoD wrote:Bump...
A small guide has been added as second and third posts. I hope it is understandable enough.. :lecture:
Very interesting info, thanks. I'll study it indepth as soon as I have a good opportunity :)

~Olrox

User avatar
Crymson
Trained
Trained
Posts: 289
Joined: 18 Mar 2010, 21:08

Re: New Models for 3.0, that make use of the mask feature wa

Post by Crymson » 23 Mar 2010, 20:32

i-NoD wrote:Bump...
A small guide has been added as second and third posts. I hope it is understandable enough.. :lecture:
Nice mini tutorial.
Can you guys make it so that we can pick our own team colors instead of the defaults that warzone uses by putting that data in some external file warzone can read in?

Are the buildings & units the only things that will get this mask treatment, or will the UI also do something with the masks? I was looking to change the flags, but I rather use the masks and not the old way.

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

Re: New Models for 3.0, that make use of the mask feature wa

Post by MaNGusT » 23 Mar 2010, 20:35

Flank4 wrote:
i-NoD wrote:Bump...
A small guide has been added as second and third posts. I hope it is understandable enough.. :lecture:
Nice mini tutorial.
Can you guys make it so that we can pick our own team colors instead of the defaults that warzone uses by putting that data in some external file warzone can read in?

Are the buildings & units the only things that will get this mask treatment, or will the UI also do something with the masks? I was looking to change the flags, but I rather use the masks and not the old way.
already done. look palette.txt in base.wz :wink:
Image

User avatar
Crymson
Trained
Trained
Posts: 289
Joined: 18 Mar 2010, 21:08

Re: New Models for 3.0, that make use of the mask feature wa

Post by Crymson » 23 Mar 2010, 20:53

MaNGusT wrote: already done. look palette.txt in base.wz :wink:
ImageI totally missed that!

User avatar
macuser
Regular
Regular
Posts: 1052
Joined: 19 Mar 2010, 23:35
Location: USA
Contact:

Re: New Models for 3.0, that make use of the mask feature wa

Post by macuser » 26 Mar 2010, 17:06

I like the new mask feture and the new models and all... but the bottom pad thingy is asynchronous with the new model. and the "dirt" on the team colors could be reduced a bit.

-regards macuser
ArtRev Website

ImageImage

System: AMD Phenom II x4, 4GB RAM, 640GB HD, Nvidia GeForce GT 240 1GB, Mac OS X 10.6

i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: New Models for 3.0, that make use of the mask feature wa

Post by i-NoD » 26 Mar 2010, 20:15

macuser wrote:I like the new mask feture and the new models and all... but the bottom pad thingy is asynchronous with the new model. and the "dirt" on the team colors could be reduced a bit.
ow, baseplates... I guess elio's intension was to remove them completely or to use semi-transparent ones.


I don't remember anything about 'dirt'... :hmm:
Could you hint me with some details?

User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: New Models for 3.0, that make use of the mask feature wa

Post by Zarel » 26 Mar 2010, 20:29

i-NoD wrote:ow, baseplates... I guess elio's intension was to remove them completely or to use semi-transparent ones.
Baseplates can be rendered the same way as decals... that should prevent problems like z-fighting.

Post Reply