{"id":226635,"date":"2014-06-18T16:16:03","date_gmt":"2014-06-18T12:16:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=226635"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=226635","title":{"rendered":"<span class=\"post_title\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u043e\u0432 \u0432 Unity3d<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/52b\/7f7\/0c7\/52b7f70c751b8320572e5864ff122aa0.png\" align=\"right\"\/><br \/>  \u0414\u0443\u043c\u0430\u044e \u0432\u0441\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u044f\u043a\u0438\u0445 \u0431\u0440\u043e\u0434\u0438\u043b\u043e\u043a \u0441 \u0432\u044b\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \u0441\u0442\u0438\u043b\u0435 <a href=\"http:\/\/minecraft.net\">Minecraft<\/a>. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0440\u0435\u0448\u0438\u043b\u0441\u044f \u0438 \u044f. \u041d\u0430\u0447\u0430\u043b\u043e \u0431\u044b\u043b\u043e \u043b\u0451\u0433\u043a\u0438\u043c \u2014 Unity3d \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u043b\u044f \u0441\u043e\u0437\u043d\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0445 \u0438\u0433\u0440 (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e). \u041f\u0435\u0440\u0441\u043e\u043d\u0430\u0436, \u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0432 \u043e\u0431\u0449\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e. \u041d\u043e \u043a\u0430\u043a\u043e\u0439 minecraft \u0431\u0435\u0437 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043c\u0438\u0440\u0430? \u042d\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0442\u0440\u0443\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439. \u0418 \u0434\u0443\u043c\u0430\u044e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f. \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0432\u0435\u0441\u044c \u0433\u0443\u0433\u043b \u0438 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0432 \u043a\u0443\u0447\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u044d\u0442\u0443 <s>\u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e<\/s> \u0432\u0435\u0449\u044c \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0434\u0430\u0431\u044b \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u0434\u0430\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445.<a name=\"habracut\"><\/a> <\/p>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0432\u0430\u0441 \u0436\u0434\u0451\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 (\u0438 \u043a\u043e\u0434) \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043d\u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0445 \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u043e\u0432. \u0423\u0442\u043e\u0447\u043d\u044e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430 C#.<\/p>\n<h4>\u041f\u043b\u0430\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/h4>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u0431\u044b \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u0430:   <\/p>\n<ol>\n<li><b>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u0430\u0440\u0442\u044b \u0432\u044b\u0441\u043e\u0442.<\/b> \u042d\u0442\u043e \u0441\u0430\u043c\u0430\u044f \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u043f\u043e \u043a\u0430\u0440\u0442\u0435 \u0432\u044b\u0441\u043e\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f terrain (\u0438\u043b\u0438 mesh). \u0415\u0451 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u044f terrain \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u044b\u0441\u043e\u0442\u044b <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/5aa\/ecb\/10b\/5aaecb10b68878d23098ecceb8542817.jpg\"\/><br \/>  \u0438 \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u0433\u0440\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/li>\n<li><b>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u0430.<\/b> \u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043b\u0438 \u0432\u044b \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b unity3d, \u0438\u043b\u0438 \u0436\u0435 \u0432\u0430\u043c \u043f\u043b\u0435\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u0432\u0430\u043c \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431 \u0431\u044b\u043b\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 unity3d \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u0430 (terrain).<br \/>  \u041f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e:\n<pre><code class=\"cs\">\tTerrain terrain = FindObjectOfType&lt;Terrain&gt; (); \/\/ \u041d\u0430\u0445\u043e\u0434\u0438 \u043d\u0430\u0448 terrain \tfloat[,] heights = new float[resolution,resolution]; \/\/ \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0432\u0435\u0440\u0448\u0438\u043d  \t\/\/ ... \t\/\/ \u0414\u0435\u043b\u0430\u0435\u043c \u0441 heights \u0432\u0441\u0451, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u043c \t\/\/ ...  \tterrain.terrainData.size = new Vector3(width,height,length); \/\/ \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u0430\u0448\u0435\u0439 \u043a\u0430\u0440\u0442\u044b \tterrain.terrainData.heightmapResolution = resolution; \/\/ \u0417\u0430\u0434\u0430\u0451\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 (\u043a\u043e\u043b-\u0432\u043e \u0432\u044b\u0441\u043e\u0442) \tterrain.terrainData.SetHeights(0, 0, heights); \/\/ \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043d\u0430\u0448\u0443 \u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0441\u043e\u0442 (heights) <\/code><\/pre>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 mesh. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u0430\u0451\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0430\u0434 \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u043e\u043c, \u043d\u043e \u043e\u043d \u0438 \u0441\u043b\u043e\u0436\u043d\u0435\u0435: \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c mesh, \u0434\u0430\u043b\u0435\u0435 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0438\u0438 \u0438 \u0442\u0440\u0443\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0434 \u0448\u0435\u0439\u0434\u0435\u0440\u0430\u043c\u0438 \u0434\u043b\u044f \u043f\u043e\u043a\u0440\u0430\u0441\u043a\u0438. \u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u043e 2 \u0441\u043f\u043e\u0441\u043e\u0431\u0435 \u0432\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 <a href=\"http:\/\/habrahabr.ru\/post\/194620\/\">\u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f<\/a>.<\/li>\n<li><b>\u041d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0443\u0440.<\/b>\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u044d\u0442\u0430\u043f \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u0430. \u0417\u0434\u0435\u0441\u044c \u043e\u043f\u044f\u0442\u044c \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u0430\u0440\u0442\u0430 \u0432\u044b\u0441\u043e\u0442 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430. \u0414\u043b\u044f \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0443\u0440 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0448\u0435\u0439\u0434\u0435\u0440.\n<pre><code>Shader &quot;Custom\/TerrainShader&quot; {     Properties {         _HTex (&quot;heightMap texture&quot;, 2D) = &quot;white&quot; {}         _GTex (&quot;grass texture&quot;, 2D) = &quot;white&quot; {}         _RTex (&quot;rock texture&quot;, 2D) = &quot;white&quot; {}     }     SubShader {         Tags { &quot;RenderType&quot;=&quot;Opaque&quot; }         LOD 2048                  CGPROGRAM         #pragma surface surf Lambert         sampler2D _GrassTex;         sampler2D _RockTex;         sampler2D _HeightTex;         struct Input {             float2 uv_GTex;             float2 uv_RTex;             float2 uv_HTex;         };          void surf (Input IN, inout SurfaceOutput o) {                          float4 grass = tex2D(_GTex, IN.uv_GTex);             float4 rock = tex2D(_RTex, IN.uv_RTex);             float4 height = tex2D(_HTex, IN.uv_HTex);              o.Albedo = lerp(grass, rock, height);                       }         ENDCG     }      FallBack &quot;Diffuse&quot; } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u0430 \u0432\u0445\u043e\u0434 3 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b: \u043a\u0430\u0440\u0442\u0430 \u0432\u044b\u0441\u043e\u0442, \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0442\u0440\u0430\u0432\u044b \u0438 \u043a\u0430\u043c\u043d\u044f. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u043a\u0430\u043c\u043d\u044f \u0438 \u0442\u0440\u0430\u0432\u044b \u043f\u043e \u043a\u0430\u0440\u0442\u0435 \u0432\u044b\u0441\u043e\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e lerp(). \u0418 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u043c\u044b \u043f\u043e\u0434\u0430\u0451\u043c \u043d\u0430\u0448\u0443 \u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0441\u043e\u0442 \u043d\u043e \u043e\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u0443\u044e \u0432 \u043d\u0443\u0436\u043d\u044b\u0435 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b.  <\/li>\n<\/ol>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u043e\u043d\u044f\u0432 \u043e\u0431\u0449\u0438\u0439 \u043f\u043b\u0430\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u043d\u0430\u0434\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0434\u0435\u043b\u0443.<\/p>\n<h4>\u0427\u0430\u0441\u0442\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438<\/h4>\n<p>  \u0421 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0434\u043b\u044f \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 Random(). \u041d\u043e \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431. \u0415\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u044d\u0442\u043e \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u0430\u044f \u043a\u0430\u0440\u0442\u0430, \u0430 \u0440\u0430\u0441\u0447\u0451\u0441\u043a\u0430 \u0432 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0438.<br \/>  <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/79f\/d17\/560\/79fd17560dcbef90824b86cde176b606.jpg\" width=\"351\" height=\"291\"\/><\/p>\n<h4>\u0428\u0443\u043c \u041f\u0435\u0440\u043b\u0438\u043d\u0430<\/h4>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u044b \u0432\u044b\u0441\u043e\u0442, \u043d\u043e \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0441\u0445\u043e\u0436\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0443\u043c\u043e\u0432. \u0421\u0430\u043c\u044b\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043d\u0435 \u043f\u043e\u043f\u0430\u043b\u0441\u044f \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0448\u0443\u043c\u0430 \u041f\u0435\u0440\u043b\u0438\u043d\u0430 <\/p>\n<blockquote><p>Perlin noise (\u0428\u0443\u043c \u041f\u0435\u0440\u043b\u0438\u043d\u0430, \u0442\u0430\u043a\u0436\u0435 \u0438\u043d\u043e\u0433\u0434\u0430 \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0448\u0443\u043c \u041f\u0435\u0440\u043b\u0438\u043d\u0430) \u2014 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u043f\u0441\u0435\u0432\u0434\u043e-\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0434\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043c\u0430 \u0438\u043b\u0438 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0434\u044b\u043c\u0430, \u0442\u0443\u043c\u0430\u043d\u0430 \u0438 \u0442.\u0434.<\/p><\/blockquote>\n<p>  \u0414\u0443\u043c\u0430\u044e \u043c\u043d\u043e\u0433\u0438\u0445 \u0438\u0441\u043f\u0443\u0433\u0430\u043b\u0430 \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0430 \u043f\u0441\u0435\u0432\u0434\u043e, \u043d\u043e \u043e\u0442 \u043d\u0435\u0451 \u043b\u0435\u0433\u043a\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0448\u0443\u043c\u0430 \u0432 Unity3d:<\/p>\n<pre><code class=\"cs\">  using UnityEngine;   using System.Collections;       public class PerlinNoisePlane : MonoBehaviour {         public float power = 3.0f;         public float scale = 1.0f;         private Vector2 startPoint = new Vector2(0f, 0f);           void Start () {             MakeNoise ();         }           void MakeNoise() {             MeshFilter mf = GetComponent&lt;MeshFilter&gt;(); \/\/ \u0418\u0449\u0435\u043c mesh             Vector3[] vertices = mf.mesh.vertices; \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0435\u0433\u043e \u0432\u0435\u0440\u0448\u0438\u043d\u044b             for (int i = 0; i &lt; vertices.Length; i++) {                 float x = startPoint.x + vertices[i].x  * scale; \/\/ X \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 \u0432\u0435\u0440\u0448\u0438\u043d\u044b             float z = startPoint.y + vertices[i].z  * scale; \/\/ Z \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 \u0432\u0435\u0440\u0448\u0438\u043d\u044b                 vertices[i].y = (Mathf.PerlinNoise (x, z) - 0.5f) * power;  \/\/ \u0417\u0430\u0434\u0430\u0451\u043c \u0432\u044b\u0441\u043e\u0442\u0443 \u0434\u043b\u044f \u0442\u043e\u0447\u043a\u0438 \u0441 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438             }             mf.mesh.vertices = vertices; \/\/ \u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u0432\u0435\u0440\u0448\u0438\u043d\u044b             mf.mesh.RecalculateBounds(); \/\/ \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0432\u0435\u0440\u0448\u0438\u043d\u044b             mf.mesh.RecalculateNormals(); \/\/ \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0440\u043c\u0430\u043b\u0438         }     }  <\/code><\/pre>\n<p>  \u042f \u0431\u044b \u043d\u0435 \u0441\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u0430\u0451\u0442 \u043e\u0448\u0435\u043b\u043e\u043c\u043b\u044f\u044e\u0449\u0435 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043d\u043e \u043e\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043f\u043b\u043e\u0445 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0443\u0441\u0442\u044b\u043d\u044c \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u0438\u043d.<\/p>\n<h4>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c diamond-square<\/h4>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u043b\u0433\u0438\u0445 \u0447\u0430\u0441\u043e\u0432 \u0441\u043a\u0438\u0442\u0430\u043d\u0438\u0439 \u043f\u043e \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443 \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0438 \u043e\u043d \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043b \u0432\u0441\u0435 \u043c\u043e\u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f. \u041e\u043d \u0434\u0430\u0451\u0442 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u0414\u043b\u044f \u0440\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0440\u0448\u0438\u043d \u0435\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430.<br \/>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0435\u0431\u0435 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c, \u0435\u0451 4 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0438 \u0442\u043e\u0447\u043a\u0443 \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443. \u0415\u0451 \u0432\u044b\u0441\u043e\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 \u0441\u0443\u043c\u043c\u0435 \u0432\u044b\u0441\u043e\u0442 4 \u0432\u0435\u0440\u0448\u0438\u043d, \u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f \u043d\u0430 \u0438\u0445 \u043a\u043e\u043b-\u0432\u043e \u0438 \u043d\u0435\u043a\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0441 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c. \u0412\u043e\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f unity3d (\u0445\u0430\u043b\u044f\u0432\u0430 \u043a\u043e\u043f\u0438-\u043f\u0430\u0441\u0442\u0435\u0440\u0430\u043c):<\/p>\n<pre><code class=\"cs\">using UnityEngine; using System.Collections;  public class TerrainGenerator : MonoBehaviour {  \tpublic float R; \/\/ \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u043a\u0430\u043b\u0438\u0441\u0442\u043e\u0441\u0442\u0438 \tpublic int GRAIN=8; \/\/ \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0437\u0435\u0440\u043d\u0438\u0441\u0442\u043e\u0441\u0442\u0438 \tpublic bool FLAT = false; \/\/ \u0414\u0435\u043b\u0430\u0442\u044c \u043b\u0438 \u0440\u0430\u0432\u043d\u0438\u043d\u044b \tpublic Material material;   \tprivate int width=2048; \tprivate int height=2048; \tprivate float WH; \tprivate Color32[] cols; \tprivate Texture2D texture;  \t \tvoid Start ()  \t{ \t\tint resolution = width; \t\tWH = (float)width+height;  \t\t\/\/ \u0417\u0430\u0434\u0430\u0451\u043c \u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0441\u043e\u0442 \t\tTerrain terrain = FindObjectOfType&lt;Terrain&gt; (); \t\tfloat[,] heights = new float[resolution,resolution];   \t\t\/\/ \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0441\u043e\u0442 \t\ttexture = new Texture2D(width, height); \t\tcols = new Color32[width*height]; \t\tdrawPlasma(width, height); \t\ttexture.SetPixels32(cols); \t\ttexture.Apply();  \t\t\/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0448\u0435\u0439\u0434\u0435\u0440 (\u0441\u043c\u043e\u0442\u0440\u0438 \u043f\u0443\u043d\u043a\u0442 3 \u0432\u043e 2 \u0447\u0430\u0441\u0442\u0438) \t\tmaterial.SetTexture (&quot;_HeightTex&quot;, texture);  \t\t\/\/ \u0417\u0430\u0434\u0430\u0451\u043c \u0432\u044b\u0441\u043e\u0442\u0443 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c \u043f\u043e \u043a\u0430\u0440\u0442\u0435 \u0432\u044b\u0441\u043e\u0442 \t\tfor (int i=0; i&lt;resolution; i++) { \t\t\tfor (int k=0;k&lt;resolution; k++){ \t\t\t\theights[i,k] = texture.GetPixel(i,k).grayscale*R; \t\t\t} \t\t}  \t\t\/\/ \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \t\tterrain.terrainData.size = new Vector3(width, width, height); \t\tterrain.terrainData.heightmapResolution = resolution; \t\tterrain.terrainData.SetHeights(0, 0, heights); \t}          \/\/ \u0421\u0447\u0438\u0442\u0430\u0435\u043c \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u0441\u043e\u0442\u044b \tfloat displace(float num) \t{ \t\tfloat max = num \/ WH * GRAIN; \t\treturn Random.Range(-0.5f, 0.5f)* max; \t} \t         \/\/ \u0412\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \tvoid drawPlasma(float w, float h)  \t{ \t\tfloat c1, c2, c3, c4; \t\t \t\tc1 = Random.value; \t\tc2 = Random.value; \t\tc3 = Random.value; \t\tc4 = Random.value; \t\t \t\tdivide(0.0f, 0.0f, w , h , c1, c2, c3, c4); \t} \t         \/\/ \u0421\u0430\u043c\u0430 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \tvoid divide(float x, float y, float w, float h, float c1, float c2, float c3, float c4) \t{ \t\t \t\tfloat newWidth = w * 0.5f; \t\tfloat newHeight = h * 0.5f; \t\t \t\tif (w &lt; 1.0f || h &lt; 1.0f) \t\t{ \t\t\tfloat c = (c1 + c2 + c3 + c4) * 0.25f; \t\t\tcols[(int)x+(int)y*width] = new Color(c, c, c); \t\t} \t\telse \t\t{ \t\t\tfloat middle =(c1 + c2 + c3 + c4) * 0.25f + displace(newWidth + newHeight); \t\t\tfloat edge1 = (c1 + c2) * 0.5f; \t\t\tfloat edge2 = (c2 + c3) * 0.5f; \t\t\tfloat edge3 = (c3 + c4) * 0.5f; \t\t\tfloat edge4 = (c4 + c1) * 0.5f;  \t\t\tif(!FLAT){ \t\t\t\tif (middle &lt;= 0) \t\t\t\t{ \t\t\t\t\tmiddle = 0; \t\t\t\t} \t\t\telse if (middle &gt; 1.0f) \t\t\t\t{ \t\t\t\t\tmiddle = 1.0f; \t\t\t\t} \t\t\t} \t\t\tdivide(x, y, newWidth, newHeight, c1, edge1, middle, edge4); \t\t\tdivide(x + newWidth, y, newWidth, newHeight, edge1, c2, edge2, middle); \t\t\tdivide(x + newWidth, y + newHeight, newWidth, newHeight, middle, edge2, c3, edge3); \t\t\tdivide(x, y + newHeight, newWidth, newHeight, edge4, middle, edge3, c4); \t\t} \t} } <\/code><\/pre>\n<h4>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043f\u043e \u0442\u0435\u043c\u0435<\/h4>\n<p>  <\/p>\n<ul>\n<li><a href=\"http:\/\/oddlabs.com\/download\/terrain_generation.pdf\">Realtime Procedural Terrain Generation<\/a> (PDF). \u041e\u0447\u0435\u043d\u044c \u0446\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0433\u0434\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u0441\u0451 \u043f\u0440\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u043e\u0432. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441 \u2014 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c<\/li>\n<li><a href=\"http:\/\/en.wikipedia.org\/wiki\/Fractal_landscape\">\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b<\/a><\/li>\n<li><a href=\"http:\/\/habrahabr.ru\/post\/142592\/\">\u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e \u0448\u0443\u043c \u041f\u0435\u0440\u043b\u0438\u043d\u0430 <\/a><\/li>\n<li><a href=\"http:\/\/en.wikipedia.org\/wiki\/Diamond-square_algorithm\">\u0412\u0438\u043a\u0438 \u043f\u0440\u043e diamond-square<\/a><\/li>\n<\/ul>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/226635\/\"> http:\/\/habrahabr.ru\/post\/226635\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/52b\/7f7\/0c7\/52b7f70c751b8320572e5864ff122aa0.png\" align=\"right\"\/><br \/>  \u0414\u0443\u043c\u0430\u044e \u0432\u0441\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u044f\u043a\u0438\u0445 \u0431\u0440\u043e\u0434\u0438\u043b\u043e\u043a \u0441 \u0432\u044b\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \u0441\u0442\u0438\u043b\u0435 <a href=\"http:\/\/minecraft.net\">Minecraft<\/a>. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0440\u0435\u0448\u0438\u043b\u0441\u044f \u0438 \u044f. \u041d\u0430\u0447\u0430\u043b\u043e \u0431\u044b\u043b\u043e \u043b\u0451\u0433\u043a\u0438\u043c \u2014 Unity3d \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u043b\u044f \u0441\u043e\u0437\u043d\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0445 \u0438\u0433\u0440 (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e). \u041f\u0435\u0440\u0441\u043e\u043d\u0430\u0436, \u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0432 \u043e\u0431\u0449\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e. \u041d\u043e \u043a\u0430\u043a\u043e\u0439 minecraft \u0431\u0435\u0437 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043c\u0438\u0440\u0430? \u042d\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0442\u0440\u0443\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439. \u0418 \u0434\u0443\u043c\u0430\u044e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f. \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0432\u0435\u0441\u044c \u0433\u0443\u0433\u043b \u0438 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0432 \u043a\u0443\u0447\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u044d\u0442\u0443 <s>\u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e<\/s> \u0432\u0435\u0449\u044c \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0434\u0430\u0431\u044b \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u0434\u0430\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-226635","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/226635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=226635"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/226635\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=226635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=226635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=226635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}