Is it possible without it screwing up something? If SP (SceneProcessor) A has SP B, and whenever an overridding method in A (initialize, postQueue, etc) is called, a corresponding method in B is called within that method of A. I’m not too familiar with SceneProcessor or how their methods are exactly called/used.
Well first of all, why? Maybee there are better ways.
I don’t think SceneProcessors should be put together as they are somehow wired with the jme-scenery. Better you abstract the functions in A and B in other classes so that both processors have access to the stuff they need without interfering each other.
@EmpirePhoenix I was afraid that someone would ask this :P… I want to say that I asked because I was just curious, but I actually asked due to cluelessness and laziness.
Here’s the story:
I had problems with HDRRenderer (specific post), so I wrote a modified version that somehow fixed it. I also wanted to add bloom, but wasn’t sure if the built-in version was doing exactly the way I wanted to (I wanted to try the way they do “glare” in this page about HDR). Also, simply adding the built-in BloomFilter to the viewport after adding my custom HDR didn’t work for some reason. The screen just showed all gray. I think it has something to do with frame buffers and I screwed them up with my custom HDR, but I’m not knowledgeable on this stuff (ViewPort, Renderer, RenderManager, SceneProcessor, etc.), although I did learn a bit from modifying HDRRenderer. So I handled the bloom (rendered the scene with a custom bloom material and shader) within MyHDRRenderer. Then, I added FXAAFilter but that produced banding, so I put that within MyHDRRenderer too which handled floating-point framebuffers which solved that problem.
After that, I wanted shadows. Simply adding PSSMShadowRenderer to the viewport didn’t seem to change anything on display for some reason. Instead of investigating for the cause, I decided to handle shadows within MyHDRRenderer too. I did what I described earlier with A and B, A being MyHDRRenderer and B being PSSMShadowRenderer.
However, I ran into a weird problem. The shadows flicker (disappearing momentarily and reappearing) around every second. I have no idea what the cause was and thought that maybe encompassing a SceneProcessor into another one may be a possible reason.
I don't think SceneProcessors should be put together as they are somehow wired with the jme-scenery. Better you abstract the functions in A and B in other classes so that both processors have access to the stuff they need without interfering each other.
Guess I'll go do this.
What I want is this:
Add shadows -> Tonemap (HDR) -> Bloom (the bright parts) -> FXAA
Also, is there anywhere else where I can learn about SceneProcessors, Filters, and that kind of stuff other than from looking into source code and the javadocs?
Well yeah … to be honest i guess finding the bug in your hdr renderer (even fi it is by try and error commenting random lines out) will probably be faster in the end than reimplementing any feature that exist XD
You can try the wiki dont know if there is stuff in it, but worth a try, also try the forum search. Else than that of course the source code, wich is actually quite readable with investing a bit of time.
Yeah The HDR renderer should be made a Filter, right now you can’t use it with filters…which is a shame.
It’s been a long time we have this in the todos.
It would solve your problem.
Ok, I at least separated shadows from HDR, now it works for some reason… Well, what currently matters is that it works