Hello,
I was learning about making cartoon edges, and I thought that removing all nodes from rootNode and adding them back in with cartoon edges would be a good way. If this is a good way to have cartoon edges that you can toggle, how do you remove all entities from rootNode? I am using Windows XP, Java 6, and JME3. Thank you!
dangerdoc
In the test example where it creates a CartoonEdgeFilter called âtoonâ, just toggle its âenabledâ flag with
[java]
toon.setEnabled(false);
[/java]
That will add/remove the edges without having to have duplicates of every geometry in the scene.
Also, filter post processors work on what is on the screen, so even if you removed the whole scene and added a new one in, as long as the CartoonEdgeFilter is enabled it will give you cartoon edges.
The âmakeToonish()â method in the test just sets the material on the objects in the scene, it doesnât create the actual edges.
TestCartoonEdge.java does cartoon edges for you. You do not want to be removing and adding spatials to the root node to achieve an effect.
Hi, Sploreq.
The reason I am asking about removing from rootNode is because I want to be able to toggle the cartoon edge in-game. Is there a way to do this that is different from my idea? I understand what you are saying about removing and adding, but Iâm not that experienced with cartoon edges. I might not even understand what you are saying, but I just want an effect that you can toggle in-game. Thank you!
dangerdoc
Thanks Sploreq,
I think that answered all of my cartoon edge questions!
dangerdoc