Jump to content

  • Log In with Google      Sign In   
  • Create Account

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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 jor1980   Members   -  Reputation: 142

Like
0Likes
Like

Posted 12 April 2014 - 07:08 AM

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



Sponsor:

#2 BlueSpud   Members   -  Reputation: 422

Like
0Likes
Like

Posted 13 April 2014 - 09:14 PM

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!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS