Hello,
does someone know why the cartoon edge filter deletes my background?
See attached images…
Without Cartoon Filter…
With Cartoon Filter…
Thanks.
Regards,
Equi
Hello,
does someone know why the cartoon edge filter deletes my background?
See attached images…
Without Cartoon Filter…
is your background a quad ?
Are you using a different viewport for the background?
Possibly, you should to put your “Background” code into simpleUpdate() method…???
Hello,
yes indeed, the background is a simple quad and it is added to a background node with an own viewport. Does this matter?
My update method and some init method looks like this…
[java]
@Override
public void update() {
try {
if (speed == 0 || paused) {
return;
}
super.update();
float tpf = timer.getTimePerFrame() * speed;
secondCounter += timer.getTimePerFrame();
int fps = (int) timer.getFrameRate();
if (secondCounter >= 1.0f) {
fpsText.setText(framesPerSecond + fps);
secondCounter = 0.0f;
}
// update states
stateManager.update(tpf);
// simple update and root node
/**********************************************************
The quad has 0 width.
So cartoon edge filter may think you want it “covered”.
I have never used it so i cant answer with certainty.
Filters work on a single viewport, so if you attach a filter to a viewport that has a black back ground the resulting image will have a black background.
try this for your gradient background, that’s a better solution http://hub.jmonkeyengine.org/groups/general-2/forum/topic/background-gradient/?topic_page=2&num=15#post-118379
it will be in the same viewport and it will render fine with filters
Hello,
works perfectly, thanks a lot.
Some other short questions.
1.) Does it matter if I put my “BackgroundGradient” geometry to the root node or to any other node below the root node? It seems to have no effect on the result. why? Because everything is rendered to “infinity”, to the “sky”?
2.) If I remove my background gradient, I have to set clearColor flag in my ViewPort. Is this correct?
3.) I have now realized that I have to put a geometry to queuebucket sky and to cullhint never. If I use a vertexcolormesh material on my geometry and color the indices in my mesh (which is set to sky and never) it is not shown. I used the shader proposed by Nehon
http://hub.jmonkeyengine.org/groups/general-2/forum/topic/background-gradient/?topic_page=2&num=15#post-118379
but I want to be more flxible and let the user vary the colors. So why not use a vertexcolor material and set the vertex colors in my mesh I thought. However, this does not work. why?
thanks a lot again.
Regards,
Equi