3D地图自动化相比人工优点2D地图有哪些优点

导航2D与3D地图有什么区别?_百度知道
导航2D与3D地图有什么区别?
3D地图区别于2D地图,从构成要素上来说,主要多了2类数据要素,分别是DTM(数字地形模型)和DSM(数字表面模型)。可以大概认为DTM是用来描述地面起伏的数据,高山、峡谷、盆地、丘陵等;而DSM是用来描述建筑物、树木等地面以上构建物高度、形状、轮廓的三维数据。3D地图的优势呢,简要来说就是:“好看”:更接近人的真实感官,平时我们看见一栋大楼、一座桥梁,都是有高度的,有跨越的,在2D地图中,这个维度实际是被抽象、概述掉了,而在3D地图中,有着相对2D地图更接近真实的还原。Eg1:2D地图中的两栋相邻建筑物:北京饭店和东方新天地,虽然经过了伪3D渲染,但还是看不出来高度差距有多大。但在3D地图(其实下面截图也不是真正意义的3D地图,业内的普遍称呼是2.5D仿三维)中,北京饭店和东方新天地两栋建筑物的高度、体量的区别就非常直观了。2.“好用”,有些应用场景就必须使用3D地图:因为相对于2D地图,多出了空间3维度的数据,可以利用软件进行一些3D分析计算。Eg2:电网输电线路的规划选址过程中,如果在2D地图中,A杆塔于B杆塔的直线距离是3千米,那么中间有3KM的线路就够用了吗?。但在现实中,是要考虑到A杆塔和B杆塔的高度落差及线路的自然悬垂的。Eg3:日照分析,结合经纬度及高程数据、高度数据,进行全年度建筑物阴影模拟:Eg4:可视域分析:我10年积蓄加上未来30年的收入全逃出来供的楼还没有交付呢,现在只知道是18楼中的9楼,对面是片低矮居民小区,不知道以后住进去了我家客厅窗外的风景如何呀?拿3D地图来模拟一下?Eg5:工头看我搬砖努力,踏(lei)实(si)认(die)真(le),打算承包给我一个挖土的活:平掉一个小山头,土填到旁边的沟里面,问我(拆东墙补西墙)够不够用?得挖多少立方量的土(挖掘机技术哪家强)?3D地图来帮你!
采纳率:99%
为您推荐:
其他类似问题
您可能关注的内容
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。3D地图相比2D地图有哪些优点? - 知乎有问题,上知乎。知乎作为中文互联网最大的知识分享平台,以「知识连接一切」为愿景,致力于构建一个人人都可以便捷接入的知识分享网络,让人们便捷地与世界分享知识、经验和见解,发现更大的世界。70被浏览<strong class="NumberBoard-itemValue" title="2分享邀请回答172 条评论分享收藏感谢收起44 条评论分享收藏感谢收起游戏蛮牛学习群(纯技术交流,不闲聊):
扫一扫,访问微社区
后使用快捷导航没有帐号?
签到成功!您今天第{todayrank}个签到,签到排名竞争激烈,记得每天都来签到哦!已连续签到:{constant}天,累计签到:{days}天
当前位置: &
查看: 5656|回复: 4
(原创)为Unity3D游戏生成2D和3D多边形随机地图(2/3)
本帖为抢楼帖,欢迎抢楼!&
5984/1000排名<font color="#FF昨日变化5主题帖子积分
熟悉之中, 积分 984, 距离下一级还需 16 积分
熟悉之中, 积分 984, 距离下一级还需 16 积分
蛮牛币1917
在线时间488 小时
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
才可以下载或查看,没有帐号?
原版Demo,稍后会放出改进版的Unity版本Ivan.ZRivers 河流Rivers and lakes are the two fresh water features I wanted. The most realistic approach would be to define moisture with wind, clouds, humidity, and rainfall, and then define the rivers and lakes based on where it rains. Instead, I’m starting with the goal, which is good rivers, and working backwards from there.
我想要地图里包含河流和湖泊。最通用的办法是先定义一个包含风,云,湿度和降雨的湿度图,然后在这个基础上定义河流和湖泊。相反,我先设定好地图上的河流,然后从这里倒退计算。The island shape determines which areas are water and which are land. Lakes are water polygons that aren’t oceans.
岛屿的形状决定了哪些区域是水哪些是陆地。标记为水的多边形除了海洋就是湖泊。Rivers use the downhill directions shown earlier. I choose random corner locations in the mountains, and then follow the Corner.downslope path down to the ocean. The rivers flow from corner to corner:
如前所示,河流使用了下坡的方向。我选择山峰的一个随机角落,然后按照Corner.downslope方向一路走向海洋。河流从一个角落流向另一个角落:
I tried both polygon centers and corners, but found that the corner graph made for much nicer looking rivers. Also, by keeping lakes flat, elevation tends to be lower near lakes, so rivers naturally flow into and out of lakes. Multiple rivers can share the lower portion of their path. Every time a river flows through an edge, I increase the water volume stored in Edge.river by 1. At rendering time, the river width is the square root of the volume. This approach is simple and works well.
我分别尝试过使用多边形的中心和角落来计算河流,最后发现还是角落的图集生成的河流更好看。此外,通过保持湖泊的平坦,靠近湖泊的海拔自然趋向更低,所以河流很自然的流入和流出湖泊。多个河流可以共享它们的部分下游路径。每当一条河流经过一条边缘,我就会将存储在Edge.river 变量里的水量加1。这样在渲染的时候,河流的宽度就是水量的平方了。这种方既简单效果又好。Moisture 湿度图Since I’m working backwards, I don’t need moisture to form rivers. However, moisture would be useful for defining biomes (deserts, swamps, forests, etc.). Since rivers and lakes should form in areas with high moisture, I defined moisture to decrease as distance from fresh water increases. Corner.moisture is set to a^k for some a & 1 (e.g. 0.95), and k being the distance. There are unfortunately some tuning parameters in Map.assignCornerMoisture that I tweaked until the maps looked reasonable:
由于我是逆向工作的,所以不需要一个湿度图来生成河流。然而,湿度图对于定义生物群落 还是很有用的(比如沙漠,沼泽,森林等)。由于河流和湖泊要从高湿度的区域发起,我定义湿度的规则为随着远离淡水则降低水分 。Corner.moisture被设定为a^k(a的k次方),注意a永远&1 (例如0.95),并且k作为远离淡水的距离。不幸的是我需要手动调整Map.assignCornerMoisture 参数,直到地图看起来合理为止。As with elevation, I redistribute moisture to match a desired distribution. In this case, I want roughly equal numbers of dry and wet regions. The desired cumulative distribution is y(x) = x, so the redistribution code is very simple. I sort by moisture and then assign the moisture of each corner to that corner’s position in the sorted list. See Map.redistributeMoisture for the code.
和海拔一样,我重新分配了湿度直到符合期望的分布。在这种情况下,我希望干旱和湿润地区大致相等。所需的累积分布函数是y(x) = x ,所以分配代码是很简单的。我先按照湿度排序角落,然后按照每个角落在排序里的顺序分配湿度。查看代码里的Map.redistributeMoisture一值。In this map generator, moisture is only used for biomes. However, games may find other uses for the moisture data. For example, Realm of the Mad God uses moisture and elevation to distribute vegetation and monsters.
在这个地图生成器里,湿度只用来处理生物群落。然而,游戏可能会将之用在其他的地方。例如, Realm of the Mad God采用水分和海拔来分布植被和怪物。Biomes 生物群落Together, elevation and moisture provide a good amount of variety to define biome types. I use elevation as a proxy for temperature. If this were a continent generator, latitude might be a contributor to temperature. Also, wind, evaporation, and rain shadows might be useful for transporting moisture as humidity. However, for this generator I kept it simple. Biomes first depend on whether it’s water or land:
总之,海拔和湿度提供了足够的多样性来定义生物类型。我使用海拔来代理温度。如果这是一个大陆生成器,纬度可能是影响温度的主要贡献者。此外,风,水分蒸发和雨影区也会导致湿度的转移。不过,我保持了这个算法的简洁。生物群落首先依赖于地形是水面还是陆地。OCEAN is any water polygon connected to the map borderLAKE is any water polygon not connected to the map border, or ICE lake if the lake is at high elevation (low temperature), or MARSH if it’s at low elevationBEACH is any land polygon next to an oceanOCEAN是任何接触到地图边缘的水多边形。湖泊是任何没有连接到地图边界的水多边形,或者冰湖则是高海拔且低温度的湖泊,沼泽 则是低海拔的湖泊。海滩则是毗邻海洋的土地多边形
For all land polygons, I started with the Whittaker diagram and adapted it to my needs:
对于所有的土地多边形,我开始用Whittaker diagram算法来处理,并将之修改为适应我的需求:Elevation Zone Moisture Zone6(wet)54321(dry)
4(high)SNOWTUNDRABARESCORCHED
3TAIGASHRUBLANDTEMPERATE DESERT
2TEMPERATE RAIN FORESTTEMPERATE DECIDUOUS FORESTGRASSLANDTEMPERATE DESERT
1(low)TROPICAL RAIN FORESTTROPICAL SEASONAL FORESTGRASSLANDSUBTROPICAL DESERT海拔区 湿度区6(湿)54321(干)
4(高)雪地冻土荒原焦土
3针叶林灌木丛温带荒漠
2温带雨林温带落叶林草原温带荒漠
1(低)热带雨林热带季雨林草原亚热带沙漠Here’s the result:
这里是结果:These biomes look good in the map generation demo, but each game will have its own needs. Realm of the Mad God for example ignores these biomes and uses its own (based on elevation and moisture).
这些生物群落在这个地图生成器demo里看起来不错,但每个游戏都会有自己独特的需求。以 Realm of the Mad God为例,它忽略了这些生物群落,并使用它自己的算法(基于海拔和湿度)。Noisy Edges 噪声化边缘For some games, the polygonal maps are sufficient. However, in other games I want to hide the polygon structure. The main way I do that is to replace the polygon borders with a noisy line. Why would I want a polygon structure if I’m just going to hide it? I think game mechanics and pathfinding benefit from the underlying structure.
对于一些游戏,多边形地图就足够了。但是,在其他游戏里我想要隐藏多边形结构。我所用的方法是用扰乱的线条来替换多边形边界。如果我想要隐藏它为什么我还想要多边形结构。那是因为我认为游戏机制和寻路将会受益于这个底层结构。Recall from earlier that there are two graphs: one for Voronoi corners (1, 2 in the diagram below) and edges (blue lines), and one for polycon centers (A, B) and Delaunay edges (red lines) between them:
回想一下开始的时候,我们有两个图形:一个用于Voronoi 拐角( 下图中的1 , 2)和边缘(蓝线),还有一个用于多边形中心( A , B ),和他们之间的Delaunay 边缘(红色线):I wanted to make both types of line noisy without making them cross lines from other polygons. I also wanted to make them as noisy as feasible. I realized that points A, 1, B, and 2 form a quadrilateral, and I could constrain the wanderings of the line segment to that quadrilateral:
我想扰乱这两种类型的边缘,但又不想让他们再次相交。并且需要确保他们是可以被扰乱的。我意识到点A , 1 , B ,和2形成了一个四边形,我可以将扰乱后的线条片段约束在这个四边形内:I further divided the quadrilateral into four quadrilaterals. Two were usable for the red (Delaunay) edge and two for the blue (Voronoi) edge. As long as the lines stayed within their allocated space and met in the center, they’d never cross each other. That takes care of constraining them. Note that the quadrilater to divide it properly, I divide it at the midpoint of the Voronoi edge instead of at the intersection of the Voronoi and Delaunay edges.
我进一步将四边形分成四个四边形。两个用于红色(Delaunay)的边缘,还有两个用于蓝色(Voronoi)边。只要这些线段待在分配给他们的空间里,并且只在中心相交,那他们就永远不会互相相交。这需要谨慎制约他们。需要注意的是四边形未必是凸多边形;为了正确地将其划分,我从Voronoi 边的中点开始拆分而不是在Voronoi 和Delaunay 边的交叉点。The entire map can be divided up into these quadrilateral regions, with no space left over:
整个地图可以全部被划分成四边形区域,无一遗漏:That ensures that the noisy lines aren’t constrained any more than necessary. (I wonder if these quadrilaterals would be useful for game mechanics.)
这保证了扰乱线段除了必须的限制不会有更多要求了。(我不知道这些四边形对于游戏机制是否有用。)I can use any noisy line algorithm that fits within these constraints. I decided to subdivide the quadrilaterals recursively and stitch line segments together within the small quadrilaterals into a complete edge. The algorithm is in NoisyEdges.as, in buildNoisyLineSegments. The result is that the polygon edges are no longer straight:
我可以使用任何噪声算法,只要保证它们在约束内即可。我决定递归细分四边形和并将小四边形内的线段连成一个完整的边缘。该算法代码包含在NoisyEdges.as 的buildNoisyLineSegments 函数里。最终的结果是多边形的边缘不再笔直。There are three places to tune the noisiness:
有三个地方需要调整设置:The recursive function ends when the segments are shorter than some length. I have examples at segment size 7, segment size 4, and segment size 1. In the map demo I use segment size 1 for rivers and coastlines, 3 where biomes meet, and 10 elsewhere.当片段小于预定的值时,递归函数将会结束。这里有一些例子,分别是片段大小为7 , 片段大小为4 ,和片段大小为1 。在地图的demo里,我将河流和海岸线的片段值设为1,生物群落的片段值设为3,剩下的都设为10。There’s a tradeoff between how much of the space goes to the red quadrilaterals (Delaunay edges) and blue quadrilaterals (Voronoi edges). I set NoisyEdges.NOISY_LINE_TRADEOFF to 0.5.还需要权衡有多少空间属于红色四边形(Delaunay边)和蓝色四边形(Voronoi边)。我将 NoisyEdges.NOISY_LINE_TRADEOFF设置为0.5。There’s a range of random numbers in NoisyEdges.subdivide. In the current demo it’s from 0.2-0.8, but it can be up to 0.0–1.0. Also, the random numbers don’t have to be linearly chosen. More visual noise results if you avoid the space around 0.5.在NoisyEdges.subdivide 函数里有一个随机数范围。在当前的demo里是从0.2-0.8,但它可以设置为0.0-1.0。另外,随机数不必按照线性选择。如果您避免在空间被平均划分,就会获得更加噪声化的视觉结果。
Noisy edges turn out to have a large impact on the map appearance, especially for rivers and coastlines.
噪声化后的边缘对地图的外观有很大的影响,特别是对河流和海岸线。More noise 更多的噪声I’m generally a fan of noise in game art, and wanted to add a little bit of noise to these maps as well. In a real game map the noise might reflect vegetation or small variations in terrain. In the demo (mapgen2.as) I just filled the screen with a random noise texture by adding a noise bitmap on top. I also smoothed the borders between adjacent polygons by blending the colors in stages:
通常我都是推崇在游戏美术里添加噪声 ,但希望只添加一点点噪声到这些地图为好。在一个真正的游戏地图中,噪声可以用于反映植被或地形的微小变化。在演示( mapgen2.as )里,我只是用一个随机噪声贴图来填充屏幕。我还通过混合相邻多边形边缘的颜色来平滑边界。Here’s a rendering with 16,000 polygons, noisy edges, a noise texture overlay, and simple lighting:
这个渲染示例拥有16000个多边形,并噪声化边缘,噪声纹理覆盖,以及简单的灯光:Smooth biome transitions 平滑生物群落的过度A different way of blending the biomes at polygon boundaries is to build gradients using the elevation and moisture at each corner, and then assigning biomes per pixel:
还有一种混合多边形边界的生物群落的方式,就是使用海拔和湿度在各个角落创建一个渐变 ,然后分配给每个像素分配生物群落值。If the game doesn’t need an entire polygon to be the same biome, this approach can be useful for making more interesting boundaries.
如果游戏不需要整个多边形都是相同的生物群落,那这种方法可用于制造更有趣的边界。Distorted biome transitions 扭曲生物群落的过度Another way to make the map look less polygon-like is to distort the elevation and moisture maps:
还有一种使地图看起来不像多边形的方式就是扭曲海拔和湿度图。Add Perlin or random noise to the elevation and moisture at each pixel.Sample nearby points using Perlin or random noise to change the coordinate.添加Perlin或随机噪声函数到海拔和湿度图的每个像素。使用培林或随机噪声函数在坐标附近采样
Here’s an example of what this can do:
下面这个示例展示了可以做到什么效果:Adding noise to the elevation and moisture will produce “dithering” in the zones near transitions. Sampling nearby points using noise will distort the shapes of the boundaries.
将噪声添加到海拔和湿度图会导致在区域过度附近产生“抖动”。使用噪声在坐标附近采样会扭曲形状的边缘。
unity用很大的地图;多边形 2d 地形 角色;unity3d 绘制多边形;热带雨林unity3d 多边形;unity随机地图生成;unity 随机生成;unity3d 无限地图;随机地图;3d_map_generator_2 发行商;基于种子的伪随机数生成地图;unity 绘制多边形;3随机地图生成器;unity3d 无缝地图插件;unity 绘制网格地图;unity3d如何随机出现;unity3d中怎么加入河流;unity3unity quad 是什么;unity3d 没有smooth follow
每日推荐:
72904/5000排名<font color="#FF昨日变化5主题帖子积分
日久生情, 积分 2904, 距离下一级还需 2096 积分
日久生情, 积分 2904, 距离下一级还需 2096 积分
蛮牛币4339
在线时间940 小时
好高大上。一种毕设也不过如此的感觉。。。
每日推荐:
我是一只小刺猬丫咿呀咿呀哟~~~
293/150排名<font color="#FF昨日变化9主题帖子积分
初来乍到, 积分 93, 距离下一级还需 57 积分
初来乍到, 积分 93, 距离下一级还需 57 积分
在线时间41 小时
请问生成的是2d地图,怎么样生生3d的地图,如何应用到游戏中?
[]: Tsup 捡了钱没交公 蛮牛币 降了 3
每日推荐:
17/50主题帖子积分
注册看看, 积分 7, 距离下一级还需 43 积分
注册看看, 积分 7, 距离下一级还需 43 积分
在线时间2 小时
,这个验证码真他丫的反
每日推荐:
4387/500排名<font color="#FF昨日变化176主题帖子积分
四处流浪, 积分 387, 距离下一级还需 113 积分
四处流浪, 积分 387, 距离下一级还需 113 积分
在线时间81 小时
多谢分享, 多谢分享 !!!!
每日推荐:
经过游戏蛮牛认证的蛮牛小翻译&&[&& 原创&&]&& 作者:&&|&&责编:刘菲菲
&&&&iOS8内置地图(苹果地图)本次所引用的数据为国内高德地图服务提供商所提供。其实在此之前,苹果公司早就已经意识到入乡随俗的必要性,而要想在中国国内为用户提供更完善的地图服务,引用国内服务商的数据是必不可少的。iOS8内置苹果地图提供三种地图呈现标准&&&&iOS8内置地图(以下统一称为苹果地图)首先在界面上与上一版本中的地图其实并没有太大变化,但在地图界面呈现模式上,标准模式下,全新的苹果地图加入了2D/3D转换两种方式的选择。这无疑是一次用户使用上的提升。全新的2D/3D显示模式&画面更形象逼真&&&&从以上所截取的3D地图呈现可见,苹果地图此次在3D实景模型的表现,可以说是惟妙惟肖。实景建筑物的勾画非常逼真,您甚至可以通过地图上位置的移动,从建筑物的正面转动180度之后,来得建筑物的后边来。苹果地图路线规划与导航苹果地图路线规划不提供公交换乘路线&&&&苹果地图对路线的规划比较到位,例如当用户选定了起点和目的地之后,地图系统会自动给出对应几个方案,并列出对应的路线驾车需要多少时间、步行需要多久。不过我们在这里只看到了驾车和步行两种方式,并未看到公交换乘方式的列表,对用户日常最可能用到的交通出行方式的缺失,只能表示非常的不能理解。&出发地与目的地信息介绍界面苹果及明细列表说明&&&&整体而言,苹果地图在iOS8中的特点表现还是比较明显的。与iOS7中的苹果地图相比,新版地图增加了2D/3D呈现方式之间的切换,而且界面显示也是活灵活现;在路线规划中,虽然缺失了公交换乘方式的规划,但苹果地图在驾车和步行方面能给出较为详细的引导。按照苹果地图这样的提升趋势,那么再往后的版本中,是否会考虑加入更为丰富的服务,如LBS商圈信息以及社交方面的服务?我们继续期待。
......提示:支持键盘“← →”键翻页
4¥16005¥7506¥14507¥6998¥28009¥334910¥4200  查询公交换乘  点击右上的公交车按钮可以查询公交换乘方案。在输入起点和终点时同样会在下拉列表中提供候选项,搜索结果比较单一,并没有提供诸如“较快捷”、“少换乘”或“少步行”等额外的选项。查询公交路线  点击换乘方案可以查看更加具体的信息,还可以在地图上查看总的路线,每个站点都会在地图的相应位置标示出来。不过由于E都市地图的缩放级别只有四级,即便缩放至最小级别也很难能看到全程的路线。查看换乘路线  除了查询换乘方案,E都市地图还支持公交线路查询和单一的站点查询,这方面功能相比其他地图软件还是比较全面的。  查询周边  点击右上角的“雷达”状图表,可以打开查询周边功能。除了查询用户目前所处位置的周边,还可以自行设置其他位置。搜索结果的现实与之前所搜全地图时类似,不过小编发现E都市地图的信息更新不是很及时,比如图中的这家麦当劳早在几年前就已经消失了。查询周边  签到  E都市三位地图结合了LBS功能,支持位置签到。用户可以在签到的时候附加简短的文字,但不能添加照片,还可以设置同步至新浪微博。点击楼圈圈可以查看周边用户的最新动态。  签到及楼圈圈  总结  E都市三维地图最大的特色就是采用3D样式来呈现地图,相比传统2D俯视形式直观的多。不过目前3D地图还只覆盖到5环以内,5环外的地区就无能为力了。此外公交换乘的查询页比较全面。如果你经常外出,而在读平面地图上又比较吃力,那么E都市三位地图将十分适合你。  优点:  1)三维地图显示方式,直观易懂;  2)公交查询功能较全面;  3)支持签到。  缺点:  1)目前只覆盖到5环以内。来源TechWeb)}

我要回帖

更多关于 计量泵相比离心泵优点 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信