any one used this? it doesnt work for me
I want somthing like this:
I donât know what âdoesnât workâ means exactly or what you tried⌠but note that you can get a similar effect without any special material or anything.
For example, create a geometry with the same mesh and a regular unshaded material called wireMaterial. Then give it the following settings: (or something like it)
wireMaterial.getAdditionalRenderState().setWireframe(true);
wireMaterial.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
wireMaterial.getAdditionalRenderState().setLineWidth(2);
wireMaterial.getAdditionalRenderState().setPolyOffset(-3f,-3f);
wireMaterial.getAdditionalRenderState().setFaceCullMode(RenderState.FaceCullMode.Front);
That will look very much like the examples in the linked code. If you want the glow effect then you would need bloom in object mode or something with the glow color set on the material.
Itâs too early guys . Also the lib uses Paulâs technique. There is no magic there. Does the Test work?
6 am was indeed âtoo earlyâ
no, itâs not like the Image I post.
no, test doesnt work.
But what is âdoesnât workâ. You need to be a lot more specific.
indeed, you need provide stack trace of error or something that would help fix.
there is not an error.
when I used OUTLINER_TYPE_FILTER nothing changed at all.
when I used OUTLINER_TYPE_MATERIAL a mesh added to the scene but in vector3f.zero position and not changing by the model animation, and have not correct scale.
I need something straightforward like this:
can I use shaderblowlib to do that?
Scaling works. I checked it with cube.scale(2.0f) in the Test. As for animation I havent tested it so I cannot say anything. OUTLINER_TYPE_FILTER should work. Please provide a screen from your scene
1-is it geometry? or a node(parent) of other geometries?
2-I checked the test and it works with cube but not with an animated human model. is it working when playing an animation?
Itâs a Node (parent) and itâs working fine when playing an animation (see below video):
In this video Iâm adding 2 simple models, one of them is the green Ninja which you can find in many JME sample codes, The other one , the Dragon can be downloaded from Sketchfab.com , Then Iâm playing some animation on both models and showing the scene in debug view and regular view.
can you please show me how to use the outlier code?
Iâm using it according to the sample code. Not doing anything specialâŚ
public void showHideOutline(Spatial sp, boolean show) {
if(outliner==null) {
initOutliner();
}
if(show) {
outliner.select(sp);
} else {
outliner.deselect(sp);
}
}
private void initOutliner() {
FilterPostProcessor fpp = new FilterPostProcessor(assetManager);
viewPort.addProcessor(fpp);
outliner=new SelectObjectOutliner();
outliner.initOutliner(SelectObjectOutliner.OUTLINER_TYPE_FILTER, 2, ColorRGBA.Yellow,rootNode,fpp, renderManager, assetManager, cam);
}
which version of the JME? I used 3.2st but not working at all.
I was curious when I saw this thread, so I added the Outliner in my projcet, and I just tested it on JME 3.2 and it works.
I did find that using SelectObjectOutliner.OUTLINER_TYPE_FILTER
works but using SelectObjectOutliner.OUTLINER_TYPE_MATERIAL
did not work.
I was able to fix the Material mode by attaching the new wireframe geometry to the target spatial, rather than attaching it to the rootNode as it was previously coded.
Also thanks you @polinc for the very useful library! I like using filter mode for outlining friendly players, since the Filter mode continues to show the outline even when the the outline object is behind other spatials and out of line-of-sight.
Whereas the material mode is useful for objects that need the outline to abide by the usual scene depth.
If youâre using FilterMode on 3.2 then it should be working. If not, then my best guess would be that youur filterPostProcessor is not setup correctly, or youâre passing in bad/null references to assetManager and renderManager.
This type of thing will be nice for red vs blue in pk games. I was going to use a halo but this is much better.
I was able to fix the Material mode by attaching the new wireframe geometry to the target spatial, rather than attaching it to the rootNode as it was previously coded.
Thanks for pointing this out. Actually the lib doesnât force you to use rootNode . My mistake was to use ârootNodeâ name for a variable. I pushed changes and commented the methods.