terrain

How is a 3d perlin noise function used to generate terrain?

心不动则不痛 提交于 2019-12-03 23:41:40
I can wrap my head around using a 2D Perlin noise function to generate the height value but I don't understand why a 3D Perlin noise function would be used. In Notch's blog , he mentioned using a 3D Perlin noise function for the terrain generation on Minecraft. Does anyone know how that would be done and why it would be useful? If you are passing x , y , and z values doesn't that imply you already have the height? Marcel Jackwerth Well, Minecraft is about Mines. So, what Notch tried to solve was: "How do I get holes / overhangs in my world?" Since 2D perlin noise generates nice/smooth looking

Three.js texturing terrain on a spherical hexagon grid map

半腔热情 提交于 2019-12-03 13:56:41
This is more of an approach question, rather than just technical question. I have a generated sphere, broken down into hexagons as one mesh. Every hexagonal tile is a different kind of terrain, for instance, mountains, hills, ocean, planes, etc. I want to draw every terrain type in 3d as a set of several meshes, representing a corresponding terrain type. Now the big question is how can I adjust terrain meshes to every hexagonal face in runtime, depending on terrain type, which can also change during runtime, e.g terramorphing. Also considering the hexagons aren't exactly regular or equal.

Is there an easy way to get shadows in OpenGL?

有些话、适合烂在心里 提交于 2019-12-03 08:56:10
问题 I recently created some landscape code and added some diffuse lighting to the scene, however, to my disappointment, there are no shadows. I looked around the web for hours looking for ways to get shadows in OpenGL, however they all seemed terribly complicated; and very unique to their own demo programs. Are there any simple ways to make shadows? 回答1: No. Rasterization is very bad at this (even recent AAA games have noticeable shadow artefacts), but everybody lives with it. Solutions include

How to implement a Worms style destructible terrain in XNA?

你。 提交于 2019-12-03 02:24:02
问题 I want to prototype an idea for a game I have. The idea for this game is that the player will dig through the ground, creating tunnels and finding treasure. I'm looking to create 'worms style' terrain, with collision detection for the player wandering and jumping around the tunnels. Examples of this type of dynamic terrain can be seen in these pictures. My question is how is the best way to implement this type of destructible terrain? I am using XNA game studio. 回答1: There's some nice code at

Is there an easy way to get shadows in OpenGL?

巧了我就是萌 提交于 2019-12-02 23:01:31
I recently created some landscape code and added some diffuse lighting to the scene, however, to my disappointment, there are no shadows. I looked around the web for hours looking for ways to get shadows in OpenGL, however they all seemed terribly complicated; and very unique to their own demo programs. Are there any simple ways to make shadows? No. Rasterization is very bad at this (even recent AAA games have noticeable shadow artefacts), but everybody lives with it. Solutions include (approx. from easiest/poorest to best/hardest) : No shadows. Simply account for occlusion with darker colors.

Procedural generation of a constrained landscape

ぐ巨炮叔叔 提交于 2019-12-02 21:23:43
I'd like to implement a procedural generation of a terrain. After a thorough research I came up with a conclusion that it should be implemented with one of the gradient (coherent) noise generation algorithms, for instance Perlin Noise algorithm. However, I don't want the generation to be completely random. I'd like to apply some constraints (like where should be a mountain range, or where should be a lowland etc.). Question: For example I have a curve which represents some landscape element. The curve is an array of points. How can I improve the Perlin Noise algorithm, so that along this curve

How to implement a Worms style destructible terrain in XNA?

∥☆過路亽.° 提交于 2019-12-02 15:56:31
I want to prototype an idea for a game I have. The idea for this game is that the player will dig through the ground, creating tunnels and finding treasure. I'm looking to create 'worms style' terrain, with collision detection for the player wandering and jumping around the tunnels. Examples of this type of dynamic terrain can be seen in these pictures. My question is how is the best way to implement this type of destructible terrain? I am using XNA game studio. There's some nice code at the bottom of the this thread . Also, this is a great step-by-step tutorial on achieving a destructible

Cesium - using camera to scale a polygon to match Lat-Lon positions while zoom-in/zoom-out

会有一股神秘感。 提交于 2019-12-01 10:28:28
问题 I am struggling with camera functionality that (I think) would provide a way to force my polygon to stick to the top of my house on zoom-out, zoom-in, and rotation (or camera move). This question follows an earlier question that was resolved. Now I need a little help resolving my next issue. The sample code I am trying to follow is located in the gold standard that appears to be baked into the existing camera controller here. pickGlobe is executed with the parameters of the viewer, the

WebGL - Textured terrain with heightmap

◇◆丶佛笑我妖孽 提交于 2019-11-30 08:47:39
I'm trying to create a 3D terrain using WebGL. I have a jpg with the texture for the terrain, and another jpg with the height values (-1 to 1). I've looked at various wrapper libraries (like SpiderGL and Three.js), but I can't find a sutable example, and if I do (like in Three.js) the code is not documented and I can't figure out how to do it. Can anyone give me a good tutorial or example? There is an example at Three.js http://mrdoob.github.com/three.js/examples/webgl_geometry_terrain.html which is almost what I want. The problem is that they create the colour of the mountains and the height

Multiple texture images blended together onto 3D ground

感情迁移 提交于 2019-11-30 07:07:40
How do computer games render their ground? I will be using a heightmap for geometry (though I will later optimize it) but I am wondering what the best technique is, for example, to 'paint' my ground; grass most everywhere, dirt paths here and there, gravel inside towns, and smooth transitions between each type of material. Do I just use a huge pre-baked texture? That seems very inefficient, when I could tile existing textures. So then do I use a huge alpha map for each existing texture? In theory it sounds okay to me but how do I actually go about doing that and what are the consequences? I