Jump to content

Post-processing effects test (SSAO/HDR/Bloom)


Recommended Posts

Well, there is something that is odd: last week I posted some issues with flickering, probably related to normals and my macbook's drivers. I have really tried to trigger this flickering with the current GLSL code, but I guess I have to accept it is gone :D

While I didn't fix that, maybe somebody else did.

Now, I did run into a problem when setting the renderpath to fixed (with preferglsl, gentangents, and smoothlos set to true, quality level 10). This gave a problem related to the LOS, I think. Setting smoothlos to false circumvents the problem. Maybe the smoothlos setting should be ignored if the renderpath is fixed (or there may be a fix, I don't know). A stacktrace can be found in the attachment, the crash happens right after pressing Start Game.

That's as expected, and probably not worth worrying about/fixing.

Is that by setting preferglsl and gentangents to false?

Yup.

Incidentally, is smoothlos supposed to work when preferglsl is set to false?

It'll work, but by using a GLSL shader by force. That is, it'll fail on PCs that don't have GLSL support.

Link to comment
Share on other sites

It'll work, but by using a GLSL shader by force. That is, it'll fail on PCs that don't have GLSL support.

Ah, I see. It just threw me off a bit when I saw it was still working.

Anyway, I haven't encountered any problems with ARB either. There was something in Atlas though (with preferglsl set back to true), with the "Grass/Grass1 spring fancy" brush texture. When I draw this on to the terrain with the left mouse button it blends with the surrounding textures as expected, if I then draw a different texture over part of this grass texture (also with the left mouse button) then they don't blend together properly. Likewise if I draw this grass with the right mouse button, then the grass doesn't blend nicely with the texture under it. The terrain highlighting around the cursor disappears over this texture as well.

post-14655-0-79993700-1344465355_thumb.j

Link to comment
Share on other sites

halcyonXII, that's because there's no render sorting in the terrain renderer, and it's probably not practical to try to add it. It's somewhat possible to hide the artifacts, by first painting the terrain with a simple grass texture and then painting the fancy grass on top. However, that material is more likely to be used for decals instead of terrain, where I believe this won't be a problem.

Gen.Kenobi, you just add a new UV map in Blender and the rest is handled automatically. One thing, though: you should be careful to put the new UV map after the existing UV map, because that's where the shaders expect to find it.

Link to comment
Share on other sites

I still get the black square thing, if the update has been added to SVN. Also, I don't see any fancy stuff on the Mars temple, I'm I the only one with this problem? Or did you forget to commit the textures? :)

But anyway, its great to have all this in! Smooth LOS and the windy trees look amazing! (y) Now, the ball's in our court ;)

Link to comment
Share on other sites

I still get the black square thing, if the update has been added to SVN. Also, I don't see any fancy stuff on the Mars temple, I'm I the only one with this problem? Or did you forget to commit the textures? :)

But anyway, its great to have all this in! Smooth LOS and the windy trees look amazing! (y) Now, the ball's in our court ;)

I think you have to recompile to get the black square fix, but it's fixed by now painting anywhere on the map.

For the mars temple try looking for the actor mars_temple2

Link to comment
Share on other sites

Question. Which actor materials do I choose under these circumstances?

Player color. Specular map. (no other maps)

No player color. Specular map. (no other maps)

If I choose basic_trans_ao_parallax_spec.xml or player_trans_ao_parallax_spec.xml I get errors if I don't specify ao and parallax maps. I just want spec maps on a few things (Iberian bull statue for example), and specular+player for helmets, shields, units, etc.

Link to comment
Share on other sites

You need two new materials. Simplest way is to make a copy of player_trans_ao_parallax_spec and delete the effects you don't need. e.g:


<material>
<shader effect="model"/>

<define name="USE_PLAYERCOLOR" value="1"/>
<define name="USE_SPECULAR_MAP" value="1"/>

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

In one of the materials just remove the "USE_PLAYERCOLOR" line to disable player color. The "50.0" value is the specular power (look at the comments in player_trans_ao_parallax_spec).

In the actor, reference the material you created and add an entry for "specTex" that points to the specular map you want to load.

Link to comment
Share on other sites

You need two new materials. Simplest way is to make a copy of player_trans_ao_parallax_spec and delete the effects you don't need. e.g:


<material>
<shader effect="model"/>

<define name="USE_PLAYERCOLOR" value="1"/>
<define name="USE_SPECULAR_MAP" value="1"/>

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

In one of the materials just remove the "USE_PLAYERCOLOR" line to disable player color. The "50.0" value is the specular power (look at the comments in player_trans_ao_parallax_spec).

In the actor, reference the material you created and add an entry for "specTex" that points to the specular map you want to load.

Thanks, that worked for the most part. I got an error when trying it on a unit actor, but it worked perfectly for a helmet (player trans+spec) and the Iberian bull statue (simple spec map). I am committing. Can someone see what's wrong with the unit actor that's throwing the error? (mace_hero_craterus)

Link to comment
Share on other sites

Mythos, done. Try now. (doesn't need recompile)

Thanks. Works. (y) It looks like spec maps for units probably won't be necessary, unless the unit is wearing tons of bronze.

Another thing I noticed, is that the particle effects are now different or messed up. They don't look right anymore. Anyone else notice this as well?

SWydy.jpg

The particles are super thick (emitting too fast?) and the textures look stretched vertically. My settings are:


; Quality level of shader effects (set to 10 to display effects)
materialmgr.quality = 10

; Prefer GLSL shaders over ARB shaders (not recommended). REQUIRES gentangents=true.
preferglsl = true

; Generate tangents for normal and parallax mapping. REQUIRES preferglsl=true. Incompatible with gpuskinning.
gentangents = true

; Experimental probably-non-working GPU skinning support; requires preferglsl; use at own risk
gpuskinning = false

; Use smooth LOS interpolation; REQUIRES preferglsl=true.
smoothlos = true

Link to comment
Share on other sites

When is planned Alpha 11? I'd like to test all the new effects before the release, but I am unable to do it until about 10 days.

Assuming we want to get the sound system in place for A11, and it seems we do, I would say a week after it gets committed at the earliest, as we'll need time to test that as well. All subject to change of course :)

Mythos, I believe the GLSL implementation of that shader looks a little different from the ARB implementation. Nothing to do with these changes, I think.

Hmm, can the GLSL version be tweaked to have identical looking particles? It's a shame if we have all these nice new effects but particles become ugly.

Link to comment
Share on other sites

Mythos, I believe the GLSL implementation of that shader looks a little different from the ARB implementation. Nothing to do with these changes, I think.

It has something to do with these changes, because it didn't happen before. ;) But I guess what you mean is that the particle shaders need fixed, rather than your new code needing fixed. Amirite? :)
Link to comment
Share on other sites

It has something to do with these changes, because it didn't happen before. ;) But I guess what you mean is that the particle shaders need fixed, rather than your new code needing fixed. Amirite? :)

Well yes, if you put it like that! ;)

Don't get me wrong, this is just how I always work: I like to separate the regressions from the stuff that was already broken. It's my way of not going a step backward every time I take a step forward.

Link to comment
Share on other sites

Hmm, can the GLSL version be tweaked to have identical looking particles? It's a shame if we have all these nice new effects but particles become ugly.

I'll give it a try now. It shouldn't be too hard to figure out.

Since the GLSL and ARB shaders look different, the quick fix would be to go in the shaders/effects folder, find the "particle*" effects and remove the reference to the GLSL shader, so the ARB shader always gets used.

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...