terrain

How to get angles value of perspective camera in Three.js?

六眼飞鱼酱① 提交于 2019-12-07 08:27:38
问题 How can I get the value from each angle of my perspective camera in 3D scene. I'm using Three.js library. To be more accurate, I shall mark what I want to get known with the next sign: What coordinates I need to know: It's needed for me, because I'm creating a real mode map engine with moving in 3D scene via mouse cursor. What I'm trying to achieve is available here: http://www.zephyrosanemos.com/windstorm/current/live-demo.html As you could see, in this sample, new terrain is loading with

Is it possible to show terrain maps with Android MapView class

寵の児 提交于 2019-12-06 15:20:21
Is it possible to show terrain maps similar to this http://maps.google.com/maps?hl=en&ie=UTF8&ll=45.699466,6.389236&spn=0.327066,0.861053&t=p&z=11 using MapView class? You can swap styles of the map with .setSatellite(true or false); true for sattelite map false for road map. This style of map is not supported, yet. 来源: https://stackoverflow.com/questions/6795705/is-it-possible-to-show-terrain-maps-with-android-mapview-class

Issue with Terrain Collision using Three.js

瘦欲@ 提交于 2019-12-06 15:01:49
I have created a terrain via a heightmap in Three.js and am using mrdoob's misc_controls_pointerlock for collision and movement. However, when I do objects.push(terrainobj); the performance goes down to about 3fps (from around 60) and there is no collision with the terrain. The collision is achieved via rays. How can I get around this? If it's just a heightmap you could avoid using ray and do the collision checking right in the bitmap (using canvas and imagedata). You just need to convert your XZ world position to the XY pixel in the heightmap. Then, if your Y position in the world is lower

Estimate the gradient of an undefined surface

余生长醉 提交于 2019-12-06 03:37:22
问题 I want to estimate the gradient (slope and aspect) of an undefined surface (i.e., the function is unknown). To test my methods, here is the test data: require(raster); require(rasterVis) set.seed(123) x <- runif(100, min = 0, max = 1) y <- runif(100, min = 0, max = 1) e <- 0.5 * rnorm(100) test <- expand.grid(sort(x),sort(y)) names(test)<-c('X','Y') z1 <- (5 * test$X^3 + sin(3*pi*test$Y)) realy <- matrix(z1, 100, 100, byrow = F) # And a few plots for demonstration # persp(sort(x), sort(y),

Making the diamond square fractal algorithm infinite

一世执手 提交于 2019-12-06 03:01:41
问题 I'm trying to generate an infinite map, as such. I'm doing this in Python, and I can't get the noise libraries to correctly work (they don't seem to ever find my VS2010, and doing it in raw Python would be way too slow). As such, I'm trying to use the Diamond-Square Algorithm. Would it be possible, in some way, to make this technically infinite? If not, should I just go back to attempting to get one of the Python noise bindings to work? 回答1: This can be done. Divide up your landscape into

Three.js texturing terrain on a spherical hexagon grid map

假装没事ソ 提交于 2019-12-04 20:49:36
问题 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

Tweaking Heightmap Generation For Hexagon Grids

拟墨画扇 提交于 2019-12-04 15:03:27
问题 Currently I'm working on a little project just for a bit of fun. It is a C++, WinAPI application using OpenGL. I hope it will turn into a RTS Game played on a hexagon grid and when I get the basic game engine done, I have plans to expand it further. At the moment my application consists of a VBO that holds vertex and heightmap information. The heightmap is generated using a midpoint displacement algorithm (diamond-square). In order to implement a hexagon grid I went with the idea explained

Procedural generation of a constrained landscape

雨燕双飞 提交于 2019-12-04 08:12:04
问题 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.

Looking for a good world map generation algorithm [closed]

僤鯓⒐⒋嵵緔 提交于 2019-12-04 07:21:09
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I'm working on a Civilization-like game and I'm looking for a good algorithm for generating Earth-like world maps. I've experimented with a few alternatives, but haven't hit on a real winner yet. One option is to generate a heightmap using Perlin noise and add water at a level so

Making the diamond square fractal algorithm infinite

痴心易碎 提交于 2019-12-04 06:48:45
I'm trying to generate an infinite map, as such. I'm doing this in Python, and I can't get the noise libraries to correctly work (they don't seem to ever find my VS2010, and doing it in raw Python would be way too slow). As such, I'm trying to use the Diamond-Square Algorithm . Would it be possible, in some way, to make this technically infinite? If not, should I just go back to attempting to get one of the Python noise bindings to work? This can be done. Divide up your landscape into "tiles", and apply the midpoint displacement algorithm (as I prefer to call it) within each tile. Each tile