Advertisement Jump to content
Sign in to follow this  
jor1980

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

This topic is 1742 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!