{"id":2224,"date":"2024-04-13T16:54:05","date_gmt":"2024-04-13T15:54:05","guid":{"rendered":"https:\/\/www.katsbits.com\/site\/?p=2224"},"modified":"2024-04-13T16:54:05","modified_gmt":"2024-04-13T15:54:05","slug":"make-terrain-from-patch-meshes-additional-objects","status":"publish","type":"post","link":"https:\/\/www.katsbits.com\/site\/make-terrain-from-patch-meshes-additional-objects\/","title":{"rendered":"Simple Patch Mesh Terrain In Radiant"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.katsbits.com\/site\/make-terrain-from-patch-meshes-additional-objects\/#Models_Terrain_Too_Many_Polygons\" >Models, Terrain &amp; Too Many Polygons<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.katsbits.com\/site\/make-terrain-from-patch-meshes-additional-objects\/#Using_More_Than_One_Patch_Mesh\" >Using More Than One Patch Mesh<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.katsbits.com\/site\/make-terrain-from-patch-meshes-additional-objects\/#Patches_Vertex_Texture_Blending\" >Patches &amp; Vertex Texture Blending<\/a><\/li><\/ul><\/nav><\/div>\n<p>Continuing on from the <a href=\"https:\/\/www.katsbits.com\/site\/make-terrain-from-patch-mesh-understanding-subdivision\/\" target=\"_self\" rel=\"noopener\">previous page<\/a> on making a Terrain from Patch Meshes in Doom3Edit (et-al) and what needs to be kept in mind when doing so.<\/p>\n<p>The following will discuss &#8216;optimising&#8217; issues pertaining to the use of Patches in this way so poly count and system\/rendering overheads are as low as possible whilst still allowing for a relatively creative use of mesh objects in Radiant. <\/p>\n<h3><span class=\"ez-toc-section\" id=\"Models_Terrain_Too_Many_Polygons\"><\/span>Models, Terrain &amp; Too Many Polygons<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>In creating your terrain you may have noticed that, depending on it&#8217;s size, it still contained a lot of triangles, probably because you may have laid out the terrain object as one big mesh. Now there is another way to create an interesting terrain but it&#8217;s a &#8216;compromise&#8217;; you&#8217;ll get fewer triangles being used at the expense of &#8216;boarders&#8217; between areas appearing which aren&#8217;t too much of a problem to sort out.<\/p>\n<p>Basically instead of creating one big mesh with a high &#8216;primary&#8217; subdivision (<a href=\"https:\/\/www.katsbits.com\/site\/make-terrain-from-patch-mesh-understanding-subdivision\/\" title=\"Making terrain from patch mesh curves\" target=\"_self\" rel=\"noopener\">see previous tutorial<\/a>) what you do is break the terrain down into individual component&#8217;s that each have their own subdivision resolution. What this means is that the terrain is constructed from sub component&#8217;s; a hill section, a river bed section, flat plane section and so on, all of which are then placed together to form the larger overall picture of the terrain.<\/p>\n<p>What this does is allow better control over the whole terrain; objects that are far away or unreachable by the player can have much lower subdivision resolution than other areas because polygon detail isn&#8217;t needed as it won&#8217;t be seen. That&#8217;s the basic concept, obviously how you work with it depends on the kind of details and feature you want on your terrain.<\/p>\n<div class=\"content_images\"><a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/doom_3_terrain\/mesh-manipulation-subdivided-off_sml.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" title=\"Manipulated Patch Mesh without manual subdivisions\" alt=\"Manipulated Patch Mesh without manual subdivisions\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/doom_3_terrain\/mesh-manipulation-subdivided-off_sml.jpg\" border=\"0\" height=\"256\" width=\"428\" \/><\/a><\/p>\n<p>When a patch mesh is manipulated using the control points (&#8220;V&#8221;), by default it uses a high level of subdivisions, which varies based on its &#8220;Patch Density&#8221; &#8211; the higher the latter, the higher the former<\/p>\n<p> <a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/doom_3_terrain\/mesh-manipulation-subdivided-2x2_sml.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" title=\"Patch Mesh subdivided 2x2\" alt=\"Patch Mesh subdivided 2x2\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/doom_3_terrain\/mesh-manipulation-subdivided-2x2_sml.jpg\" border=\"0\" height=\"256\" width=\"428\" \/><\/a><\/p>\n<p>Activating Subdivide and setting a 1:1 ratio (2&times;2 in this instance), overall subdivision are greatly decreased to the extent that a &#8216;peak&#8217; is formed from the Patch<\/p>\n<p> <a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/doom_3_terrain\/mesh-manipulation-subdivided-4x4_sml.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" title=\"Patch Mesh subdivided 4x4\" alt=\"Patch Mesh subdivided 4x4\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/doom_3_terrain\/mesh-manipulation-subdivided-4x4_sml.jpg\" border=\"0\" height=\"256\" width=\"428\" \/><\/a><\/p>\n<p>By changing the Subdivide value, the Patch density can be reduced so it effectively uses far fewer polygons in-game<\/p>\n<\/div>\n<h3><span class=\"ez-toc-section\" id=\"Using_More_Than_One_Patch_Mesh\"><\/span>Using More Than One Patch Mesh<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The following images below show the basic principle involved in this method; separate patch mesh object manipulated into various shapes and forms and them placed together &#8211; in the case below; a simple mound and a slightly curved plane (ground).<\/p>\n<div class=\"content_images\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/doom_3_terrain\/section1.jpg\" width=\"428\" height=\"235\" alt=\"Mesh No.1 - flat plain\" title=\"Mesh No.1 - flat plain\" \/><\/p>\n<p>Making a more complex terrain structure from patch meshes typically means having to use more than one patch mesh. Shown selected is a slight curved mesh representing a &#8216;ground&#8217; surface &#8211; Mesh No.1 &#8211; flat plain<\/p>\n<\/div>\n<p>It&#8217;s noticeable in the shots above and below that each mesh object is using a different level of subdivision, obviously the &#8216;type&#8217; of terrain effect you&#8217;re trying to achieve will effect the level of subdivision you use; a river bed for instance, will use a different level of subdivision next to a rock outcrop.<\/p>\n<div class=\"content_images\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/doom_3_terrain\/section2.jpg\" width=\"428\" height=\"235\" alt=\"Mesh No.2 - 'hill'\" title=\"Mesh No.2 - 'hill'\" \/><\/p>\n<p>Shown selected is a small &#8216;hillock&#8217; or rock protrusion from the ground surface patch mesh &#8211; Mesh No.2 &#8211; &#8216;hill&#8217;<\/p>\n<\/div>\n<p>Once you&#8217;ve got all your objects created they just need to be placed together in such a way as to bury part of the mesh &#8211; this prevents light leaks and cracks from showing up (see below). There is one advantage to this approach; you can play around with the placement if the terrain objects, fine tuning game play and visual&#8217;s. It&#8217;s also easy to copy\/paste sections to create new areas of interest.<\/p>\n<blockquote>\n<p><b>Design note<\/b>: don&#8217;t forget that you need to encase or block out the patch mesh area in caulk covered brushwork otherwise the map will &#8216;leak&#8217;. Patches do not seal the map against the void.<\/p>\n<\/blockquote>\n<div class=\"content_images\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/doom_3_terrain\/sections_together.jpg\" width=\"428\" height=\"235\" alt=\"Mesh 1 and 2 selected from underneath\" title=\"Mesh 1 and 2 selected from underneath\" \/><\/p>\n<p>Because of the way a patch distorts and the lack of finite control available via the control grid, the &#8216;rock&#8217; mesh needs to be buried a good distance into the ground plain to compensate for both the curvature of the ground plain, and the distortion in the rock mesh &#8211; Mesh 1 and 2 selected from underneath<\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/doom_3_terrain\/sections_render.jpg\" width=\"428\" height=\"235\" alt=\"Completed terrain from meshes\" title=\"Completed terrain from meshes\" \/><\/p>\n<p>When rendered, the two mesh sections provide a relatively convincing terrain, albeit a bit simplistic when compared with a similar effort created in a modelling application like Blender 3D. Note that it&#8217;s not possible to &#8216;blend&#8217; or &#8216;graduate&#8217; the change from the &#8216;rock&#8217; material to the &#8216;ground&#8217;<\/p>\n<\/div>\n<h3><span class=\"ez-toc-section\" id=\"Patches_Vertex_Texture_Blending\"><\/span>Patches &amp; Vertex Texture Blending<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>As was mentioned briefly above, there is one one big disadvantage &#8211; well two really; <\/p>\n<ul>\n<li> You can&#8217;t texture blend &#8211; because you can&#8217;t vertex paint patch mesh objects (vertex painting is necessary for Doom 3&#8217;s texture blending system to work).<\/li>\n<li> You get &#8216;seams&#8217; where sudden changes in texture type occur &#8211; as shown in the image above.<\/li>\n<\/ul>\n<p>There&#8217;s nothing you can do about the 1st, but the 2nd can be dealt with by placing smaller objects around any &#8216;seams&#8217;; rocks, debris, walls etc., anything that breaks the appearance of the seams, basically by &#8216;hiding&#8217; them. If it&#8217;s a real concern that the seams can be seen (and you&#8217;d rather not get you hands dirty in a modeling app) then what you could do is make a new texture in a photo editing app which blends together two textures. This can then be applied to another mesh and strategically placed over a seam giving the appearance of merging two or more objects together. Keep in mind that if you do this you&#8217;ll need to create new textures that also blend the local (normal), height and specular maps as well as creating a new material file.<\/p>\n<div class=\"subNav\">\n<p>[1: <a href=\"https:\/\/www.katsbits.com\/site\/make-terrain-from-patch-mesh-understanding-subdivision\/\" title=\"Making terrain in Radiant from patch meshes\" target=\"_self\" rel=\"noopener\">Patch Mesh Basics<\/a> | 2: <a href=\"https:\/\/www.katsbits.com\/site\/make-terrain-from-patch-meshes-additional-objects\/\" title=\"Advanced options for making terrain from patch meshes\" target=\"_self\" rel=\"noopener\">Advanced Use of Patch Meshes<\/a>]<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":2225,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[549,552,515,334,109,108,503,316,553],"class_list":["post-2224","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-d3edit","tag-doomedit","tag-dynamic-light","tag-idtech4","tag-level-design","tag-level-editing","tag-subdivisions","tag-terrain","tag-texture-blending"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/2224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/comments?post=2224"}],"version-history":[{"count":1,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/2224\/revisions"}],"predecessor-version":[{"id":2226,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/2224\/revisions\/2226"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/media\/2225"}],"wp:attachment":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/media?parent=2224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/categories?post=2224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/tags?post=2224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}