Jump to content

A "psychic" shader mod; development begins...


DanW58
 Share

Recommended Posts

What I'm saying is I think there is value in having a stable 'meta' for the game. I'm personally rather satisfied with a 4-6 months release cycle, not that we've had that in a long time. I am not convinced that an exclusively "continuous delivery" model is better.

I can't say I'm 100% certain of this, though. Just not something I'm really looking at working on.

  • Like 1
Link to comment
Share on other sites

Okay, if you prefer periodic releases, that's all there is to it.  But just to clarify, my point is not of continuous release being "better" in every conceivable metric;  it is easier to deal with;  that's my point.  Struggling towards a release is elliminated.  Makes YOUR life easier;   was my whole point.

EDIT:

Besides, the auto-update feature does NOT have to mean daily or weekly updates;  it could be seasonal updates;  it is whatever you decide.  What it removes is the need to put together these huge zip files and whatnot.

EDIT2:

In fact, you could have a semi-zip, with all the biggest, most compressible and stable files in it, that installs and then does svn up under the hood.  for all intents and purposes, this zip file does not need to be updated, because it updates itself.  But you can still change the name of it, and the revision number, "for marketing purposes"... :brow:

Edited by DanW58
Link to comment
Share on other sites

Yes, having a way to auto-update would be good. I just don't think it's that useful. Would an embedded svn/git be the way to go? Maybe, I dunno. I guess we'll take patches, I'm not going to be the one working on it anyways :)

Anyways, people can and do already play SVN. It's really not that difficult.

Fact is, putting the .zip files together is relatively trivial (and in fact jenkins now does she almost automatically).

Link to comment
Share on other sites

Embedded svn, I would think.  I've no experience with git, but my understanding is that only svn handles binary files as well as text files.   You don't have to work on it;  I'd be willing to put time in it, if there is concensus.

Edited by DanW58
Link to comment
Share on other sites

git handles large binaries poorly, but svn has a special way of deadlocking itself now and then...

Anyways, if you do want to give a shot at this, consider that it should work on mac/windows/linux and that it should probably support mac notarisation (at least be able to, down the line, since we don't at the moment.)

Link to comment
Share on other sites

6 minutes ago, wraitii said:

Anyways, people can and do already play SVN. It's really not that difficult.

Hmmm.. I'm not sure about that.

With regard to meta changes, I think it stabilizes pretty fast and is actually safer to do it this way since you have a constant stream of feedback (which might be invaluable early on).

That said, you are the guys on the frontlines and you know what makes sense for the team. And as always, thank you for the huge effort, 0ad rocks :thumbsup:

  • Thanks 1
Link to comment
Share on other sites

1 minute ago, badosu said:

Hmmm.. I'm not sure about that.

Well, it's harder than an auto-installer, but it is not that difficult. I think if you give it a decent shot you'll find that it works pretty well with the auto build.

And yes, I do see that it could give more instant feedback. But it also means that any failed experiment impacts players. I'm not sure the tradeoff is worth it right now.

BTW, for the curious, there were previous experiments with metallic shaders: https://wildfiregames.com/forum/topic/19650-engine-questions/page/6/?tab=comments#comment-304957

 

  • Like 1
Link to comment
Share on other sites

Well, I don't have a mac or a windows machine, and I'm poor as @#$%, so there's not a chance I'll be able to cover those fronts;  I can only ensure it works in Lubuntu;  someone else will have to help me with those other targets.

With my old game project we did have trouble serving mac users;  but we had two mac users in the dev team, so they jumped quickly to help people in distress.

The thing about players manually using svn or not is not whether it is easy or difficult.  People always have HUGE resistance to doing anything they haven't done before;  THAT is the issue.  I'm no exception:  If you asked me now to learn git I'd probably go bonkers.  I'd probably learn it in 10 minutes, once I got to it;  but it would take me 10 days to look at the manual.

I'll take a look at that metal shader.  Thanks.

EDIT:  Okay, that was a start;  what happened to it?  I think it metallized everything, tho.  But it may be the fact that all the assets contain too much specularity;  --same problem I have.

(( @Stan`   The Art Rule should be:  "Refrain from using any color but black for specular, unless you really know what the @#$% you are doing." ))

Edited by DanW58
Link to comment
Share on other sites

19 minutes ago, DanW58 said:

 

EDIT:  Okay, that was a start;  what happened to it?  I think it metallized everything, tho.  But it may be the fact that all the assets contain too much specularity;  --same problem I have.

Well it stayed as poc as the mod was not finished. Nowadays Nephy works on another mode called Hyrule conquest.

I suppose we could use it for shields.

20 minutes ago, DanW58 said:

 

(( @Stan`   The Art Rule should be:  "Refrain from using any color but black for specular, unless you really know what you are doing." ))

I'm not sure I get you. Are we talking about the new bronze shields speculars that were made yellow so they could keep that tint or do you also talk about b&w ones ?

 

Link to comment
Share on other sites

1 minute ago, Stan` said:

I'm not sure I get you. Are we talking about the new bronze shields speculars that were made yellow so they could keep that tint or do you also talk about b&w ones ?

Oh, not at all!  If you have been making shields yellow in specular, that is a Good Thing !!!  Maybe that's why they look so good.

I meant assets that should NOT have any specularity at all, like walls and columns and roofs and clothes and human skin.

Link to comment
Share on other sites

Though walls and skin and things do have a bit of specularity, of the fresnel type rather, and they are VERY low in specular power;  you'd have to specify a specular power below 10 for them;  otherwise they look ridiculous.  ((Or they WILL look ridiculous when environment mapping is implemented;  right now the ridiculous look is not revealed yet... But once you see the environment sharply reflected on walls as if they were mirrors, or as if they were packaged in shrink-wrap clear plastic, then you'd see what I mean.))

Edited by DanW58
Link to comment
Share on other sites

22 minutes ago, Stan` said:

I suppose we could use it for shields.

There is a HUGE performance cost in changing shaders while rendering a frame;  it's better to do everything with one shader, if at all possible, or have a separate one for water, but that's it.  Well, maybe 3;  but not a shader for each item or material.

That's why it's important to have a texture stack that can cover every material.  It would be too easy to call a metal shader for all metals, and a non-metal shader for all non-metals;  but it's not a good idea performance-wise.

With the current stack, if the best possible representation was used for every asset, it would be quite easy for the shader to deduce how to shade.

Namely, if both the diffuse and specular are colored, have the same hue, then it is a metal.

If the diffuse is colored, but the specular is gray-scale, it is a non-metal.

Then I could make ad-hoc adjustments to spec-power and refractive index tied to specular intensity.

But I can't;  it's too chaotic.

Edited by DanW58
Link to comment
Share on other sites

But it could be that many of the assets do NOT have specular textures, but specularity is specified elsewhere for the whole unit.  I tried to disable that in the shader;  namely I try to reject (set to black) anything that doesn't come from an actual texture, but maybe I failed in the attempt.

Edited by DanW58
Link to comment
Share on other sites

57 minutes ago, Stan` said:

Ah yeah I see. In general the specular was made for metallic parts but I can see how that went wrong for some stuff.

Maybe we should grab a big bucket of black paint and go on a specular texture fixing campaign...

It would be too much to ask of a shader to know when to ignore specular.

EDIT:  This is absurd.  Changing to Ptol, the females turn pitch-black, head and all;  the camel looks fine, unlike horses, but the mount on the camel looks black-hole black...  What on Earth is going on?!

ptol.jpg

Edited by DanW58
Link to comment
Share on other sites

I just decided to show specular color on-screen, unlit, just raw specular color (NOT the terrain, as that is a separate shader, but applying to all models).

As you can see, the obelisks, the lions, camel, cherry bushes, windows, and some of the people are black in specular, as they should be.

Mostly everything else is 50% gray for no reason.

Some of the hieroglyphics on the walls have colored specular, which now explains why I had such a hard time trying not to detect them as metal;   they ARE metal.

 

specColor.jpg

Edited by DanW58
Link to comment
Share on other sites

49 minutes ago, DanW58 said:

There is a HUGE performance cost in changing shaders while rendering a frame;  it's better to do everything with one shader, if at all possible, or have a separate one for water, but that's it.  Well, maybe 3;  but not a shader for each item or material.

Well thankfully we don't have a shader per object. But we do indeed have quite a few shader.

----------------

basic_trans family For transparent objects Has a bad perf impact.

basic_trans_{ao}_{parallax}_{spec}

Special one basic_trans_{wind} (moves like if pushed by wind)

-----

no_trans family  No special stuff plain old diff spec normal parallax

no_trans_{ao}_{parallax}_{spec}

-----

player_trans family.  multiplies a player color on the texture

player_trans_{ao}_{parallax}_{spec}

------

There is also

basic_spec creates a spec without specular texture

basic glow creates a very faint glow effect using the alpha channel of the specular.

objectcolor.xml is like player trans but you define the color in the actor

Link to comment
Share on other sites

OUCH!  That's one hell of a lot of shaders...  Are they actually used?

EDIT:  Heck, now I see why it is so hard to work with this.  The sides of the blocky chairs where Mr. Faro and his wife seat are downright white in specular, like they should be perfect mirrors.  Not to speak of all the splashes of white on the walls.  This is a Metallic Universe.

Maybe I should just detect desaturation in specular and change it to black.

EDIT2:  IT WORKS !!!

Somehow, AO doesn't seem to be working, tho....

nospec.jpg

Edited by DanW58
Link to comment
Share on other sites

That's where all the GPU time is spent, then.  I remember in the Vegastrike engine we had two shaders, basically, one for solids and one for transparencies, and we segregated their use, to have only a single switch.  So, the transparent shader was running first, while painting back to front;  and once all transparent objects were disposed of, we switched to the solid shader and proceeded with  solid objects from front to back.

I would suggest you try to do the same.  I have no idea what all this profusion of shaders is for;  I can't tell from their names;  but I can tell you up-front they are NOT justified.  I'm sure they implement simple functionalities that could easily be added to the main shaders, and be disposed of.

Edited by DanW58
Link to comment
Share on other sites

GPU are actually very under used. The game is mostly cpu bound. The switching is mostly done by the driver.

The point of those materials is to allow artists to have models with only a few textures eg only diffuse, or diffuse + spec, diffuse +spec + ao, diffuse +spec + ao + parallax, diffuse +ao etc.  If you load a material requiring more texture you'll get warnings.

Link to comment
Share on other sites

7 minutes ago, Stan` said:

GPU are actually very under used. The game is mostly cpu bound. The switching is mostly done by the driver.

The point of those materials is to allow artists to have models with only a few textures eg only diffuse, or diffuse + spec, diffuse +spec + ao, diffuse +spec + ao + parallax, diffuse +ao etc.  If you load a material requiring more texture you'll get warnings.

I can incorporate all of that on this shader I'm working on ... easily.  In fact, I've mostly done so already, without knowing it was needed.  I just saw so many confusing, inscrutable conditionals in the shader that I assumed anything was possible vis a vis textures being or not being there.  I have defaults everywhere that I can turn into smarter guesses in no time at all.

Having separate shaders for all these texture combinations is a nightmare.  Means that every time you tweak one shader you have to tweak them all !!!  That's shooting yourself on the foot with a silver bullet.

Edited by DanW58
Link to comment
Share on other sites

26 minutes ago, DanW58 said:

Some of the hieroglyphics on the walls have colored specular, which now explains why I had such a hard time trying not to detect them as metal;   they ARE metal.

Okay, let me backup here. IN THIS SCREENSHOT, where are the problems with:

 

A. The Specular

B. The AO mapping

C. "The Lighting"

To show us what you are fixing.

D0jmfg0.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...