3D Midpoint-displacement Terrain Generator

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

3D Midpoint-displacement Terrain Generator

Post by GijsB » Mon Oct 01, 2012 4:59 pm

Nothing really special, but it show's you how the midpoint displacement algorithm works. And you change some values with 'q,w,e,a,s,d,z,c' and you can generate an heightmap with 'space'.
Edit : Optimisation! Got rid of some unneccesary average calculating 4-10-2012
Attachments
3D midpoint displacement terrain generator.love
(1.29 KiB) Downloaded 227 times
Last edited by GijsB on Thu Oct 04, 2012 7:42 pm, edited 1 time in total.

mode7
Prole
Posts: 35
Joined: Tue Aug 21, 2012 5:45 pm
Contact:

Re: 3D Midpoint-displacement Terrain Generator

Post by mode7 » Wed Oct 03, 2012 11:07 am

Cool thing, but slooow. Maybe you should use a shader?

User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Re: 3D Midpoint-displacement Terrain Generator

Post by GijsB » Wed Oct 03, 2012 3:05 pm

mode7 wrote:Cool thing, but slooow. Maybe you should use a shader?
I should but i don't know how the whole shader thing works :oops:

So can somebody please give me some tutorial link xd?

mode7
Prole
Posts: 35
Joined: Tue Aug 21, 2012 5:45 pm
Contact:

Re: 3D Midpoint-displacement Terrain Generator

Post by mode7 » Thu Oct 04, 2012 8:21 pm

Same here!

Santos
Party member
Posts: 384
Joined: Sat Oct 22, 2011 7:37 am

Re: 3D Midpoint-displacement Terrain Generator

Post by Santos » Thu Oct 04, 2012 9:33 pm

I also have no idea how it works, but this article by Twofold Secret might be helpful.

User avatar
Ensayia
Party member
Posts: 399
Joined: Sat Jun 12, 2010 7:57 pm

Re: 3D Midpoint-displacement Terrain Generator

Post by Ensayia » Fri Oct 05, 2012 1:51 am

Sadly there's no current 'tutorial' for using shaders to any extent. The largest issue being that shaders have to be coded in the GLSL language which is nothing like Lua. You also have to dig though Google for the GLSL documentation on how the many enumerated datatypes work.

User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Re: 3D Midpoint-displacement Terrain Generator

Post by GijsB » Sat Oct 06, 2012 1:30 pm

Ensayia wrote:Sadly there's no current 'tutorial' for using shaders to any extent. The largest issue being that shaders have to be coded in the GLSL language which is nothing like Lua. You also have to dig though Google for the GLSL documentation on how the many enumerated datatypes work.
Damn that's pretty sad D: , but siriously i have no idea how this 'language' even works :/

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 21 guests