I want to know what algorithm JMonkeyEngine uses to solve rastering, visibility and lighting problems.
By rastering, I mean algorithms like Bresenham or DDA.
By visibility, I mean determining wich objects are behind wich. This includes algorithms like z-buffer and ray-tracing.
Where can I get info on this? If this is not solved by JMonkey, who solves these problems? Jogl or anything like that?
Thanks =p
jME uses OpenGL (LWJGL or JOGL) for rendering, so rasterization is done via hardware. Visibility is done with frustum and backface culling, a z-buffer is used on the GPU.
Lighting is also done in hardware, for jME3, lighting is done using a GLSL shader.
Thanks for the answer!
So that means there are no means available for the user to choose wich algorithms to use?
Not that I'm complaining nor anything, I just need to know this for a project =p
TaviO! said:
Thanks for the answer!
So that means there are no means available for the user to choose wich algorithms to use?
Not that I'm complaining nor anything, I just need to know this for a project =p
There's no need to choose algorithms. Just trust us, we know which ones are the best algorithms to use ;)
What are the differences in these features from the stable 2.0.1 version?
(If any, I suggest putting this comparison in the jME site. It would be a nice illustration for the engine evolution!
As was already mentioned, those algorithms are taken care by hardware. Meaning, any hardware accelerated application running on your computer will use whatever algorithms the GPU is using.
For comparison, you should look at more higher level algorithms such as spatial partitioning and LOD, rather than rasterization and visibility.
well the lightening can be partly changed, by using a material with another shader the algorithm ca be changed.
OpenGL without shaders uses Gouraud shading which is per-vertex. Lambert is used for diffuse and Blinn-Phong for specular.
jME3 lighting shader will normally use per-pixel lambert and standard phong for specular. It is possible to configure the shader to use per-vertex lighting, as well as blinn-phong instead of phong for improved performance.
Also, some recent changes were made that allow jME3 to use additional lighting models. You can now use Minnaert for diffuse, and WardIso for specular instead of Lambert and Phong. Also, you can shade along the tangent vector aligned with the light, instead of the normal.
Here’s a screenshot demonstrating all of jME3’s shading modes as of the latest SVN version:
Hey,
I wanted to change the ShadeState, but it seems, that this totally changed in version 3 of jME (haven’t used v. 2 before). So could you please give me a hint on howto change the shading mode?
It is possible to configure the shader to use per-vertex lighting, as well as blinn-phong instead of phong for improved performance.
I saw that I can set some material conf's, but how to switch between Gouraud Shading and Flat Shading for example?