UFO:Alien Invasion

Development => Artwork => Topic started by: Sandro on May 15, 2011, 12:24:44 am

Title: Material parameters (to avoid super-shiny textures)
Post by: Sandro on May 15, 2011, 12:24:44 am
As all of you are have noticed, changes in the renderer brought one very unpleasant feature: all textures that do not have material parameters "specular" and "hardness" defined are reflective to the point of oily, or even metallic look.

This is because of fixing the bug which prevented assignment of default material parameters to textures (in most cases), but current default parameters are not good: they are all set to 1.0, which is very shiny. Looks like it would be a good idea to set some different, better material parameters, but since I'm no artist, I want to ask people of arts -- what values are the best ones?
Title: Re: Material parameters (to avoid super-shiny textures)
Post by: MCR on May 15, 2011, 12:34:01 am
This is hard to answer without doing some testing...

Where exactly can we set this default parameter to play around with different values ?
Title: Re: Material parameters (to avoid super-shiny textures)
Post by: Sandro on May 15, 2011, 12:40:47 am
Simplest method would be to edit the .mat file. On the other hand, there are r_specular and r_hardness console variables in the game, but they act as multipliers, not the default values. It would be possible to change them to be the deafult values, or, even better, introduce a new r_default_specular and r_default_hardness variables.

Edit:
I mean, the values in the .mat file just replace the default parameters, so creating them will result in the very same image as by changing the default values. They are treated just the same.
Title: Re: Material parameters (to avoid super-shiny textures)
Post by: MCR on May 15, 2011, 01:04:02 am
Editing the .mat file would mean to edit it for each texture separately afaik, that is why I was asking...

I vote for the new r_default_specular & r_default_hardness variables, which then can be overridden for defined textures via material system.

AFAIR Arisian did some coding on this issue & the maximum value was set to 1.0 then: (http://ufoai.ninex.info/forum/index.php?topic=3181.msg38560#msg38560)
Title: Re: Material parameters (to avoid super-shiny textures)
Post by: Sandro on May 15, 2011, 01:56:14 am
Editing the .mat file would mean to edit it for each texture separately afaik, that is why I was asking...

Sure, but that will be needed only for testing stage -- when good default values will be found, they will be hardcoded into game.

I vote for the new r_default_specular & r_default_hardness variables, which then can be overridden for defined textures via material system.

If my amount of free time allows will code those vars, then.

AFAIR Arisian did some coding on this issue & the maximum value was set to 1.0 then: (http://ufoai.ninex.info/forum/index.php?topic=3181.msg38560#msg38560)

Thanks, read the whole thread. It explains how all that default material values mess did happen :)
Title: Re: Material parameters (to avoid super-shiny textures)
Post by: H-Hour on May 17, 2011, 12:22:05 am
In my opinion, default behaviour for textures should be not shiny. If a mapper wants shiny textures, they should have to change it.

I find I use low values around 0.1 for matte textures and only bump it up some for very shiny textures. I'm happy for 0.1 to be default. You can look at alienb2.mat as my most-thoroughly-experimented material file for specular/hardness/bump/parallax values.
Title: Re: Material parameters (to avoid super-shiny textures)
Post by: Sandro on June 11, 2011, 05:18:22 pm
Just for everyone to know, r_default_specular and r_default_hardness console vars are already available. For a week in fact :)
Title: Re: Material parameters (to avoid super-shiny textures)
Post by: MCR on August 10, 2011, 01:17:43 am
The defaults are now 0.2 for both of them.