How to set openGL lights to make my mesh viewer looks like a blender

Started by
0 comments, last by BlueSpud 10 years ago

I am making a meshviewer using jme3, i would like to preview the meshes as Blender does in the default view.My result is very poor and I think that i s a question of lights settings. I would like to set them as blender does, so i opened blender preferences, went to system tab and there I saw the lights but I don´t know how to see their values to set the lights into my project. If someone know another way to achieve what i want it would be very useful for me.

here i left a capure of a mesh in my viewer and the same mesh saw in blender default view, to explain what i want to make:

wl6t.jpguylo.jpg

Advertisement

You're going to want to look into shaders. If you aren't familiar with shaders, they let you preform complex instructions for rendering things. The default OpenGL lighting is fixed and can't be manipulated. Enabling the OpenGL lighting will start you in the right direction. Look into GLSL, the OpenGL Shader Language. You can create per pixel lighting which looks a lot better than opengl's fixed functionality. Theres so much you can do with shaders but they can get really complicated really fast if you don't know what you're doing. Before you jump straight into lighting, try other things like doing textures and solid colors. If you plan on doing lighting beyond the blender-style render I suggest looking into deferred shading - http://en.wikipedia.org/wiki/Deferred_Rendering. Basically you render all sorts of information lighting needs to a buffer. This is a lot faster and more efficient with multiple lights. Good luck!

This topic is closed to new replies.

Advertisement