Sign in to follow this  
Dymytriy

OpenGL Terrain Painting

Recommended Posts

Hello to everyone. I need help. Have someone see Freeworld3D engine? I need something like it. This engine supports realtime painting on the terrain with texture as a brush. But I dont know how to implement this on OpenGL. With terrain rendering I havent problems, I dont know how to blend textures fast and dynamically. Thanx. Best regards, Dymytriy.

Share this post


Link to post
Share on other sites
Render the texture you want to edit (your alpha mask) to the screen in an orthographic projection from (0,0) to (texture width, texture height)

Render a quad with a alpha-mapped brush texture over the area of the mask you are painting (still in the orthographic projection)

Then copy that portion of the viewport back into the texture

When your comfortable with doing it that way, look up on how to use Framebuffer Objects for render-target textures. That way it will be even faster.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this