Hi,
I’m creating an hex map grid overlay and I’m drawing a repeated mesh of a single hexagon and I’m
simply using .getAdditionalRenderState().setWireframe(true) to make it look like a grid.
However I would like the borders of the meshes to be thicker, can I set the border thickness of the wireframe or
would I typically solve this in another way? (I’m new to this stuff so…)
Thanks.
What is the “borders of the mesh”? The mesh itself is the border of an empty space normally, so all lines are on the border. If you want a thick “2D” line to “outline” the mesh like a cartoon has black lines around its borders then try using the ToonShader.
Just put this in your SimpleApplication and run it from the simpleinitapp method:
[java]private void setupProcessor() {
FilterPostProcessor fpp=new FilterPostProcessor(assetManager);
CartoonEdgeFilter bloom=new CartoonEdgeFilter();
bloom.setDepthThreshold(.2f);
fpp.addFilter(bloom);
viewPort.addProcessor(fpp);
}[/java]
1 Like
@Addez said:
Just put this in your SimpleApplication and run it from the simpleinitapp method:
[java]private void setupProcessor() {
FilterPostProcessor fpp=new FilterPostProcessor(assetManager);
CartoonEdgeFilter bloom=new CartoonEdgeFilter();
bloom.setDepthThreshold(.2f);
fpp.addFilter(bloom);
viewPort.addProcessor(fpp);
}[/java]
Ok wow, this looks really weird:

I think I need to solved this differently to look more nicely. I wanted thicker outlines with probably a little transparency,
so my current effort seems to go in the wrong direction.
So from what it looks like you just want all the lines thicker? Just do mesh.setLineWidth() then.
2 Likes
@normen said:
So from what it looks like you just want all the lines thicker? Just do mesh.setLineWidth() then.
Yes I just saw that, thanks.
1 Like