Jump to content
  • Advertisement
Sign in to follow this  
Dymytriy

OpenGL Terrain Painting

This topic is 4260 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

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!