Jump to content

Flickering shadows!


Recommended Posts

Okay, I'll try that, but I KNOW I'm not seeing ao.  In fact, I even disabled shadows, in case they were hiding the ao somehow, but nope.

And I thought it might be my messing with the civic center, but I see no ao on the granary or on the plain house either.

Also removed some conditionals in the shader...

  #if /*(USE_INSTANCING || USE_GPU_SKINNING) &&*/ USE_AO
    vec3 ao = texture2D(aoTex, v_tex2).rrr;
    ao = mix(vec3(1.0), ao, effectSettings.w);
    ambColor *= ao;
  #endif

I know if I remove USE_AO it's going to crash, as there's definitely things that don't use it.

Actually, I'm going to try removing the second line completely...

EDIT:   Nope; doesn't help.

I think you have a bug somewhere, I'm probably not the only person ao starved;  but most people couldn't tell an ao from a hole in the ground and that's why it wasn't reported before...

Edited by DanW58
Link to post
Share on other sites
  • Replies 160
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I'm working on a new algorithm;  a much more "benevolent hack" than this one.  However, I was just playing a game in this marvelous new map, oceanside I think it's called, and upon attacking a cc I no

This kind of problem is typical of games using the method whereby the scene is rendered to a depth texture from a light source, and then the depth info is transformed and compared with when rendering

Thanks for the encouragement. This version now works better.  Pretty good with Ptolemaic, but the problem with the Athenians was that the texturing there makes so little sense it's nearly impossi

Posted Images

47 minutes ago, DanW58 said:

You're talking about second reflections;  that's a whole other subject;

The same as skies, they both are reflection, refraction and absorption.

50 minutes ago, DanW58 said:

it cannot be handled by ao nor by anything except a HUGE hack;  I tried to tackle that one...

I don't see much difference in terms of math and energy conservation, ambient color or cubemap is another hack to make things look more realistic.

And on modern hardware you can find pretty cheap techniques to get the second reflection (beside ray-tracing).

 

Link to post
Share on other sites
12 minutes ago, vladislavbelov said:

And on modern hardware you can find pretty cheap techniques to get the second reflection (beside ray-tracing).

Okay, I'm not yet familiar with modern hardware;  my prime was 20 years ago.

Quote

I don't see much difference in terms of math and energy conservation, ambient color or cubemap is another hack to make things look more realistic.

I was saying because once the head dev of vegastrike was adding ambient color to the environment mapping fetch.  I said to him "the environment map IS the ambient color;  you are adding the environment color twice;  but he would not understand or budge.

13 minutes ago, Stan` said:

Left AO / Right NO AO

Well, there's something wrong there, with ao it should be darker;  must be the * 2.0;  in any case, I can see ao on the left picture, like behind the thin, tall pillars, for example.

I'm getting no ao whatsoever, I'm telling you.

I changed the section in the shader to,

  vec3 color = (texdiffuse * sundiffuse + specular.rgb) * getShadow();
  vec3 ambColor = texdiffuse * ambient;

  //#if /*(USE_INSTANCING || USE_GPU_SKINNING) &&*/ USE_AO
    vec3 ao = texture2D(aoTex, v_tex2).rrr;
    //ao = mix(vec3(1.0), ao, effectSettings.w);
    ambColor *= ao;
  //#endif

  ambColor.rgb *= up_bias;

  color += ambColor;

As expected, anything that doesn't use ao disappeared, including all the trees and berry shrubs.

When my women are building the first granary, the temporary wooden support structure doesn't show, while the rising granary does.  And still, no ao's.

Look at faro and his wife;  they look like they are sitting on light tables.

 

noao.jpg

Edited by DanW58
Link to post
Share on other sites
5 minutes ago, DanW58 said:

Look at faro and his wife;  they look like they are sitting on light tables.

What is that map?

5 minutes ago, DanW58 said:

Well, there's something wrong there, with ao it should be darker;  must be the * 2.0;  in any case, I can see ao on the left picture, like behind the thin, tall pillars, for example.

Indeed disabling shadows we get

image.png

It's just that our AO texture increase the emphasis.

EDIT: I think I found the culprit

<?xml version="1.0" encoding="utf-8"?>
<material>
  <alternative material="player_trans_spec.xml" quality="8"/>
  <define name="USE_PLAYERCOLOR" value="1"/>
  <define name="USE_PARALLAX" value="1"/>
  <required_texture name="baseTex"/>
  <required_texture name="specTex" define="USE_SPECULAR_MAP"/>
  <required_texture name="normTex" define="USE_NORMAL_MAP"/>
  <shader effect="model"/>
  <uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/>
</material>

 

Link to post
Share on other sites

The one above is player_trans_parallax_spec

<uniform name="effectSettings" value="1.0 50.0 0.0075 0.85"/>

should be

<uniform name="effectSettings" value="1.0 50.0 0.0075 0"/>

Since there is no AO. But that doesn't seem to work. Buildings still have self shadows.

This one is used by the left cc player_trans_ao_parallax_spec

<?xml version="1.0" encoding="utf-8"?>
<material>
  <alternative material="player_trans_ao_spec.xml" quality="8"/>
  <define name="USE_PLAYERCOLOR" value="1"/>
  <define name="USE_PARALLAX" value="1"/>
  <required_texture name="baseTex"/>
  <required_texture name="normTex" define="USE_NORMAL_MAP"/>
  <required_texture name="specTex" define="USE_SPECULAR_MAP"/>
  <required_texture name="aoTex" define="USE_AO"/>
  <shader effect="model"/>
  <uniform name="effectSettings" value="1.0 50.0 0.0075 0.6"/>
</material>

EDIT For the record

<uniform name="effectSettings" value="Normal Specular Parallax AO"/>

 

Link to post
Share on other sites
1 minute ago, DanW58 said:

Not sure I understand.  Means I have to have parallax in order to get ao?

No. Those XML files are materials used by other xml files called actors in art/actor/*

That's where we control the intensity of the effects. Most models share the same materials.

My point was that by tweaking those values you could make AO stronger.

Link to post
Share on other sites

I see.  The last number in settings, that's the ao strength?  It should be 1.0 universally.

Search and replace  "0.85"/>"  -->  "1.0"/>"

Search and replace  "0.6"/>"  -->  "1.0"/>"

Search and replace  "0.777"/>"  -->  "1.0"/>"

I'm going to start a movement one of these days, the "Anti-Tweak Front".

.../art/actors/what?  There's many folders...

Edited by DanW58
Link to post
Share on other sites
23 minutes ago, DanW58 said:

Search and replace  "0.85"/>"  -->  "1.0"/>"

Search and replace  "0.6"/>"  -->  "1.0"/>"

Search and replace  "0.777"/>"  -->  "1.0"/>"

I'm going to start a movement one of these days, the "Anti-Tweak Front".

Yay! Down with workarounds!

Link to post
Share on other sites
5 minutes ago, Stan` said:

public/art/materials doesn't exist.  Maybe that's the problem :)

Or should I change the files IN that webpage?   I'm confused, Stan.

4 minutes ago, vladislavbelov said:

Yay! Down with workarounds!

That's the spirit!  Maybe we could have this parameter ignored;  might be easier than change hundreds of xml files...

Link to post
Share on other sites
4 minutes ago, DanW58 said:

public/art/materials doesn't exist.  Maybe that's the problem

Huh. it should

image.png

I can fix the AO values now if that's wanted, but I'd like to be somehow sure it won't cause bad side effects for the release. (eg too strong AO)

Link to post
Share on other sites

Don't worry, Stan, AO baking is standardized;  it cannot be too light or too dark;  it is not tweaked.

What we're doing is lighting by the optics book.  If it looks wrong it's because of a problem elsewhere, which we might as well discover instead of cover up.

Proceed without trepidation.  Go to town. ;-)

Edited by DanW58
Link to post
Share on other sites
1 minute ago, DanW58 said:

Don't worry, Stan, AO baking is standardized;  it cannot be too light or too dark;  it is not tweaked.

What we're doing is lighting by the optics book.  If it looks wrong it's because of a problem elsewhere, which we might as well discover instead of cover up.

Proceed without trepidation.  Go to town. ;-)

Baking yes, but in game? :) I like to not reveal bugs before a release :D Makes it more enjoyable for the people

Link to post
Share on other sites
3 minutes ago, DanW58 said:

Nonono, we'll reveal them AND squish them.

Just make a backup.  Zip it.

I'm not sure going over 1000+ models using AO is gonna be on time for the release :)

Link to post
Share on other sites

Let's do 100 today, 100 tomorrow.  Or start with Ptolemaic today, Indians tomorrow, Egyptians day after...

 

 

But it would be better to get them all done at once, really.  Having disagreeing assets is not nice.

But in any case, you can zip the whole thing as a backup, should something really go wrong.

 

 

Or a third option:  Ptolemaic today, all of the rest tomorrow.

Link to post
Share on other sites

Oh, come on!

Just make a backup of PTOLs, change and fix, and then we'll see how easy or difficult it is, or how dangerous.

There's nothing to gain postponing.

We got plenty of things to work into 25;  this is a laughable change, work-wise.

It's also zero risk.

What's happening right now is that all the work that was put into ao is not showing.

This is just helping work from the past to finally make it in.

 

Edited by DanW58
Link to post
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.


×
×
  • Create New...