LightScattering creating obstacle for ray

Light Scattering Filter creates a successive layers behind object which are causing obstacle for my Ray



In this attached screen shot, the red dot shouldn’t hang in the air, there should be nothing there.But, it is colliding with sky(Spatial sky)







what i have to do to avoid this issue?



I am getting some weird result while using CartoonEdgeFilter(). Lines are being drawn, where it shouldn’t be.



Image attached shows the error:



Move the sky somewhere else (the cam doesnt have to be inside the sphere) or iterate through all collision results and ignore the sky sphere.

Move the sky somewhere else (the cam doesnt have to be inside the sphere)

I am really confused with this.Everything in the world should be inside the sphere isn't it?

The code is as follows,
[java] Spatial sky = SkyFactory.createSky(assetManager, "Textures/Sky/Bright/FullskiesBlueClear03.dds", false);
sky.setCullHint(Spatial.CullHint.Never);
rootNode.attachChild(sky);[/java]

What does setCullHint mean?

Iterating through all the collisions and removing sky from consideration will add overhead.I think, a ingnoreList for Ray might work better.

Should I work on this method?

Filters can’t interfere with collision test beause the only geometry rendered for a filter is a full screen quad that is not even in the scene graph.



Your problem comes from the skybox indeed, as Normen said.

The default skybox is a 10 radius sphere placed at the world origin. at render the depth buffer of this sphere is forced to 1.0 thus rendering it always in the far. But the skybox is still a 10 radius sphere in the middle of your scene in the scene graph.

So you can collide with it.





sky.setLocalScale(1000);



should do the trick

Or sky.setLocalTranslation(1000,1000,1000); :stuck_out_tongue:

Probably the normals are messing it up. You could perhaps put the sky in a different viewport from your primary viewport, then it won’t be effected by the CartoonEdgeFilter.

Probably the normals are messing it up.


As Nehon said,
The default skybox is a 10 radius sphere placed at the world origin. at render the depth buffer of this sphere is forced to 1.0 thus rendering it always in the far. But the skybox is still a 10 radius sphere in the middle of your scene in the scene graph.
So you can collide with it.


It was they skybox, that was creating the edge. :P

You could perhaps put the sky in a different viewport from your primary viewport, then it won’t be effected by the CartoonEdgeFilter.


How do I handle different view port?