Couple questions and showcasing what I have done as of late

Lately I have been focused completely on writing shaders for rendering things the way I would like them to be displayed. I grabbed a couple of screen shots to show what I have accomplished so far… however, I wanted to ask a couple questions before proceeding with some of the stuff I need to extend or rewrite.



To start… here is what I have been up to:


  1. Texture splatting shader
  2. Tiling/scaling shader for detail up close
  3. Final models for characters/npcs
  4. Animations.
  5. Use of mesh deformation for vegetation wind movement/water ripple/wave effects.
  6. Perspective doubling

    And a slew of other things… here be some screen shots.











    Now… on to the questions. My fog is all rendered via shaders. I need to update the PssmShadowRenderer to account for fog rendering… I’d also like to apply blurring to shadow edges. I know the approach I’d like to take for both, however, before I get to it… I’m wondering if someone knows if the end shadows are rendered and overlaid… if so, I can simply update the Material and shader.



    I’m only asking because I have such a huge list of things I am working on… that it would be a huge help to hear from someone who is familiar with the shadow renderer so I can decide on a course of action while it is on my mind. (Currently working on other crap… etc, etc)



    Anyways… thanks in advance for the assistance!!!
3 Likes
@normen said:
The shadows are overlaid as a post effect afaik, yeah.

Not really. Not a post effect as in filter effect.
The scene is rendered again with the shadow material with an alpha/modulate transparency once the main render is done.
If you want to apply fog after shadows, your best bet is the fog filter.
For edge blurring try to use PCF4 or PCF8 on the PSSMShadowRenderer. (setFilterMode)

Nice job on what you’ve accomplished so far :slight_smile:

The chat looks a lot like Runescape’s though ^.^



I wish I could answer any of your questions but I just started learning about shaders, so I wouldn’t know :open_mouth:

The shadows are overlaid as a post effect afaik, yeah. Great job with your game there ma’am :slight_smile:

@nehon actually a idea i wonderd about, would it be possible to use the gaus filters on the shadow map? Since then you could do two passes (vertical horizontal) and get maybee away with a pcf16 or even pcf32 with acceptable performance.

You can’t because shadow maps are depth maps.

There are alternative to this using luminance maps instead of depth maps that can be blurred, but it has a lot of other implication and a lot of other draw backs.



I also thought of rendering the shadows to a frame buffer and apply a post process blur, but that creates leaking shadows over nearby objects and the result is ugly.

@nehon said:
Not really. Not a post effect as in filter effect.
The scene is rendered again with the shadow material with an alpha/modulate transparency once the main render is done.
If you want to apply fog after shadows, your best bet is the fog filter.
For edge blurring try to use PCF4 or PCF8 on the PSSMShadowRenderer. (setFilterMode)


Either way... the PSSMShadowRenderer has to be using a material to render with, yeah? If that's the case, I would prefer to modify the material/shader it is using being that the difference between shader based fog and the post filter is night & day.

And thanks for the hint about edge blurring! Though... I guess it depends on performance as to whether it is worth it. Overall... I see a very little performance hit using the PSSMShadowRenderer as is. Very nice stuff!

@normen said:
The shadows are overlaid as a post effect afaik, yeah. Great job with your game there ma'am :)


Thank you sir! Been hard at work tackling shit I don't understand... but barreling my way through it. I was not cut out for 3d modeling/animation. I'll do it out of necessity... but I would prefer to never touch it ;) It is grueling, tedious and overall, a fundamental joy of life /blech
@reveance said:
Nice job on what you've accomplished so far :)
The chat looks a lot like Runescape's though ^.^

I wish I could answer any of your questions but I just started learning about shaders, so I wouldn't know :O


Thanks, u!
@t0neg0d said:
Either way... the PSSMShadowRenderer has to be using a material to render with, yeah? If that's the case, I would prefer to modify the material/shader it is using being that the difference between shader based fog and the post filter is night & day.

Well then I guess you have your own lighting shader right?
in that case you should have a postShadow Technique in your j3md, just replace the postShadow15.frag and postShadow.frag by your own shaders.
Then you can copy those shaders and just add the fog code to them.
@nehon said:
Well then I guess you have your own lighting shader right?
in that case you should have a postShadow Technique in your j3md, just replace the postShadow15.frag and postShadow.frag by your own shaders.
Then you can copy those shaders and just add the fog code to them.


Thank you, thank you, thank you! Yes... I am using my own shaders for everything. Of course, a lot of the code is based off of the shaders provided with JME3 as they freakin' rock. But to ensure that everything renders in a way that looks like it was created for the same game, I rolled my own. I have global methods for updating fog info with textures... between that, the ability to fade in/out texture layers in the texture splatter and the weather system I have been working on, I'm able to have it snow and the snow slowly builds up on the ground. It makes for some really great looking visuals at acceptable frame rates.

I'll post a vid as soon as I get around to updating the shader used for shadows. Right now, I'm knee deep in making sure that all zone texturing is applied in a common way (i.e. xml definition for texture splatting, tiling, scaling, shader choice, shadow mapping, etc, etc so I can get the kind of detail I am looking for in the indoor zones, as well as the outdoor zones).

Almost done with it.