I just added a glow filter to make some edges in a graph glow. Unfortunately the glow fills the whole screen when moving the camera. It looks like the background is overdrawn with the rendered image and only where something moves, it doesn’t happen. Hope I explained it understandable. Here is a screenshot - might be a better description of my problem
@Override
public void simpleInitApp()
{
// GLOW
FilterPostProcessor fpp=new FilterPostProcessor(assetManager);
BloomFilter bloom = new BloomFilter(BloomFilter.GlowMode.Objects);
fpp.addFilter(bloom);
viewPort.addProcessor(fpp);
[...]
}
public Node createVirtualConnectionModel(
VirtualEdgeInfo info, CVirtualConnectionState state) {
Material mat = new Material(assets, "Common/MatDefs/Light/Lighting.j3md");
Node node = new Node("");
float width = .015f;
ColorRGBA color = ColorRGBA.Cyan;
mat.setBoolean("UseMaterialColors", true);
mat.setColor("Diffuse", color);
mat.setColor("Ambient", color);
mat.setColor("GlowColor",ColorRGBA.White);
Cylinder c = new Cylinder(3, 12, width, length, false);
Geometry cable = new Geometry("Pipe1", c);
cable.setMaterial(mat);
return node;
}
Some friend has shown this logic to me some time ago. I went to figure what’s wrong and if I remeber correctly, there is some division by zero happening in this logic.
The “how long is this piece of string I’m holding” thing used to be a regular meme on another mailing list I used to frequent. It was the standard response to anyone posting a question without providing any of the info necessary to solve it. Sometimes they would provide lots of info… just not any of it that matters. (Like the string color in this case.) It stuck with me. Only the person asking the question actually has any of the info necessary to answer their own question… and sometimes in the providing of the additional information they will solve their own issue.
OP forgot to include code. No big deal. Too often this leads to 20 other posts where people take random shots in the dark trying to help with insufficient information. I like to cut off the games of '20 questions" early and after having asked for code in excess of 1000 times it feels good to be a little more creative.
Missing stack traces are my ‘favorite’, though. That’s like having the box the string came in and just not even looking at the length printed right there.
P.S.: If it’s true that the filter is on the guiNode then the other fun thing is that the bad code wasn’t even provided. And then we get to why we ask for simple, and complete, test cases.
…except the critical bit where you aren’t clearing the background.
Once you attach a filter post processor to a viewport, you can’t show what’s behind it anymore as the framebuffer is managed by the FPP at that point.
Why not just put the image in your regular viewport?
Edit: in general, the problem with partial code snippets instead of full compilable test cases… is that the knowledge of ‘what’s important’ largely intersects with the knowledge to ‘solve the problem’. ie: if you knew exactly what was and wasn’t important then you probably wouldn’t be asking for help. Best to post more rather than less… and a fully functional single class test case is the absolute best way.
Ok. The background image is just for testing. Normally I have the camera picture of an android phone in the background. Will test tomorrow if this is a problem.
As someone that got my fair share of RTFM’s, LMGTFY’s, gief the needed code or exceptions and being pointed towards the XXX for noobs, I’m in a good position to say there’s a reason for that: it’s actually quite a lot of work to express any of that without hurting someone’s feeling. People like pspeed, normen etc spend hours everyday helping us noobs and they have to be efficient for our own sake (and probably they own sanity)… and these are developer forums… hardly a place where we should expect third dan diplomats.
I wonder if there would be a somewhat easy way to add, in red, on the top of the list of somewhat close questions, a couple sentences to avoid people repeating those same mistakes everyday; something such as:
have you googled your question first?
have you read the math for dummies / scenegraph for dummies / transparency for dummies / the main documentations?
if you still didn’t find the answer, please provide:
** the full exception stack if there is one
** either the full concerned code or a test case
** make sure you tell people what you are trying to achieve
** an image if it would be efficient at showing the problem
And if the person failed there then it should be ready to accept it might look bad for that reason.
NB: or maybe have that text appear in the content box of the question when a new thread is started.
But mostly, we all should be less ready to jump in a fight for nothing.
Not jumping on the poster as I have done all those errors myself.
* facepalm * … didn’t add it to the gui node he said … Later on he posts that he set the clear flags … effectively doing to the normal view port what is done to the gui node. I agree with @pspeed. If you don’t know what is wrong please post the entire code block so someone can help you understand what’s wrong. Red string strikes again.
Don’t mind me. I just woke up from a long night of coding a metal shader.