Learning C++, Terrain Generation

Started by
11 comments, last by jeskeca 8 years, 11 months ago

---------------

Advertisement

Ha ha, I've also been looking all over for that kind of information. The only information I can really find is http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/procedural-planets-part-1-structure-r2074 but even that doesn't quite cover what I want. But dont know if you found out yet, you should learn about perlin noise (or simplex noise) if you haven't already done so

Well, if you know C++, but don't know how to draw a triangle, start there. Pick DX or OpenGL and get to the point where you can render a triangle, then a simple model. Once you've got that down, I would move towards learning how to render a height map (the most common way to do terrain in most games). You don't need procedural generation until you can at least render what you've generated to see if it looks any good smile.png

Once you're able to render a heightmap, then you can start looking into noise functions and terrain generation - though I would recommend starting with flat terrain before moving on to spheres, as spheres are quite a bit harder to get right.

6 or 7 years ago, the hobbyist procedural planet scene was booming, but most of the big players from back then don't seem to have the time to dedicate to it anymore (sadly, myself included).

I do however maintain a list of interesting efforts/blogs/etc. over on my (mostly defunct) blog. Hopefully you find some of them useful, and if you have any suggestions for corrections or additions to that list, please let me know.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

haven't looked at swiftcoder's list yet smile.png

been coding for ages, but i'm poor and i'm a bastard, so i've spent decades eg. not being able to do things because i don't know how to install an sdk, et c. because nobody will tell me (truth - it took about four years for other coders to decide i deserved to know how to install the synthedit SDK with borland fclt, because they didn't want a helpful nice person coding all kinds of stuff that would take the money out of their pockets.. so they waited until they'd milked the market)

so - i have NO idea how other people do things. here's what i say (fwiw) -

fields that attract - games, music - are the more competitive and have the most trouble with good resources. it's not like gamedev or other game lists suck, but gamedev is the last place i would look for a tutorial. ymmv.

though i am inexperienced with it, i am thinking that it is better to pursue the demo scene - i'd think the people are less authoritarian, more egalitarian, and more willing to concentrate on sharing information that actually means something, and efficient methods. i feel like the methods in more commercial venues are babyfood, dumbed down and watered down..


....here's what i know about procedural planet, but i *know* my way is the slowest, and that it can be done much faster. i'd start with inigo quilez, and follow links for demo scene.. people who are concerned with the pith -


my planet (very very slow)
start with 3d perlin noise. simple concept.

more difficult: linear interpolation sucks for perlin (any # of dimensions)
other people say using cosine interpolation or s-curve interpolation (d = d * d * (3 - d - d)) iirc... looks good. i think it sucks. i think to look good, you need cubic interpolation.

cubic interpolation with 3d perlin ... HORRIBLE (it's 2nd order interpolation, so you need to do like 20 odd cubics to get one single pixel)



there are other ways of 3d spherical noise i have not explored - mapping six "square" regions to the sphere, like a plush cube.. or tesselating the surface with triangles (perlin's next noise method.. simplex iirc? i don't remember..)

of course, i do all rendering on cpu not gpu.. translating a perlin sphere to a 4096*2048 map took around two minutes on my old computer.

maybe it's faster with volumetric rendering, or something, but i have yet to find any source telling me how to do things efficiently.

i'd hit the demo scene, or, look at the age of my profile here.. in another 10 years you could still know only as much as me.. (well maybe you are a normal person who can buy books, i can't).

neither a follower nor a leader behttp://www.xoxos.net

I would also checkout: http://vterrain.org/

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532

--------------

Thank you all for the helpful messages, I'll definitely check all the links out, but SmkViper, rendering triangles and shapes is about where I'm up to, do you know of any tutorials on where I can pursue all that?

EDIT: So I've looked around through all the helpful stuff you sent me and I'm guessing I'm discovering the cold hard truth that learning this C++ stuff is not simple. I'm not a stupid person, but I always find it easier being taught via teacher or via video, and that's what I'm kinda looking for. But any of these resources help, probably just will take me a bit longer hehe.


I don't, sorry. Never really got past the "rendering triangles and sprites" phase myself (my interests ended up going in a different direction than graphics and I haven't messed around with it in my own time yet). There should be several tutorials on this site itself that can at least get you started though, and you can possibly go ask in the graphics sub-forum.

Check this out.
http://libnoise.sourceforge.net/index.html


EDIT: So I've looked around through all the helpful stuff you sent me and I'm guessing I'm discovering the cold hard truth that learning this C++ stuff is not simple. I'm not a stupid person, but I always find it easier being taught via teacher or via video, and that's what I'm kinda looking for. But any of these resources help, probably just will take me a bit longer hehe.

Have a look at some OpenGL tutorials and try it out.

http://www.gamedev.net/topic/667482-modern-opengl-tutorials/

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532

This topic is closed to new replies.

Advertisement