tag:blogger.com,1999:blog-37799561880452726902024-03-18T03:21:57.609-04:00Procedural WorldFollowing one man's task of building a virtual world from the comfort of his pajamas. Discusses Procedural Terrain, Vegetation and Architecture generation. Also OpenCL, Voxels and Computer Graphics in general.Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.comBlogger234125tag:blogger.com,1999:blog-3779956188045272690.post-56749057341592911752019-04-15T09:23:00.001-04:002019-04-15T09:23:23.698-04:00MoonmakerThis is a Moon-making system we devised a while ago. The goal was to produce moons similar in size and composition to the ones found in our solar system. The main challenge was how to produce the massive surfaces of these moons -and their interiors- while keeping them interesting. Also, we had to make sure these could be rendered with crisp detail regardless of how far you are from them.<br />
<br />
The system assumes the moons have a spherical base. The system uses a geodesic meshing for the base sphere to guarantee each surface patch has the same area. The system uses this structure only as a computational grid for the procedural generation, the actual moon surface will be much smoother than the generation grid.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz5gGsXaicQNbs-cl9H19InqnxV485vINivpAvA21xcth2Lh30ds_F3wJl0tvmRrRO24HTVWICvrKVr_zdgh3yuTRdaAoUmE5fz_xxvjHaEwbx93GShb9F0pN5eyupnwdMR2uvy-3zzgk/s1600/mm0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="523" data-original-width="521" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz5gGsXaicQNbs-cl9H19InqnxV485vINivpAvA21xcth2Lh30ds_F3wJl0tvmRrRO24HTVWICvrKVr_zdgh3yuTRdaAoUmE5fz_xxvjHaEwbx93GShb9F0pN5eyupnwdMR2uvy-3zzgk/s320/mm0.png" width="316" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Geodesic sphere</i></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
For smaller, irregular moons, the base geometric definition of the moon will be perturbed by a low-frequency 3D noise.<br />
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQi8LqT6w-kCpfBLgR6IiA9xdMwSGBDUS7Z2SAWeySOB0c3qMMep-vfXCZbyH6qsL-kyA2cGZ4W-u6RNzm1FchsP3j7PtMDD_0-d7kTZbbF0LnJz5UBQM9xUl9FcfSokiKt-iyOvYAMcw/s1600/TauCetiLabs4.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="545" data-original-width="537" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQi8LqT6w-kCpfBLgR6IiA9xdMwSGBDUS7Z2SAWeySOB0c3qMMep-vfXCZbyH6qsL-kyA2cGZ4W-u6RNzm1FchsP3j7PtMDD_0-d7kTZbbF0LnJz5UBQM9xUl9FcfSokiKt-iyOvYAMcw/s320/TauCetiLabs4.bmp" width="313" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Noise-perturbed geodesic sphere</i></div>
<div>
<br /></div>
<div>
Starting from this base, the system will use a series of concentric shells. Each cell will determine the volumetric characteristics up to the next concentric shell. The outmost shell will provide the surface properties of the moon.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPBq5PlO1LGxUjfWuk5foJe2hQCvgoEz9l7EXqtmJnZ8VCyMeN_-vLdmUvGXpwIwNQEoIU-sDlBCY6IlmPHagOKARtW7VqdIybCAx0YaHTIoqNYZCJKsOP1dfMEjqbXZ4ZJKwym_tlMmA/s1600/TauCetiLabs4.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="577" data-original-width="568" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPBq5PlO1LGxUjfWuk5foJe2hQCvgoEz9l7EXqtmJnZ8VCyMeN_-vLdmUvGXpwIwNQEoIU-sDlBCY6IlmPHagOKARtW7VqdIybCAx0YaHTIoqNYZCJKsOP1dfMEjqbXZ4ZJKwym_tlMmA/s320/TauCetiLabs4.bmp" width="313" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Multiple concentric shells</i></div>
<div>
<br /></div>
<div>
Each shell will be optionally distorted by a low-frequency 3D noise that is unique to the shell. If configured to be so, it is possible for an inner shell to overcome an outer shell.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSMGbYrAqY2GjgsH1GMxluVWmC-zyioodQWOtvHrfcL43S7p4Qelxk2lgVq8e4vLrf3d2kse8kMVfcCZ9a_O0AGAvV4VTOvVlV3iPzijVmOZOMdJOuO9X0G_Bt3YIi_zgxELs2RhlXc6M/s1600/mm4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="562" data-original-width="579" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSMGbYrAqY2GjgsH1GMxluVWmC-zyioodQWOtvHrfcL43S7p4Qelxk2lgVq8e4vLrf3d2kse8kMVfcCZ9a_O0AGAvV4VTOvVlV3iPzijVmOZOMdJOuO9X0G_Bt3YIi_zgxELs2RhlXc6M/s320/mm4.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Shell distortion</i></div>
<div>
<br /></div>
<div>
The preceding diagrams have exaggerated the distance between shells, and the magnitude of their distortion, to provide a better understanding of this constructive process. In practice, shells will be much closer to each other, and the magnitude of their distortion will be proportionally smaller.</div>
<div>
<br /></div>
<div>
The following sections will describe how the outmost shell is produced. The same principles will apply to the production of the inner shells, for this reason, the definition of inner shells will not be discussed in detail.</div>
<div>
<br /></div>
<div>
<div>
The procedural moon system requires both a real-time component and an offline component. The real-time component will be running in the player’s computer. The offline component will run in the game developer’s computers. The offline generation component will produce information that can be quickly augmented by the real-time component.</div>
<div>
<br /></div>
<div>
Each vertex in a spherical shell will be classified as belonging to one specific biome. A biome is a collection of surface properties, including, but not limited to: elevation, material distribution, instance placement, and material coloration.</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO0w2x6xzdCdnNhq7177aISueXbfboW4tX_IFWh-_8BlAbuvaaQUlttVhybgMyEFRuh1mqzya4MPZV2joZ0HfaBuzjDI6HFNqKJjr9hQSRD_nOilr901PhZo9FT7sjVbiasXEVqmyk6zU/s1600/TauCetiLabs4_5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="525" data-original-width="754" height="277" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO0w2x6xzdCdnNhq7177aISueXbfboW4tX_IFWh-_8BlAbuvaaQUlttVhybgMyEFRuh1mqzya4MPZV2joZ0HfaBuzjDI6HFNqKJjr9hQSRD_nOilr901PhZo9FT7sjVbiasXEVqmyk6zU/s400/TauCetiLabs4_5.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Example of biome</i></div>
<div>
<br /></div>
<div>
The biome information contains entropy-rich features like craters, dry seas, surface cracks due to gravitational tides.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD-nVXb0mdJ1RMW0gNhIMeCk0Jv43dMbPiSIJTLyJ8ruUo3yyTkK8wBn2HubUrJuenllR69u2-pAwRcdDDN9M5a7ON9S28iLM6QchTcrJglCtqP0xnZ0HrjZojU7noBe2UsM6FWnzdeTM/s1600/TauCetiLabs4_6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="288" data-original-width="631" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD-nVXb0mdJ1RMW0gNhIMeCk0Jv43dMbPiSIJTLyJ8ruUo3yyTkK8wBn2HubUrJuenllR69u2-pAwRcdDDN9M5a7ON9S28iLM6QchTcrJglCtqP0xnZ0HrjZojU7noBe2UsM6FWnzdeTM/s400/TauCetiLabs4_6.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Large crater captured in biome information</i></div>
<div>
<br /></div>
<div>
The biome definition also contains planting rules, which will determine the location, frequency, and randomization of smaller features like rocks, boulders, overhangs, etc.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGsdTnJ6dW5neTJVd9FHAu2NnPuwVQ-mbdXPQuLMgLXpfuZyhLducCDwpm9AJKRAFl1HoXCU1jdaXujbPvELJBIhVKqXPlJzLGz4QrQ6Iq-Gya6oJ2KXVXVb9mLaKFvbSSS-gqeA7sjM0/s1600/TauCetiLabs4_7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="819" height="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGsdTnJ6dW5neTJVd9FHAu2NnPuwVQ-mbdXPQuLMgLXpfuZyhLducCDwpm9AJKRAFl1HoXCU1jdaXujbPvELJBIhVKqXPlJzLGz4QrQ6Iq-Gya6oJ2KXVXVb9mLaKFvbSSS-gqeA7sjM0/s400/TauCetiLabs4_7.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Rock instances over terrain</i></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
Each biome is be made of tile-able elements so the real-time component can apply the same information in multiple locations of the moon, and in other moons as well. The biome information will also be designed in a way that fast distortion and re-combination are possible, thus reducing repetitive and predictable patterns in the environment.</div>
<div>
<br /></div>
<div>
<div>
The system uses two types of biome tiles: Transitional and Isolated.</div>
<div>
<br /></div>
<div>
Transitional biome information will appear in regions where a biome is transitioning into a neighboring biome. Isolated biome information will appear in regions the system can guarantee there are no neighboring biomes.</div>
<div>
<br /></div>
<div>
These two distinct modes are needed because some large biome features like craters, can only be placed in areas where the biome is not transitioning into another biome type since biome transitions can affect the height profile and overall look of the terrain features.</div>
<div>
<br /></div>
<div>
The following simplified example shows a moon that uses three different biomes: Polar, Tropical, and Equatorial. The biomes are colored Red, Blue, and Green respectively.</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWxKt-3Tr5NrH4zblEuQSR1K3E592JxvG_GPm81FX0rHoLxbt8tzaxZXuTYAUXm68wvEDfqIRClhhA14ryvfEqcJFn2MMm3-UW6mQJHkInzD3NvnFiYi4coRUN3W2Bn74w1-G00orUyCk/s1600/mm5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="552" data-original-width="569" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWxKt-3Tr5NrH4zblEuQSR1K3E592JxvG_GPm81FX0rHoLxbt8tzaxZXuTYAUXm68wvEDfqIRClhhA14ryvfEqcJFn2MMm3-UW6mQJHkInzD3NvnFiYi4coRUN3W2Bn74w1-G00orUyCk/s320/mm5.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>A moon with three biomes</i></div>
<div>
<br /></div>
<div>
<div>
Patches, where there is an Isolated biome, appear in a solid color, patches with Transitional biomes show a blend of colors.</div>
<div>
<br /></div>
<div>
The system will use a set of pre-computed noises to introduce variation in the biome transition zones, creating interesting, unique transitions from one biome into another.</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghYYwbaQDW2q8jBDXgHFGLExUWIxzBYT9PmRZnFp0nTrd1eS-TCe1MagGRpYjJKo7M6_An-pKQQ1IOz3nnCqMnTduvMv_FgY7eb5r3AKAkmxXgJaHSPRHDkl9ge-Bp0C-7eEDn1mmyKE0/s1600/mm6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="614" data-original-width="618" height="317" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghYYwbaQDW2q8jBDXgHFGLExUWIxzBYT9PmRZnFp0nTrd1eS-TCe1MagGRpYjJKo7M6_An-pKQQ1IOz3nnCqMnTduvMv_FgY7eb5r3AKAkmxXgJaHSPRHDkl9ge-Bp0C-7eEDn1mmyKE0/s320/mm6.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Procedural noise applied to biome transitions</i></div>
<div>
<br /></div>
<div>
The preceding images have exaggerated the size of each biome patch relative to the moon’s size to provide a better understanding of the biome patching technique. A single biome patch will cover an area of approximately 10km by 10km. A moon having 1,500 km radius will have a surface area of 30,000,000 km2. To cover its surface, it would take nearly 300,000 of these patches.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhInf0vnmiaWr0vqpa_K5BmhV6KLrFwLk3ZGQ2oxVmqsehqP5-m0ygo5mF64JGYXPglBwEjegBUr8svZnDiEMkwURS0zihHkbxrouHJk1EPJPA7c88lbmRwHaIunG1BjHGHlyrW1YDKLYI/s1600/mm7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="717" data-original-width="904" height="253" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhInf0vnmiaWr0vqpa_K5BmhV6KLrFwLk3ZGQ2oxVmqsehqP5-m0ygo5mF64JGYXPglBwEjegBUr8svZnDiEMkwURS0zihHkbxrouHJk1EPJPA7c88lbmRwHaIunG1BjHGHlyrW1YDKLYI/s320/mm7.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Biome grid resolution for a moon of 1,500 km radius</i></div>
<div>
<br /></div>
<div>
The biome grid resolution can lead to a very large number of biome patches. The system will not keep track of these individually since each patch’s location can be analytically computed, and for most of the patches, their biome assignment can be inferred from a high-order biome map.</div>
<div>
<br /></div>
<div>
<div>
High-order biome maps will provide the moon’s key characteristics when viewed from far away. The system will use these maps to generate additional detail for closer views, keeping the moon’s definition consistent when viewed at different scales.</div>
<div>
<br /></div>
<div>
High-order biome maps are 2D images that can fit the moon’s surface using a custom 2D parametrization. Each point of the map contains a numeric identifier for the biome that is prevalent in that location of the surface or internal shell.</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwARGauzY2Q2yk2EDOMzVwfdCQLYY64kIuaPf3g4MK64XANZNM2K2R6RYKHBC47c2F6kiICLHm7AEb5mrXNloSEGUoN40nL3C7SWCbk3Lc5iX8AZScBzkft2lVFa5z_Ntbs5IuCz1VBk8/s1600/mm8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1024" data-original-width="1024" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwARGauzY2Q2yk2EDOMzVwfdCQLYY64kIuaPf3g4MK64XANZNM2K2R6RYKHBC47c2F6kiICLHm7AEb5mrXNloSEGUoN40nL3C7SWCbk3Lc5iX8AZScBzkft2lVFa5z_Ntbs5IuCz1VBk8/s320/mm8.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>2D biome map</i></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
The image above shows a map with four different biome types (blue, red, yellow and white). The image is wrapped around the sphere using a custom 2D parametrization. One possible parametrization is shown below:</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5J8VrxKGUSX3PBo22ZZYbnF79gxtbV4TpYrlGdBs5EaBdFW1oJa6wYMxj1OKtoEVfHa3s9XiF1PqpXJcpWvkKXwx2qANeWrBmPpQBfCJhxPq6qE5-ya887RZw4iSvxHURn3K9TujN-O0/s1600/mm9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="723" data-original-width="1246" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5J8VrxKGUSX3PBo22ZZYbnF79gxtbV4TpYrlGdBs5EaBdFW1oJa6wYMxj1OKtoEVfHa3s9XiF1PqpXJcpWvkKXwx2qANeWrBmPpQBfCJhxPq6qE5-ya887RZw4iSvxHURn3K9TujN-O0/s400/mm9.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>2D parametrization for Biome Id map</i></div>
<div>
<br /></div>
<div>
In addition to the biome Id map, the system will allow other maps. For instance, maps containing elevation and surface color.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2Slwb11AkJZr4kHuLvTq2vpyfiG4RAd7ZGz87DdGA3e5moMjbhEHtDxvHjvBTETght3Q8Zihx_ttSKvC474RTzxW18bJva2_fuEofkDBlSJrzKCukNGWA2BYRH2GEfCQTZS7JgWuPgY/s1600/mm10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="524" data-original-width="1600" height="130" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2Slwb11AkJZr4kHuLvTq2vpyfiG4RAd7ZGz87DdGA3e5moMjbhEHtDxvHjvBTETght3Q8Zihx_ttSKvC474RTzxW18bJva2_fuEofkDBlSJrzKCukNGWA2BYRH2GEfCQTZS7JgWuPgY/s400/mm10.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Elevation, tint, and a far-range rendering of the moon</i></div>
<div>
<br /></div>
<div>
<div>
A single pixel in each image may cover 4 km2, making them inexpensive to produce. These elevation and tint maps can be either procedurally generated or artist-made. For a project containing only dozens of moons, and where each moon is required to have rich, unique natural properties, this is a stage where artist input is likely to yield the best returns.</div>
<div>
<br /></div>
<div>
The following image captures the entire approach to generating shell surface elevation and other properties:</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKTCK2sB4piVqR0hBEb9AzMLQpeUNHOdUkOkSGDuVksH9x0uUFJH1zj9s199AbBe1MjcJ4jqnjol5Eo2aQBSxEK8dOB0rd5M8m0GeBlFAHaVRsB3IiHCQIckH-gfJHPRsB80kjM6WY85g/s1600/mm11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="803" data-original-width="807" height="397" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKTCK2sB4piVqR0hBEb9AzMLQpeUNHOdUkOkSGDuVksH9x0uUFJH1zj9s199AbBe1MjcJ4jqnjol5Eo2aQBSxEK8dOB0rd5M8m0GeBlFAHaVRsB3IiHCQIckH-gfJHPRsB80kjM6WY85g/s400/mm11.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>The three scales used for moon construction</i></div>
<div>
<br /></div>
<div>
<div>
A moon will be made of at least one spherical shell. In case there are multiple shells, the system will extrude inner shells based on their maximum radius and the shell’s height function, which is obtained from the same multi-scale process described in the previous sections.</div>
<div>
<br /></div>
<div>
For each shell, the moon designer will provide a high-order biome distribution map, biome definitions for the biomes appearing in this map, and material definitions for the materials appearing in the biome.</div>
<div>
<br /></div>
<div>
The system accepts “air” as a valid material, which can be used to create cavities within any shell.</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo0oaYLdvbpxNoiTE62B4ggncDm1LRZoK3aLj9WiegntHXnu0-ULRKwNMRPq1jjbDtJjdHTqOwj5ggcXeHFn9RKLQVTtXJaaMrVeZT5qMm6SZyG9OkA_quLwvBFYMz_nOcJb9CGCgA73c/s1600/mm12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="304" data-original-width="856" height="141" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo0oaYLdvbpxNoiTE62B4ggncDm1LRZoK3aLj9WiegntHXnu0-ULRKwNMRPq1jjbDtJjdHTqOwj5ggcXeHFn9RKLQVTtXJaaMrVeZT5qMm6SZyG9OkA_quLwvBFYMz_nOcJb9CGCgA73c/s400/mm12.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>A cross-section of the moon terrain, displaying two different shells</i></div>
<br />
A single shell will also be a volumetric object, and its depth will be defined by a stack of materials. The material stack information will be contained in the biome.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjswOxzxWPCp5kPZ7_WdWBC8z0hU9AOLjC2jU1DA4zrC9NP9NSJ_YURmcO-LIws3vBJOvVL_a3RZeaK9zoTA4qobnOLlaldHEQcBVJOh-_MMagJoeO4me-FxDalYAHOuzlKz-2HV_sCxlU/s1600/mm14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="549" data-original-width="1022" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjswOxzxWPCp5kPZ7_WdWBC8z0hU9AOLjC2jU1DA4zrC9NP9NSJ_YURmcO-LIws3vBJOvVL_a3RZeaK9zoTA4qobnOLlaldHEQcBVJOh-_MMagJoeO4me-FxDalYAHOuzlKz-2HV_sCxlU/s400/mm14.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>A material stack made of 6 materials</i></div>
<div>
<br /></div>
<div>
Since underground materials will rarely become exposed, they can be expressed at a much lower resolution than biome surface materials and the use of local procedural noises will not be noticed by the player.</div>
<div>
<div>
<br /></div>
<div>
The material stack functionality may be sufficient to place as some materials in the stack can be sufficiently rare. The biome designer will be able to configure the abundance and occurrence pattern of any material in the stack.</div>
</div>
<div>
<br /></div>
<div>
<div>
The procedural generation is executed by both GPU shaders and CPU voxel algorithms.</div>
<div>
<br /></div>
<div>
The shader will compute a fragment color for each of the three scales, and it will blend these samples based on the distance from the camera to the fragment.</div>
<div>
<br /></div>
<div>
Any detail that is small enough to not register in the geometry, but that still contributes to the perceived complexity of the surfaces, will be captured by normal maps generated in real-time from the procedural definition of materials, biomes or the high-order moon definition maps. This technique will keep low polygon counts for the scene.</div>
<div>
<br /></div>
<div>
The trade-off is that biome and high-order definition maps will have to be resident on GPU while the moon is in view. It is possible to selectively upload only the mipmaps necessary for rendering the current moon scale. The total amount of GPU memory required at any time will be reduced to a minimum by streaming mipmaps in and out of GPU as the viewer position changes.</div>
<div>
<br /></div>
<div>
When features become large enough due to their proximity to the camera, they begin to appear in the geometry output by the real-time voxel generation. This also applies to any sections of the moon that may have been terraformed or mined by the players. If the changes are large enough they could be perceived from orbit, as Voxel Farm’s adaptive scene manager will increase the LOD for any areas with modifications deemed important by the application.</div>
</div>
Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com16tag:blogger.com,1999:blog-3779956188045272690.post-66385314084305664302018-10-11T13:34:00.000-04:002018-10-11T13:46:31.095-04:00Thinking about voxelsVery often people ask me what a voxel is. I struggle to explain this in simple terms, even to savvy professionals from other fields of IT. In most occasions, I just say a voxel is like a pixel, but in 3D, and move on to refresh my drink or hide in a lavatory. I can't help the feeling I have avoided the question.<br />
<br />
To help understand why voxels matter today, we need a different analogy. If I had enough time, I would say <i>voxels are like triangles</i>.<br />
<br />
A triangle defines a closed 2D space. Imagine we want to do something to this closed space, for instance, paint it red. We could do this by drawing one long line and making the right turns until we have our triangle:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMhKXxz5_OY-uw1EquDDuVdaEfeT381I4Sp-lYX_XPTkiR58yHRgR1erExOqhtliCwvJUVOYZJwWTET12fNqDUqkxC908HKoJsruxaHG44H9LzCofhjMSzMsSsBCnboFauLn9aOe1zdRY/s1600/raster1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="298" data-original-width="820" height="145" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMhKXxz5_OY-uw1EquDDuVdaEfeT381I4Sp-lYX_XPTkiR58yHRgR1erExOqhtliCwvJUVOYZJwWTET12fNqDUqkxC908HKoJsruxaHG44H9LzCofhjMSzMsSsBCnboFauLn9aOe1zdRY/s400/raster1.png" width="400" /></a></div>
<br />
This is how most triangle rasterization worked in the early days. Even after many clever optimizations, it remained awfully slow. It was an inherently serial solution. The value we paint for one point depends on computations we made for earlier points. This would never scale up to hundreds of millions of triangles per second, even with the transistor densities we have today.<br />
<br />
GPUs changed that. They render triangles faster only because the problem is solved in parallel. Remember how a triangle is a closed 2D space? That means there is "inside" versus "outside". The GPU, with a simple test, will know this. If a point is inside it will be painted red. It does not matter whether previous points were inside. Since there are no dependencies between points, the GPU is free to look at many points at the same time.<br />
<br />
This amazing property of triangles, where they can tell inside from outside without any additional context, enabled the GPU age.<br />
<br />
Just like a triangle defines a closed 2D space, a voxel defines a closed 3D space. And just like a triangle, a voxel can have any properties you want. It could have a color, or a material, or even surface parametrization. Voxels can use UV maps and textures in the same way triangles do. In this next image, you can see this voxel rock that looks indistinguishable from your typical low-poly textured mesh:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA2VAXewLhFjqW2PWfpfYG6qTIKMxdZ7t6bgPSlxWOxaZV92OB7aJeLcT0DaICz5DeOGcH8SyvPXseIPGt6xcJCGVil6gBKWwbprzzCjv_1DXXpsNsY_pwI1SA49ppNiSE5WNf0Vz338g/s1600/voxeluv.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="381" data-original-width="496" height="306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA2VAXewLhFjqW2PWfpfYG6qTIKMxdZ7t6bgPSlxWOxaZV92OB7aJeLcT0DaICz5DeOGcH8SyvPXseIPGt6xcJCGVil6gBKWwbprzzCjv_1DXXpsNsY_pwI1SA49ppNiSE5WNf0Vz338g/s400/voxeluv.jpg" width="400" /></a></div>
<br />
We tend to think of voxels as cubes, and most of the time this is correct. A voxel cube is equivalent to a surface quad. Just like the quad can be split into two triangles, a voxel cube can be split into five tetrahedron voxels.<br />
<br />
And just like triangles did for 2D problems, voxels enable massively parallel processing for problems in 3D. I think this is a big deal.<br />
<br />
But what are these problems that you need to solve in 3D?<br />
<br />
Rendering is <u>not</u> one of them, contrary to what intuition may tell you. Rendering is about projecting the data into 2D so humans can understand it. It will always be solved more efficiently using 2D elements like triangles and surface processors like GPUs. While "seeing" is very important for humans, it does not really mean anything to a computer. They have no problem working in higher dimensions.<br />
<br />
Pretty much everything else is a problem in 3D. Here is a basic one: Imagine you needed to compute the volume of a very random 3D object that has the size of a small town. If you are using voxel data, you can have hundreds of nodes in a network compute a small section of the object's volume and then add the results to get the final volume. You would get the results in a fraction of the time. This is only possible because voxels, like triangles did it for GPUs, allow you to answer the inside/outside question locally. That's the voxel Eureka moment.<br />
<br />
This enables many Holy Grail solutions which for brevity reasons I won't enumerate, but that I will be happy to discuss if you drop me a comment below.<br />
<br />
Today, most of the entertainment and geospatial industries still use serial, on-core, approaches to solving their 3D content problems.<br />
<br />
As the data grows and more entities are required to produce it and consume it, the shift to parallel computing will necessarily happen. And we can be certain voxels will be at the heart of this next age, just like triangles were at the center of the GPU revolution.<br />
<br />Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com7tag:blogger.com,1999:blog-3779956188045272690.post-53185601391404868912018-07-26T20:59:00.000-04:002018-07-27T00:35:18.749-04:00Back to the FarmWe have built a pretty neat system. It is a spatial storing and processing platform.<br />
<br />
If you check the origins of this project, you'll see it was about using a server farm to store and process 3D content. This system is the realization of this early goal.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI-TuQbuFxPZ5zRwPmgiBHs9mAqt55sQElYpaoDmgiwxTOB0flG2_5DbLU7GPkiNHHBx0nUkT42Jkbvs6P66DbNvyFgqKYfQL5woCMXha8DCBPzJF12k5EzkauWFjXlDYRRFxjoJbJYT8/s1600/cloud5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="867" data-original-width="1600" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI-TuQbuFxPZ5zRwPmgiBHs9mAqt55sQElYpaoDmgiwxTOB0flG2_5DbLU7GPkiNHHBx0nUkT42Jkbvs6P66DbNvyFgqKYfQL5woCMXha8DCBPzJF12k5EzkauWFjXlDYRRFxjoJbJYT8/s400/cloud5.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
The system can store virtually unlimited data, it can cover millions of square kilometers at a sub-millimeter resolution and it can serve a virtually unlimited number of concurrent users.<br />
<br />
As it is today, you would use it as a self-serve website, like Dropbox but for spatial data:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwCI8Z7h7HW_Sazv7XUBidUAjAsJLM46Mm15zo1wZYQhomkr8PLp4awpzBi2wtX4ikFLxOu6tc-06OsfZ7tzyoiZs0TkmtF7iyd4a2Bn-_Qf7hAGqbMT2gtZclhlLTYiBkZ2KX2HM_bag/s1600/cloud2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="867" data-original-width="1600" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwCI8Z7h7HW_Sazv7XUBidUAjAsJLM46Mm15zo1wZYQhomkr8PLp4awpzBi2wtX4ikFLxOu6tc-06OsfZ7tzyoiZs0TkmtF7iyd4a2Bn-_Qf7hAGqbMT2gtZclhlLTYiBkZ2KX2HM_bag/s400/cloud2.png" width="400" /></a></div>
<br />
We can take raw data in the form of point clouds, heightmaps, imagery, meshes, etc. and convert them into more useful things like terrain surfaces or volumetric models. You can view these datasets right in the browser.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-JQFEV297uEU_BNYNNjoqSCDR9lXiXbr-HoHvNu9EXTAAsO9wadADFN_lO4fFx42gv7XYoRXSABFDD1ptE-5fJSd-iv97kXga2kTloskK1lwwHbJnbfWyk_iXbml50EDPXnN0HMsdEyI/s1600/cloud3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="867" data-original-width="1600" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-JQFEV297uEU_BNYNNjoqSCDR9lXiXbr-HoHvNu9EXTAAsO9wadADFN_lO4fFx42gv7XYoRXSABFDD1ptE-5fJSd-iv97kXga2kTloskK1lwwHbJnbfWyk_iXbml50EDPXnN0HMsdEyI/s400/cloud3.png" width="400" /></a></div>
<br />
The really cool part is the parallel processing. Thanks to this aspect, we can compute complex volumetric operations and other queries on the data in real time. For instance, we can compare two different snapshots of terrain and show what has changed:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5TZ6Upw-W7Nu9ftbu5GfVRK4ETwyz2bCKTEJyxSnL-bxFA1VFogzx8dct27GOUWyMXvIpG1rmrl0D8f1sFhEyhgKXBvh8XqYlUjP58kf2LcEP824TpzWQl7CKNIPhdU7oB0t9g8opRqI/s1600/cloud4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="453" data-original-width="634" height="285" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5TZ6Upw-W7Nu9ftbu5GfVRK4ETwyz2bCKTEJyxSnL-bxFA1VFogzx8dct27GOUWyMXvIpG1rmrl0D8f1sFhEyhgKXBvh8XqYlUjP58kf2LcEP824TpzWQl7CKNIPhdU7oB0t9g8opRqI/s400/cloud4.png" width="400" /></a></div>
<br />
In the near future, we will link the Voxel Farm plugins for Unity and UE4 to this system, so you can easily share these datasets among team-members and even end-users.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjugp-GO7gdW95Dd3U_AueIHIuh6AguuV84xILJORdUObLWX4gfi3-c-LjdoQiL6jaMywdbfR9jQ5WQyT8zownrE9WziYnkDjPfwSur2TOOtlHZVIEQMk4VY-ZXCNuBZCktAPq6dJCZiO0/s1600/ue4terrain.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="875" data-original-width="1600" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjugp-GO7gdW95Dd3U_AueIHIuh6AguuV84xILJORdUObLWX4gfi3-c-LjdoQiL6jaMywdbfR9jQ5WQyT8zownrE9WziYnkDjPfwSur2TOOtlHZVIEQMk4VY-ZXCNuBZCktAPq6dJCZiO0/s400/ue4terrain.png" width="400" /></a></div>
<br />
The first release of this system will be very oriented towards the geo-spatial and mining industry, we will focus on entertainment projects a bit later.<br />
<br />
I will be covering this in more detail in future posts, but if you are intrigued by this drop me a line to miguel at voxelfarm.com and I will send you a link.Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com8tag:blogger.com,1999:blog-3779956188045272690.post-72042668708472686902017-12-17T23:56:00.000-05:002017-12-17T23:56:40.904-05:00Making the CitadelWe just put up a video of how the Magic Citadel demo for UE4 was built:<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="encrypted-media" allowfullscreen="" frameborder="0" gesture="media" height="315" src="https://www.youtube.com/embed/vef6GZom1Fk?rel=0" width="560"></iframe>
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The demo is not available yet, we are still working on the game-side of it in UE4, but the Citadel model is pretty much complete at this point. I would like to cover a couple of aspects that I find interesting from this experience.</div>
<br />
A question I often get is why use voxels at all. I usually point at the obvious bits: If you want to do real-time constructive solid geometry (CSG) pretty much anything else is too slow. CSG is what allows to create game mechanics like harvesting, tunneling, destruction and building new things. Also, if you are doing procedural generation of anything that goes beyond heightmaps, voxels make it much easier to express and realize your procedural objects into something you can render using traditional engines like UE and Unity.<br />
<br />
What I rarely say is that once you work with voxels, your mind changes. I let people figure this out by themselves, I do not want to be that weird guy saying you really need to try LSD. You change because you begin seeing your entire project as a single fabric of content. You feel more like you are working on a canvas. There is no difference between a tower roof versus terrain you have terraformed. It is a really distinct feel, which cannot be explained rather experienced.<br />
<br />
If you have developed for UE4 or Unity before, think of how you would approach a project like this Citadel. While it is possible, you would be building out of a myriad of objects placed in your scene. You would have an object for the terrain, static meshes for the towers, walls, even the rocks making up your cliffs would be a bunch of instanced meshes clearly intersecting each other. Simply put, there is no canvas, instead, you have a collection of things.<br />
<br />
If you want to have large organic shapes, like a massive spiral tower that slowly unravels over hundreds of meters, you would need to carefully plan how to deal with all this unique geometry. The image below shows an example of this from the Citadel:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoD1XygVFYg4hCwAnAIRyBSb22p4VlIYFloA0FMoFJz0Xi7Vfu3T3cfKQcteEjDS4WIa0JTGVym1zW2VJDvpdDq_29O-fOnPwf5lSFeuusceYv2EAG2aXFLbuLjPojBKZwv5v_fPW4N14/s1600/citadelspiral.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="873" data-original-width="1600" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoD1XygVFYg4hCwAnAIRyBSb22p4VlIYFloA0FMoFJz0Xi7Vfu3T3cfKQcteEjDS4WIa0JTGVym1zW2VJDvpdDq_29O-fOnPwf5lSFeuusceYv2EAG2aXFLbuLjPojBKZwv5v_fPW4N14/s400/citadelspiral.png" width="400" /></a></div>
<br />
It gets messy. This often leads to not having unique geometry at all, as it is too much trouble. It is unfortunate. Unique geometry can take your content to a whole new level. Once you have experienced it for a while, going back to the traditional instance-based approach is immersion breaking, at least it is for me now.<br />
<br />
When you build out of individual small pieces, even if they have LODs of their own, their agglomeration cannot be trivially condensed into single objects that will efficiently LOD. Serious consideration needs to go into which objects you use to build the world, how large they can be, how you can reuse them and create cheap variations of them. All this planning takes a lot of work and mostly, a big deal of experience.<br />
<br />
This is why it takes a Triple-A team to produce complex scenes and rich open worlds. Even when there is plenty of very talented artists out there, the slew of tricks you need to apply remains a veiled, mysterious art. We should not need GDC talks. The current state of the industry is as if Microsoft Word would limit the kind of novel you can write with it, and only those versed in Word's options and macros were able to create compelling fiction with it.<br />
<br />
As I see it, it is really about the "fabric" that makes the virtual world. Once it becomes an organic canvas, you can automate tricks like LODs, culling and visibility sets in simple, robust ways. Let the computer do the hacks for you.<br />
<br />
The other advantage of developing a virtual world as it were a canvas, is that your workflow becomes closer to what you experience working in Photoshop, versus the Maya-Blender experience. This is one of my favorite bits in the video above, it starts around the 2:54 mark. The artist first defines the basic volumes and then continues to refine them. I find this very intuitive and close to how people create in pixel-based systems like Photoshop.<br />
<br />
Talking about artists, this Citadel project was possible thanks to Ben, who became part of the Voxel Farm team early this year. The amount of work he was able to put into this Citadel is incredible, as is the quality of his work. Ben caught everyone's attention as a player-builder in Landmark, under the Ginsan alias. Here is one voxel beauty he created back then:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA-Rch-jRNvPBsh2CzL1BRw145SiFtQw809AZRk17Xuhp9C6Zp7hjjURo85Jiwce3uy5AvO8hR3wayxzbnGiV96nQoONfw7taXcxY-vYXul_JxbD2p_SKj2i_NX92Tyo5EjRbiNsHARUc/s1600/img_20141216-05-53-39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="724" data-original-width="1366" height="211" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA-Rch-jRNvPBsh2CzL1BRw145SiFtQw809AZRk17Xuhp9C6Zp7hjjURo85Jiwce3uy5AvO8hR3wayxzbnGiV96nQoONfw7taXcxY-vYXul_JxbD2p_SKj2i_NX92Tyo5EjRbiNsHARUc/s400/img_20141216-05-53-39.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Screenshot from Landmark (SOE/Daybreak)</i></div>
<br />
A true Renaissance man, Ben also created the superb music for the video above. He often tweets about his progress in new Voxel Farm projects, if you are curious about what he is working on, make sure to follow him <a href="https://twitter.com/adamiseve">https://twitter.com/adamiseve</a>Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com31tag:blogger.com,1999:blog-3779956188045272690.post-60114458419243107552017-08-29T14:54:00.001-04:002017-08-30T06:43:12.121-04:00Is voxel data bigger than polygon dataWe just got some fresh measurements that I would like to share.<br />
<br />
Voxels and polygons are alternative forms of storing and visualizing 3D information. They are pretty much equivalent in terms you could represent the same information, the key difference is there are penalties attached to each method.<br />
<br />
For instance, if you want to change the world in real-time, like making holes, cutting pieces or merging different shapes, voxels are likely to outperform polygons. The same applies if you want to merge layers of procedural content in real time. This is fast because voxels are a much simpler representation of the content. If you were doing this with polygons, you must use more complex and slower methods.<br />
<br />
On the other hand, polygons can represent and reproduce some surfaces more economically. This is the reason why the graphics industry adopted polygons so early.<br />
<br />
One aspect where we can do an apple-to-apple comparison is data size. The experiment would be this: Get a fairly large scene, store it both as voxels and polygons, and see which dataset is larger. We would be measuring the final size of the package, that is, how much data you need to download to have a complete scene.<br />
<br />
This is what we did. We used Ben's work-in-progress scene, which features a massive citadel. The following video shows a character running around this place. You do not have to watch all this to realize it is a pretty big place:<br />
<br />
<div style="text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/1zc6ucfJosI" width="560"></iframe>
</div>
<div style="text-align: center;">
<br /></div>
(Please ignore the rough edges in the video, this is an un-optimized test aimed to get a feeling of the scale of the place.)<br />
<br />
Everything you see there is voxel content. There are no props or instances. This is all unique geometry, forming a watertight mesh:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCKJt-tLYNIZPTa8DOFxNROij1hbCxJLvG2ZvU-XvMF8Za8jQhPV-UsEP7je73UWQ0qTO7boofpYf0a6E9dLVBf4JWbu45cadV3ubNbtSzMUcHjfgLYAJd5ATFWI4xPeIJlbXh3fVE5uc/s1600/mesh.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="789" data-original-width="1600" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCKJt-tLYNIZPTa8DOFxNROij1hbCxJLvG2ZvU-XvMF8Za8jQhPV-UsEP7je73UWQ0qTO7boofpYf0a6E9dLVBf4JWbu45cadV3ubNbtSzMUcHjfgLYAJd5ATFWI4xPeIJlbXh3fVE5uc/s400/mesh.png" width="400" /></a></div>
<br />
Here are the core stats about the scene:<br />
<br />
54,080,225 triangles<br />
2,203,456,000 voxels<br />
<br />
This is the first takeaway. It takes 2 billion voxels to represent the same content as 54 million polygons. You need 40 times more voxels than polygons.<br />
<br />
Is the voxel dataset 40 times the size of the polygon dataset?<br />
<br />
That, you guessed, depends on how much smaller a voxel is than a polygon, also what is the overhead in storing them. Let's talk about that.<br />
<br />
We store meshes as:<br />
<ul>
<li>a list of vertex coordinates (3 x 32bit float)</li>
<li>a list of faces, where each face is three indices into the vertex list (3 x 32bit int)</li>
<li>a list of UV pairs, one per each vertex in a face (2 x 32bit float)</li>
<li>a list of material identifiers, one per each face (16 bit)</li>
</ul>
<div>
For the entire scene, the final compressed version of this data is 527 MB.</div>
<div>
<br /></div>
<div>
Voxels, on the other hand, store:</div>
<div>
<ul>
<li>attributes (empty, has material, has UV, etc. 8bit int)</li>
<li>one 3D point (3 x 8bit float)</li>
<li>up to 12 UV entries with surface properties (each 64bit)</li>
<li>inner material (16bit int)</li>
</ul>
</div>
The compressed final version of the voxel data is 1,210 MB.<br />
<br />
It seems the voxel data takes twice the space. This somehow feels right, considering everything we have heard about voxels versus polygons, it is no surprise voxels take twice the space as polygons for the same content.<br />
<br />
But there is a little problem with this test. It is not really apples-to-apples. Here is why:<br />
<br />
The polygon version of the content captures only the <i>visible</i> surfaces. That is when the solid materials meet air. These are the portions of the model you can actually see.<br />
<br />
The voxel version of the content also captures hidden surfaces. While you cannot see these initially, they may become exposed later due to changes made by the viewer to the scene, for instance, while destroying or building things.<br />
<br />
This image shows why these two sets of surfaces are different:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirep91wiFpcsIHPO4mGiqn9x75MfpR40FBwXzaNlShQ1Iw5DO1xKPKpQR_sBtpfh_Fm6aH6OAC5GScFDO2q6pEGeFUh36r8sPaF5944UEI4Y3LCtf6BOdk5MPXW6cWmluKAcR-Nyaw670/s1600/surfaces.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="532" data-original-width="1585" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirep91wiFpcsIHPO4mGiqn9x75MfpR40FBwXzaNlShQ1Iw5DO1xKPKpQR_sBtpfh_Fm6aH6OAC5GScFDO2q6pEGeFUh36r8sPaF5944UEI4Y3LCtf6BOdk5MPXW6cWmluKAcR-Nyaw670/s400/surfaces.png" width="400" /></a></div>
<br />
The red arrows point to surfaces that appear in the voxel set but are not included in the polygon set.<br />
<br />
Luckily for us, we can change the contour rules and also produce these surfaces in the polygon dataset. After a collecting a new set of stats for this new configuration, the new polygon count is 122,470,300 triangles. Once this is compressed, the final storage is 1,105 MB.<br />
<br />
Now, this has come very close to the voxel database size. Does this make any sense?<br />
<br />
What is maybe most surprising is that we expected the sizes to be different. In both cases, we are capturing surfaces. Even if they are fully volumetric, voxels only really get "busy" around surfaces. This is not much different than polygons.<br />
<br />
Of course, there are nuances in how the information is compressed. In each case, we could be using tailored compression schemes. But at this point, this will be producing diminishing returns, and the ratio between voxel data and polygon data is not likely to change much.<br />
<br />
If you have questions or opinions about these measurements, I'd love to discuss them. Just post a comment below.Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com22tag:blogger.com,1999:blog-3779956188045272690.post-64639778806167330532017-06-30T20:29:00.000-04:002017-07-04T11:26:13.730-04:00Unity versus UnrealThis topic is as divisive as the US 2016 presidential election, so I'll tread carefully.<br />
<br />
As a middleware maker, it makes no sense to have favorites. We do our best to keep integrations of Voxel Farm on par so we reach as many users as possible. As an individual, I see no problem stating I prefer Unreal, but this is only because it is an all C++ environment. It is not a rational thing.<br />
<br />
This post, however, is not about how I feel. It is rather about the state of the two engines and how much they facilitate procedural generation and working with voxel data. I think many of the issues we have encountered over the past few years are common if you are doing a similar type of work with these engines. Hopefully, our story can help.<br />
<br />
Let's start with the visuals. Both Unity and Unreal are capable of rendering beautiful scenes. Both are also able to render at very high frame rates, even for fairly complex content. This has likely been the lion's share of their R&D for years now. Unity has one crucial advantage over Unreal, which is it natively supports texture arrays. Unreal <i>almost</i> supports them, in fact, we managed to make them work in a custom branch of UE4 with little effort. However, this is not possible with the out-of-the-box Unreal distribution. That is a dealbreaker if your middleware is to be used as a plugin like it is our case.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitnjTgidCsGXEg9qvnKoP9ZoQ5BmvCYc6iPQfi2cMW-QqNEjI24YwLPrL5tFOFOrokrdVGUkA4NyWrgoofbeWQXGbItAPXBuoJ9H4ceC95RcDgwiiYHOT88TKqIkc3yCKQhf1r42UFRzY/s1600/unityta.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="876" data-original-width="1600" height="218" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitnjTgidCsGXEg9qvnKoP9ZoQ5BmvCYc6iPQfi2cMW-QqNEjI24YwLPrL5tFOFOrokrdVGUkA4NyWrgoofbeWQXGbItAPXBuoJ9H4ceC95RcDgwiiYHOT88TKqIkc3yCKQhf1r42UFRzY/s400/unityta.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Texture Arrays in Unity allow precise filtering and high detail</i></div>
<br />
Texture arrays make a big difference if you need complex materials where many different types of surfaces need to be splatted in a single draw call. When an engine lacks texture array support, you must use 2D atlasing. This raises a whole hell of issues, like having to pick mip levels yourself and wasting precious memory in padding textures to avoid bleeding. When you hit this low point, you begin to seriously question your career choices.<br />
<br />
If your application uses procedural generation, it likely means the contents of the scene is not known when the application is in design mode. This is at odds with how these engines have evolved to work. If your application allows users to change the world, it only makes it worse. For the most part, both engines expect you to manage new chunks of content in the main thread. This is something that if left unattended can cause severe spikes in your framerate.<br />
<br />
There are multiple aspects involved in maintaining a dynamic world. First, you must update the meshes you use to render the world. This is fairly quick in both engines, but it does not come free. Then, you must create collision models for the new geometry. Here Unreal does better. Since you have closer access to the PhysX implementation, you can submit a much simpler version of the content. In Unity, you may be stuck with using the same geometry for rendering as colliders. (EDIT: I was wrong about this, see the comments section.) From reading their latest update, I see this motivated the <a href="http://cardlifegame.com/index.php/devblog/174-devblog36" target="_blank">Card Life developers to ditch PhysX collisions</a> altogether.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB9SCW8u_YrxKPcRZxY90-Gf8KC_74lKHkB1Pi-7-AdaW2dORUWk5CiHfVPYUoRT7nWKC8mx0aYKj8qIxzeiHrh-DFWy1ngvsx-raHHwOmwcZbBjIGXoLjiuwQpN6669AJ0H5bOF7PebI/s1600/cardlife.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="926" data-original-width="1600" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB9SCW8u_YrxKPcRZxY90-Gf8KC_74lKHkB1Pi-7-AdaW2dORUWk5CiHfVPYUoRT7nWKC8mx0aYKj8qIxzeiHrh-DFWy1ngvsx-raHHwOmwcZbBjIGXoLjiuwQpN6669AJ0H5bOF7PebI/s400/cardlife.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Card Life, made in Unity, features a hi-res voxel world</i></div>
<br />
Voxel Farm allows players to cut arbitrary chunks of the world, which then become subject to physics. Unity was able to take fragments of any complexity and properly simulate physics for them. Unreal, on the other hand, would model each fragment as a cube. Apparently, PhysX is not able to compute convex hulls, so for any object subject to physics, you must supply a simplified model. Unity appears to create these on-the-fly. For Unreal, we had to plug in a separate convex hull generation algorithm. Only then we could get the ball rolling, literally.<br />
<br />
When it comes to AI and pathfinding, both engines appear to use Recast, which is a third party navigation mesh library. Recast uses voxels under the hood (go voxels!) but this aspect is not exposed by its interface. For a voxel system like us, it is a bit awkward to be submitting meshes to Recast, which then are voxelized again and ultimately contoured back into navigation meshes. But this is not bad, just messy. There is one key difference here between Unreal and Unity. Unreal will not let you change the scope of the nav-mesh solution in real-time. That means you cannot have the nav-mesh scope follow the player across a large open world. It is unfortunate since this is a tiny correction if you can modify the source code, but again for a plugin like Voxel Farm it is not an option.<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/a9c8lvTLUoI" width="560"></iframe></div>
<div style="text-align: center;">
<i>Dynamic nav-mesh in UE4</i></div>
<i style="text-align: center;"><br /></i> This brings me to the last issue in this post, which is the fact Unreal is open source while Unity is closed. As a plugin developer, I find myself surprised to think a closed source system may be more amicable for plugin development. Here is my rationale: So far the open source model has been great allowing us to discover why a given feature will not work in the official distribution. You can clearly see the brick wall you are about to hit. For application developers, open source works better because you can always fork the engine code and remove the brick wall. The problem is this takes the pressure off and the brick wall stays there for longer. In Unity, both application and middleware developers must use the same version of the engine. I believe this creates an incentive for a more complete interface.<br />
<br />
I'm sure there is more to add to this topic. There are some key aspects we still need to cover for both engines, like multiplayer. If you find any of our issues to be unjustified, I would love to be proven wrong, for the betterment of our little engine. Just let me know by dropping a comment.Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com18tag:blogger.com,1999:blog-3779956188045272690.post-60329482225417072252017-05-02T13:50:00.001-04:002017-05-02T13:51:23.902-04:00Plugin Status<div class="separator" style="clear: both; text-align: left;">
I'm happy to see our team of excellent developers at chez Voxel Farm has made quick and large improvements to our plugins for Unreal Engine 4 and Unity 5.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
The UE4 plugin is now a proper UE4 plugin, not just an example for integration anymore. This opened a whole new set of possibilities. In a very short time, we were able to put together this video from different scenes and interaction modes within UE4:<br />
<br />
<div style="text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/-O_2wkbaeNs" width="560"></iframe>
</div>
<br />
The new Voxel Farm UI makes it quite simple to add Voxel Farm to any existing or new project. There is a button that will do that for you, requiring you to just point to the target project:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEwrkfU6oVjkJzVuDnD38nD6r1P2XGsuu37CzsGXBvaP_C01TTQr7VCmHxYVzGWy9Ng44dHh29oCCw765aprk9bitZ2HOHslYsjsR_s6UEySH5vBx22CK4OiZVJMmFGhEQms8KIxFGG9A/s1600/2017_04_15_03_49_131.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEwrkfU6oVjkJzVuDnD38nD6r1P2XGsuu37CzsGXBvaP_C01TTQr7VCmHxYVzGWy9Ng44dHh29oCCw765aprk9bitZ2HOHslYsjsR_s6UEySH5vBx22CK4OiZVJMmFGhEQms8KIxFGG9A/s400/2017_04_15_03_49_131.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The plugin already offers blueprint access for typical tasks like block edition, voxelization and physics. The threading model is much better, resulting in a smoother experience.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
There is a new demo for UE4, now including the plugin:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-u8eUE8qdBoP-vAfKInjOO6LHR_Y8ENmDY75MAwwF1qXPXPk3Yvso4wy3Gky4XGTXMK5ChU4SwuJ9YpfDSiWWSk4Gvgea-Sa5ClX04kfGmMDQy6GsBhHHesrcTeJdIjpuN_L2QY5_VzA/s1600/pyramidue4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-u8eUE8qdBoP-vAfKInjOO6LHR_Y8ENmDY75MAwwF1qXPXPk3Yvso4wy3Gky4XGTXMK5ChU4SwuJ9YpfDSiWWSk4Gvgea-Sa5ClX04kfGmMDQy6GsBhHHesrcTeJdIjpuN_L2QY5_VzA/s400/pyramidue4.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
If you want to get a feeling of how the plugin is used in UE4, <a href="http://www.voxelfarm.com/doc.html?unreal-engine-4-help-topics">these topics</a> will help.<br />
<br />
If you are thinking Unity gets no love, you would be wrong. Most of our recent efforts went into the Unity plugin. I will cover this in my next post.<br />
<br />
<br />Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com12tag:blogger.com,1999:blog-3779956188045272690.post-80699018274302641292017-03-23T19:33:00.001-04:002017-03-24T07:39:26.868-04:00Destroy The Block"Destroy The Block" is a new demo we put together to showcase the new Unreal Engine 4 plugin. In this post, I will go over what this took.<br />
<br />
The demo will soon be included in <a href="http://www.voxelfarm.com/demos.html" target="_blank">Voxel Farm's demo package</a>, meanwhile here is a video:<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/Z0upnXTM_kk" width="560"></iframe>
<br />
<br />
If 20 min of that was not enough, here is an earlier video of just driving around town in different cars:<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/UVvduE3iquE" width="560"></iframe>
<br />
<br />
<div class="separator" style="clear: both;">
We did not create this town model. It was a Minecraft import. Following a comment in this blog by Piotr Kucharczyk, I took a look at Minecraft's Anvil format. It turned out to be quite reasonable and easy to use. </div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
After a few hours of work, I was able to see Minecraft levels in Voxel Studio. I started with the King's Landing model, I was curious if our systems would be OK with such a complex model. It turned out to be alright:</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKCE-ZFsOZH4mDqL7GFeydPcEENqK712YYCy9nbmfE8rirwQRY09hpIoqnKrI5ddRJPz0etx9sMhsd7B4e5eBQfjw0bEUyqcsj36KWaAH_4VBUZpITvVLN7OZ-zaKyV9Lsl_XERPWw5Og/s1600/mckingslanding.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKCE-ZFsOZH4mDqL7GFeydPcEENqK712YYCy9nbmfE8rirwQRY09hpIoqnKrI5ddRJPz0etx9sMhsd7B4e5eBQfjw0bEUyqcsj36KWaAH_4VBUZpITvVLN7OZ-zaKyV9Lsl_XERPWw5Og/s400/mckingslanding.jpg" width="400" /></a></div>
<div class="separator" style="clear: both;">
<br /></div>
This model was not a good option for several reasons, mainly it was too crowded for any first person gameplay to happen. Maybe riding a voxel dragon and setting the city on fire, but that would be too obvious.<br />
<br />
So we settled on the town level. The natural environment, which is not blocky but rather smooth, was created with a single Smart Biome in Voxel Studio in a few minutes:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCmLgtje8EFeBvLNFFAUKEK_hWA3Plc1ibxPo9gcxJqNOXOqaiKOLyCTyvZT7MWGUWrX3fb9PWKaLB8RVh2PUuYqYCY3GNGrFCD8isn1hZDibv9-VjhFJglLOqfugSeKFxOldH7XvMMcU/s1600/mclandscape.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="287" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCmLgtje8EFeBvLNFFAUKEK_hWA3Plc1ibxPo9gcxJqNOXOqaiKOLyCTyvZT7MWGUWrX3fb9PWKaLB8RVh2PUuYqYCY3GNGrFCD8isn1hZDibv9-VjhFJglLOqfugSeKFxOldH7XvMMcU/s400/mclandscape.jpg" width="400" /></a></div>
<br />
We then imported this project into Unreal Engine 4, using the new Voxel Farm plugin. It took some time to figure out what would be the right scale for the scene. Since Voxel Farm's voxels are much smaller, the default configuration felt closer to a Godzilla/Kaiju simulator. That would have been a nice demo, but I was looking for a more human-level experience.<br />
<br />
Minecraft levels may appear simple in the mind's eye, but a level like this town is insanely complex. All buildings, without exception, have intricate interiors. Here you can see a cross section of a residential tower:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX9DcczB3AXLhNBtrfSvfTFhROjJliriavIp0L4rq_P9bCqKN2ihiqH8gUOfqsFjh2PVgYw5IAsactUtmG5ZqtZdocPRigd3KaKe_N5bTvwLNmAa45ogsfqDbyI-J1mXpIm-3GP8FgbiQ/s1600/crossection.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX9DcczB3AXLhNBtrfSvfTFhROjJliriavIp0L4rq_P9bCqKN2ihiqH8gUOfqsFjh2PVgYw5IAsactUtmG5ZqtZdocPRigd3KaKe_N5bTvwLNmAa45ogsfqDbyI-J1mXpIm-3GP8FgbiQ/s400/crossection.jpg" width="400" /></a></div>
<br />
As you can see each apartment is fully defined, they even have little beds!<br />
<br />
To further complicate things, the draw distance needed to be insanely high so detail like windows would appear when from viewed far away:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdf2hr4OObROPfboOjQ1eIoEc2J6Zf63miZflUaSLo-Dfr9HQnKnVmyhOPAw9zSUOI9F2NlKndGQNvF27qWlk-twzwYZ_03DLzmtWVhzoAmBlqm5iLOnckPSyU1cINLl4hut7rCzd7ADc/s1600/far.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdf2hr4OObROPfboOjQ1eIoEc2J6Zf63miZflUaSLo-Dfr9HQnKnVmyhOPAw9zSUOI9F2NlKndGQNvF27qWlk-twzwYZ_03DLzmtWVhzoAmBlqm5iLOnckPSyU1cINLl4hut7rCzd7ADc/s400/far.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This tall building is 1.5 Km away, but it is still rendered in full detail. The player can use the sniper scope at any time, and the switch must be immediate. There is not enough time to load a higher definition of the building.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Mesh optimization really helped here. Any surface that contains multiple voxels of the same material can be heavily optimized. The following image shows how this makes a big difference in triangle counts:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKljAAxEtEs_LuVlV5IBF0R2Ff4NPU-VQL_GYZFF3zOL2IetQ4s1zyL79qvZILvNmZD-u7V-dcj4UZfYsri5_nPVm8uYhzxhrYcofXNulXCAF2cmWw8_HiC0iggXOlAng1PTnG1rpqSUQ/s1600/meshsimp.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKljAAxEtEs_LuVlV5IBF0R2Ff4NPU-VQL_GYZFF3zOL2IetQ4s1zyL79qvZILvNmZD-u7V-dcj4UZfYsri5_nPVm8uYhzxhrYcofXNulXCAF2cmWw8_HiC0iggXOlAng1PTnG1rpqSUQ/s400/meshsimp.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I do not think vanilla Minecraft does this. Just thinking about how many triangles they need to push gave me a new sense of respect for their rendering engine.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The main goal of this demo was to tune the UE4 plugin and in particular the physics. We also spent some effort making sure the whole scene, including terrain, would load in 10 seconds or so. The demo's behavior and interaction with the Voxel Farm plugin were done using UE's blueprints. There is not a single line of C++ in this project. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I can say the demo is quite fun. <span style="background-color: white;"><span style="background-color: white;">M</span><span style="background-color: white;">y </span></span>girls have spent countless hours just driving around and destroying stuff. At the beginning, they were quite afraid of breaking anything, as if the police would come after them. Once they realized there were no consequences, they were able to fully unleash their destructive instincts.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
One last thing I would like to point out in these videos is what you cannot see: LOD changes and framerate hitches. This is achieved thanks to our new scene management system, which I began to cover <a href="http://procworld.blogspot.ca/2016/10/slaying-lod-monster.html"><span id="goog_86139572"></span>here</a> and <a href="http://procworld.blogspot.ca/2016/11/improved-lod.html" target="_blank">here</a> (third and final part of this series coming next).<br />
<br />
The Minecraft import should become a standard Voxel Farm feature soon, also depending on the interest we see around it. If you would like to do the same for one of your projects, just let us know.<br />
<br />
It was great that this entire exercise was triggered by a reader's comment to another post. As usual, I look forward to your comments and feedback.Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com18tag:blogger.com,1999:blog-3779956188045272690.post-65955515554932878432017-02-02T02:02:00.004-05:002017-02-02T02:10:49.876-05:00The very-far-awayThe <a href="http://procworld.blogspot.ca/2017/01/prettier-faster-terrains.html" target="_blank">previous post</a> described a new system that allows rendering rich surfaces we call "meta-materials" using low-resolution geometry. Meta-materials cover ranges from 100 meters to 10 meters. What about anything more distant than that, that is, the range from tens of kilometers down to 100 meters?<br />
<br />
It turns out the same system applies. You can think of this as "meta-meta-materials", we just do not call them that because one "meta" in a name is already too much. We have multiple objects that do fit that description. A terrain biome is one example.<br />
<br />
In this post, you can see the results of applying this method to biome objects. All images are in faux solid color, which we use to make sure feature placement is correct.<br />
<br />
Here is a single biome and the amount of geometry it takes to represent it:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5ZjDrbPlNg_7nq5_WbAiVlXPvaliR32XtMWDQEQ9pFJld6dNtsClAj_HyOTSc8zozruA6e-L7_MjGR7ToiNiTX9B_k1I4l8VveeNyjyHTyHJTimDStviA0OKlAYuFbANkANfFu6Q32do/s1600/terraingeometry.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5ZjDrbPlNg_7nq5_WbAiVlXPvaliR32XtMWDQEQ9pFJld6dNtsClAj_HyOTSc8zozruA6e-L7_MjGR7ToiNiTX9B_k1I4l8VveeNyjyHTyHJTimDStviA0OKlAYuFbANkANfFu6Q32do/s400/terraingeometry.jpg" width="400" /></a></div>
<br />
In order to capture the detail, this biome also uses 1024x1024 texture maps for diffuse color, normals and other maps required for physically based rendering. Terrain voxels, which are generated on the fly, emit UV coordinate pairs which link the voxel's position in the world with the right section of these texture maps.<br />
<br />
Here you can see multiple biomes in the same image, again in faux color, covering an area of approximately 3000 square kilometers:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizCOyHtL5grPCldhSCOT9eFRy5pZ5h9WEhKPdW2APsBcMV4MQ98e8vi9NpAoZBuMN0RRed3sy6wZqBqe9retN1-KYzE47I6LsVMZ9e5dZR4jKW4F95qubN-I5cXClAFoBqOrP8at0DcfM/s1600/terraingeometry2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizCOyHtL5grPCldhSCOT9eFRy5pZ5h9WEhKPdW2APsBcMV4MQ98e8vi9NpAoZBuMN0RRed3sy6wZqBqe9retN1-KYzE47I6LsVMZ9e5dZR4jKW4F95qubN-I5cXClAFoBqOrP8at0DcfM/s400/terraingeometry2.jpg" width="400" /></a></div>
<br />
Since most detail is contained by textures, it is possible to use a much coarser geometry. The following images show that we can crank up the mesh simplification and still obtain fairly good looking features:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFlDF9fykEG8JXE0Auf_d10GPbrgyW3ebm3wx4852Z4sdTcVCM47pFprj_bbYNjYiBs_srT3ccZN9EhiACtjmwPoOJBSL_p0eDxKRS6E8FfjyW42BXq7CT5AcwmCuGrbQaCPiE4o1FrGY/s1600/terraingeometry3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="398" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFlDF9fykEG8JXE0Auf_d10GPbrgyW3ebm3wx4852Z4sdTcVCM47pFprj_bbYNjYiBs_srT3ccZN9EhiACtjmwPoOJBSL_p0eDxKRS6E8FfjyW42BXq7CT5AcwmCuGrbQaCPiE4o1FrGY/s400/terraingeometry3.jpg" width="400" /></a></div>
<br />
As a creator of worlds, this feature is entirely transparent to you. These detail textures are automatically generated. Actually, all the content in these images was generated by our procedural algorithms, but if you had custom made maps, you would not need to be concerned about creating and maintaining the detail textures.<br />
<br />
Like I said in the <a href="http://procworld.blogspot.ca/2017/01/prettier-faster-terrains.html" target="_blank">previous post</a>, this is a technique frequently used in modern polygon-based terrain. The key here is this is now working on voxel terrains. These environments can be modified in real time by players. They can harvest materials, make trenches, even blow out entire craters in real time.Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com8tag:blogger.com,1999:blog-3779956188045272690.post-19128810700276002212017-01-30T00:58:00.003-05:002017-01-30T01:03:51.779-05:00Prettier, Faster TerrainsWe will be updating the terrain systems in Voxel Farm soon. Hopefully, it will get a lot prettier and faster. It is not often you get improvements in these two, for the most part, opposite directions. In this case, it seems we got lucky.<br />
<br />
It was thanks to a synergy between two existing aspects of the engine that get to play together really well. One is UV-mapped voxels, the other is meta-materials.<br />
<br />
Here is how it works: A single meta-materials describes a type of terrain. For instance, mountain cliff. Within this single meta-material you may find different materials. In the case of a cliff that could be exposed rock, mossy rock, grass, dislodged stones, dirt, etc. An artist gets to create how the meta-material surface is broken down into these sub-materials. The meta-material also has a volumetric definition, which is a displacement map and can be carefully tied to the sub-material map.<br />
<br />
When you are close to the meta-material's surface, it must be rendered as full geometry. This is because features in the meta-material, let's say a rock that sticks out, can measure up to dozens of meters. This content must be made of actual voxels so it can be harvested, destroyed, etc. It is not just a GPU displacement trick.<br />
<br />
As you are farther away from these features, using geometry to capture detail becomes expensive. You face the hard choice of keeping a high geometry density or dial down geometry and loose detail.<br />
<br />
The new terrain system can dial down geometry, but keep the appearance of detail by using automatically generated textures for the metamaterial. For the close range, it still uses geometry to capture detail, but at a certain distance the meta-material displacement can be represented with just a normal map. High resolution sub material textures for grass, rock, etc. are not needed anymore. A single color map is able to capture the look of the metamaterial from this distance. These are only a few extra maps that can be reused anywhere in the scene where the meta-material appears.<br />
<br />
The following image shows a single meta-material that uses geometry for the close range and texture maps for the medium-far ranges:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwVDu3AFENCm890jEtX1JDDIwDn4_1j8TWA3GtEgOunuFKv4l5U9u5zV_-GdpddvZgMfURmSG8g7NkjI4C9mEzyAXhItewqAjPRrecGY8Vq9q1Yh6meefNwttck9aJrykvEleJfnANxu4/s1600/metamatrendering.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwVDu3AFENCm890jEtX1JDDIwDn4_1j8TWA3GtEgOunuFKv4l5U9u5zV_-GdpddvZgMfURmSG8g7NkjI4C9mEzyAXhItewqAjPRrecGY8Vq9q1Yh6meefNwttck9aJrykvEleJfnANxu4/s400/metamatrendering.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The colors in the wireframe view show where each method is applied. Just by comparing the triangle densities you can see this saves a massive amount of geometry:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkWFkpFQNZPN5ka6n6c7gJ9j-7uBRY-N7EkZMvuEVYwIcdSqyr-gDREeA9IJyNKYPuJOpWuQF0ECQA9domMMpC_FWz2aLfTnb1YUhWKlTumcMOQ-aPLyb3l2w9aIDO-G6wpbeuiUTlhGQ/s1600/metamatrendering2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkWFkpFQNZPN5ka6n6c7gJ9j-7uBRY-N7EkZMvuEVYwIcdSqyr-gDREeA9IJyNKYPuJOpWuQF0ECQA9domMMpC_FWz2aLfTnb1YUhWKlTumcMOQ-aPLyb3l2w9aIDO-G6wpbeuiUTlhGQ/s400/metamatrendering2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This method is not new in terrain rendering, however, it is quite new in a voxel terrain. It is all possible thanks to the fact our voxels can have UV coordinates. Voxels output by the terrain component in the green area have UV coordinates. These coordinates make sure the normal, diffuse and other maps created to render the meta-material at this distance match the volumetric profile and sub-material patterns in the meta-material up close.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The beauty of it is that this work with any type of terrain topology, not just heightmaps. If you are doing caves, cave walls, ceilings and ground are very distinct meta-materials and they would all benefit from this method. And it should be all automatic, we can turn this system on, and it won't require artists to create any new assets.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
We are still figuring out how to solve some kinks in the system, but so far I am very pleased with the results. I will be posting more pictures and videos eventually.</div>
Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com8tag:blogger.com,1999:blog-3779956188045272690.post-46039412438345075782017-01-23T18:13:00.000-05:002017-01-23T18:19:34.502-05:00Boxes to Voxels to BoxesMagicaVoxel is an incredibly fun and popular voxel editor. It allows you to recreate that pristine volumetric 8bit look that never was, but we all remember so fondly. We are often questioned whether we could support that kind of look in Voxel Farm scenes, so the team quickly wrote an importer for MagicaVoxel models:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5KcLdLNvwxy5far5-DI40i9iOAtLqviZgv3mVg-YFPGYJ19adJ66Z-39Ws272y-C1cQg0xRo-K3cfiXP81mWtruXO7WrZlYVwJxZDl7ypxR-1F4DK_Woc0UQn8-UXf-VSNdLDIOxNCd8/s1600/rain.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5KcLdLNvwxy5far5-DI40i9iOAtLqviZgv3mVg-YFPGYJ19adJ66Z-39Ws272y-C1cQg0xRo-K3cfiXP81mWtruXO7WrZlYVwJxZDl7ypxR-1F4DK_Woc0UQn8-UXf-VSNdLDIOxNCd8/s400/rain.jpg" width="400" /></a></div>
<br />
The following video shows the experience, from importing MagicaVoxel models to running a full environment inside Unreal Engine 4:<br />
<br />
<center>
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/BIvL3_AGqa8" width="560"></iframe> </center>
<br />
As you can see from the video, once we began importing these models into the scenes, we figured out it would be nice if the entire world was blocky too. This was now outside MagicaVoxel's realm, but it turned out quite simple to switch off the smooth surfaces in Voxel Farm and make it all look blocky.<br />
<br />
A very interesting turn was how to handle the LOD. As I was posting work-in-progress images of this on Twitter I got some interesting feedback. Jens Blomquist, who wrote Blockscape, mentioned he chose not to use LODs in his block game since the larger blocks in the distance produced confusing distance cues. What he meant can be clearly seen in the following image:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEAkYXSyDbmNOQoxZwLfk59UAFQ52y7T03vjtq8XYcAsTt3smwNAJKRFY0JGJ9Zp24aPD4JbjanVCZhneVnh19ByoVgL1AdxTyU__4RiSTCh0-kZgpYBgRnSZ0RmmrR0iFZhloB6ri9Mg/s1600/lod.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEAkYXSyDbmNOQoxZwLfk59UAFQ52y7T03vjtq8XYcAsTt3smwNAJKRFY0JGJ9Zp24aPD4JbjanVCZhneVnh19ByoVgL1AdxTyU__4RiSTCh0-kZgpYBgRnSZ0RmmrR0iFZhloB6ri9Mg/s400/lod.jpg" width="400" /></a></div>
<br />
Here the boxes in area A should be smaller than boxes in area B.<br />
<br />
Paniq (Leonard Ritter) suggested an interesting experiment: What if we used smooth surfaces for distant LODs but keep blocks for near range? It did not turn out well, but it was worth a try:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSmIJFJfPvnhnPOJn0fwoGQyELUR8ppZl-3-hwSkz98c8H9qpqLBvjhACHZ6_nh-VR1HKAJbKncQgoHWMCE6x2m0uxAxJiT5Ew0c33EkGPJo5zb8kKHliJL0DSH1vmZoeCy6hy-8Ko3SQ/s1600/lod2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSmIJFJfPvnhnPOJn0fwoGQyELUR8ppZl-3-hwSkz98c8H9qpqLBvjhACHZ6_nh-VR1HKAJbKncQgoHWMCE6x2m0uxAxJiT5Ew0c33EkGPJo5zb8kKHliJL0DSH1vmZoeCy6hy-8Ko3SQ/s400/lod2.jpg" width="400" /></a></div>
<br />
I found another illusion-based trick that did introduce some improvements: Decrease LOD near player (+2), increase LOD (-2) for buildings, leave far away LOD unchanged (+0). Thanks to the adaptive scene density, the architecture did not need to be degraded so it could remain at the best LOD possible as well:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn1LXhkYanbdiChVZxIFKJ91J8REWHq2tN-c_SKwdZiaIunHYGpNEmwmGnAehsOOBXTAOdETM3yDiGOU_GnvD20I-kTqjG6rKCXdRyjUZ2KOxcvfNK4RqIEuEMIQvszkau_bG7mek6rA4/s1600/lod3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn1LXhkYanbdiChVZxIFKJ91J8REWHq2tN-c_SKwdZiaIunHYGpNEmwmGnAehsOOBXTAOdETM3yDiGOU_GnvD20I-kTqjG6rKCXdRyjUZ2KOxcvfNK4RqIEuEMIQvszkau_bG7mek6rA4/s400/lod3.jpg" width="400" /></a></div>
<br />
Then I realized all these were solutions to a problem we should not have in the first place. We were equating voxels to boxes and that was wrong. Instead, we should be using the variable-sized voxels to encode constant-sized boxes. Unfortunately, I did not get to test that theory because lunch was served. When I was done it was time to go back to non-boxy things. Maybe some day in the near future...<br />
<br />Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com7tag:blogger.com,1999:blog-3779956188045272690.post-4729535708428306492017-01-17T15:02:00.001-05:002017-01-17T15:02:11.618-05:00When Mountains MoveThere is an aspect of procedural generation I do not see discussed often. What happens when you have layers of procedural content, add hand-made content on top of it, and then go on to improve the procedural generation?<br />
<br />
Last week we did a release of our tools that make it really simple to create terrain biomes. You can see it in action here:<br />
<br />
<div style="text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/nzr21av5JQc" width="560"></iframe>
</div>
<div style="text-align: center;">
<br /></div>
This system can produce fairly good looking terrain with just a few clicks, however, there are still some aspects of it I wanted to improve.<br />
<br />
One key issue that you can see in this video, is that it tends to produce straight lines. There is still some "diamond" symmetry we need to address the core algorithm. The image below shows a really bad case, where the produced heightmap has parallel features forming an almost perfect square:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK9keAMs4dZCKR8Ahew8s_EgeLfkB945PQ17qZVLT1PLBc0mA7UU7Vsj7_QrMA_kEh392dsQB_CqqgXeH0ko6fuUA-Qiq23IkBq65pQzxgI75sh39a35reiG0XSZbfk9swwWnNhNumsw4/s1600/before.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK9keAMs4dZCKR8Ahew8s_EgeLfkB945PQ17qZVLT1PLBc0mA7UU7Vsj7_QrMA_kEh392dsQB_CqqgXeH0ko6fuUA-Qiq23IkBq65pQzxgI75sh39a35reiG0XSZbfk9swwWnNhNumsw4/s400/before.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
At the left, you can see the generated heightmap. The right panel shows a render of the same heightmap.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This did not take long to fix. Instead of running the generation algorithm on a grid made of squares, switching to irregular quadrilaterals is enough to break most of the parallel lines. The following image shows the results after the fix:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3BjJIhy2cTo2JEeleluf2q_XhNky7rcy1XTtgFReHZx_LNm2PZ7tloRZSYKN3gFGVRSH3RFZVdF1nwzzi7WyiEig89h4-LgKvG8kT3e7WcKdjBH0TrhlRmg7IWQjnXhv4buHwdwepgdg/s1600/fixed.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3BjJIhy2cTo2JEeleluf2q_XhNky7rcy1XTtgFReHZx_LNm2PZ7tloRZSYKN3gFGVRSH3RFZVdF1nwzzi7WyiEig89h4-LgKvG8kT3e7WcKdjBH0TrhlRmg7IWQjnXhv4buHwdwepgdg/s400/fixed.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
A simple fix or improvement like this leaves us with bigger questions: How do we make this backward compatible? Do we make it backward compatible at all, or just apologize and ask human creators to relocate their data?<br />
<br />
We could provide an option to turn this improvement off. That would be the most diplomatic approach. But then what about any other improvements we have planned for the future, do they all get their own setting? At this point, it seems we would be complicating the UI with many options that are meaningless to new users. These would be just switches to make algorithms behave in more primitive forms.<br />
<br />
Whenever algorithms create content along with humans it really becomes a muddy, gray area for me. I still haven't figured this one out.Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com16tag:blogger.com,1999:blog-3779956188045272690.post-6558473457449114682016-11-23T22:00:00.000-05:002016-11-24T08:47:10.529-05:00Worm DayI was testing a new version of the Alien Biome made by Bohan, one of our in-house artists. The biome was looking good. I was making sure the new material rendering in UE4 worked as expected. (In case you have not seen it, here is a video showing just that.)<br />
<br />
<center>
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/l2qMP-wJayM" width="560"></iframe></center>
<br />
While I roamed around this terrain, I wondered how easily a non-artist like me could extend the scenery. I decided to test what I could achieve in just one day.<br />
<br />
I figured out it would be nice to have some massive point of interest. Some sort of giant worm maybe. I loved the Dune treatment by Jodorowsky and Giger. They collaborated mostly about the house Harkonnen. No worms there, but the scale and weight of the concepts was striking. It would be fun to explore a really large formation like the ones they had.<br />
<br />
I did not want to create any new textures, materials or props for this. I would be using whatever was already there in this biome. For this reason, I chose to make the giant worm look more like a fossil. Minerals in this planet had taken over every cell of the worm, leaving something that up close looks pretty much like terrain.<br />
<br />
The first step was to create a simple model for the worm. I did this using traditional modeling in 3ds max:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAKXQilsmgePLdmilbcY9Al97EzNECnn3EFkg0loMmFH_-z1WSKMCW8tiCY3e-ErFpVFt-zvJ-uX3ZqAKfBmlcp5ddfZoDMkhZSV64dwGKvM7t6Vo2c9GDVTIod5rlHTS5MPcCQfkv8jU/s1600/wormmax.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAKXQilsmgePLdmilbcY9Al97EzNECnn3EFkg0loMmFH_-z1WSKMCW8tiCY3e-ErFpVFt-zvJ-uX3ZqAKfBmlcp5ddfZoDMkhZSV64dwGKvM7t6Vo2c9GDVTIod5rlHTS5MPcCQfkv8jU/s400/wormmax.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This is just a series of primitives arranged in a worm-like fashion, with some worm-tusks sticking out.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The next step was to paint "meta-materials" on top of this. To make it simpler to identify where each meta-material would go, I picked distinct colors to represent each one of them:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjufz_rwFO9D9EhAxo7Pacjb721VGt6oodfPw1hiVQtVRaN7-94-8rOWmVTmvB_6s6kF-ehf2_hp1NqiB-B7D3x3WJ7pVssy53CeFF0_q5HsLQE9gCzBbXJNUhBmZ-u9WiaFinud0k0Q5U/s1600/texturedworm.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="321" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjufz_rwFO9D9EhAxo7Pacjb721VGt6oodfPw1hiVQtVRaN7-94-8rOWmVTmvB_6s6kF-ehf2_hp1NqiB-B7D3x3WJ7pVssy53CeFF0_q5HsLQE9gCzBbXJNUhBmZ-u9WiaFinud0k0Q5U/s400/texturedworm.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
In a normal production project, you would have a greater variety of meta-materials. In this case, however, I was really pushing for the minimum amount of work necessary.<br />
<br />
Once I had the textured worm, I imported it as meta-mesh in Voxel Studio. I made sure it was huge (3km long) and that it fit nicely the already existing terrain:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeAw45DgFs-YVFtnIx6UTwqvZGOK8T0irFkzVTV3KUTJub3ttdh4DBLZS92ZH6ebJudTP6e6-kafSD0Pjf6hc7GUz-sJCOCiGqZR8Hk0mDzOnT1PnLrzifuOVh7bA6aM_Ev7oiX3QA-1Y/s1600/metamesh.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeAw45DgFs-YVFtnIx6UTwqvZGOK8T0irFkzVTV3KUTJub3ttdh4DBLZS92ZH6ebJudTP6e6-kafSD0Pjf6hc7GUz-sJCOCiGqZR8Hk0mDzOnT1PnLrzifuOVh7bA6aM_Ev7oiX3QA-1Y/s400/metamesh.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I also had to set up some connections between the existing materials and the meta-materials I had painted on top of the model. I chose to use only two meta-materials: one for the tusks and another one for everything else. In this procedural component, each meta-material is subdivided into final materials using artist-created maps. I hoped just two meta-materials was enough to make it interesting.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This part of the setup was quite simple:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghFS5QkibOUs7A08d_1C7DeGnVBqsf9vVLSf0CIQMGYVaKNRL5nmJSc2VJuQGA5UEP7Qaj1s-ZW9SLjZ5JG48Gqpw58ihnWmu7bcG9OMoT0M6RaIOIzzBBm2TBwaJAWeGBrrejIW61sw8/s1600/wormnodes.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghFS5QkibOUs7A08d_1C7DeGnVBqsf9vVLSf0CIQMGYVaKNRL5nmJSc2VJuQGA5UEP7Qaj1s-ZW9SLjZ5JG48Gqpw58ihnWmu7bcG9OMoT0M6RaIOIzzBBm2TBwaJAWeGBrrejIW61sw8/s400/wormnodes.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
After Voxel Studio processed the new mesh and meta-materials, I got to see the worm for the first time:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzGAwJYZ4mwwBnE5wY4n1Nk9sm0aj3jC803TeAsYWeJLZAiQzMMBdhMHf9Ozf9rRP0XI_jj3DeHjjzQJYKCFASyZmE0NPNQkYxB_XNsNwZCF7A_Sfz7VsISkfBZCEZcQGRot_BTLiI2WA/s1600/rendererworm.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzGAwJYZ4mwwBnE5wY4n1Nk9sm0aj3jC803TeAsYWeJLZAiQzMMBdhMHf9Ozf9rRP0XI_jj3DeHjjzQJYKCFASyZmE0NPNQkYxB_XNsNwZCF7A_Sfz7VsISkfBZCEZcQGRot_BTLiI2WA/s400/rendererworm.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I was then able to export into Unreal Engine 4 and see how this looked in the final environment. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I captured this short video so you can have a better idea of the results so far:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<center>
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/JizE0fZ08lI" width="560"></iframe></center>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
While the model and material assignment could use more detail, the sense of scale and weight was already close to what I was looking for. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I clearly do not have Giger's talent (or Jodorowsky's hallucinogenics supply) so I was curious about how far I could go by myself, and how much the procedural systems we have built could help me. I think it turned out to be OK, considering I only spent around five hours in total creating this feature.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
As usual, I look forward to your opinions and comments.</div>
Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com7tag:blogger.com,1999:blog-3779956188045272690.post-84631054652555720542016-11-22T09:19:00.001-05:002016-11-22T09:20:33.725-05:00Improved LODThis is a continuation of an <a href="http://procworld.blogspot.ca/2016/10/slaying-lod-monster.html" target="_blank">earlier post</a>.<br />
<br />
In the past, every Voxel Farm scene could be described by this diagram:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaMFPhlzYMf92eM6aR8RtOc3QdQ_hyphenhyphenHmOOezrBMS01E8gtRV3pd2D4laX5py0PdPF-IKTb7Brw1woO-Kamxr6F9isj3r4gLRE52BNLYrxy0PfjwL2hjxbfOEqJ26Be_vbmlcAXB12iI_g/s1600/clipmap.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaMFPhlzYMf92eM6aR8RtOc3QdQ_hyphenhyphenHmOOezrBMS01E8gtRV3pd2D4laX5py0PdPF-IKTb7Brw1woO-Kamxr6F9isj3r4gLRE52BNLYrxy0PfjwL2hjxbfOEqJ26Be_vbmlcAXB12iI_g/s400/clipmap.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This is a 2D representation of how the entire scene is segmented into multiple chunks. Each chunk may cover a different area (or volume in 3D), but the amount of information in it is roughly the same compared to other chunks, regardless of their size.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks to this trick we can use bigger chunks to cover more distant sections of the scene. Since the chunk is far away, it will appear smaller on screen so we can get away with a much lower information density for it.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Until recently the only criteria we used to decide chunk sizes was how distant the chunk was from the viewer, which is the red dot in the image. For some voxel content types like terrain, we could afford to quickly increase the chunk size along distance to the viewer. The resulting lower density terrain would still look alright.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Some other types of content, however, required more detail. Imagine there is a tower a few kilometers away from the viewer:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJBR8En12JPIsv-uOQz3nHO22WuIObbXdRvItZKdm17x8EAPxuHLFXfeGY9jIM5o6eSkfVD2jEIMm7rml_jskqFvA7u4XpXhJ30LOsr2d38a6xZoL8op76pDeGRRAwhIfTYPHAmT-wV9o/s1600/clipmap1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJBR8En12JPIsv-uOQz3nHO22WuIObbXdRvItZKdm17x8EAPxuHLFXfeGY9jIM5o6eSkfVD2jEIMm7rml_jskqFvA7u4XpXhJ30LOsr2d38a6xZoL8op76pDeGRRAwhIfTYPHAmT-wV9o/s400/clipmap1.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The resolution assigned to the chunk containing this tower is simply too low to capture the detail we want for the tower. We could increase resolution to all chunks equally and this would bring the tower into greater detail, but this would be very expensive because many chunks containing just terrain would have their density bumped up as well.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The solution is simple. Imagine that while we build this world, we can compute an error metric for each larger chunk based on the eight (or four in 2D) children chunks it contains. For terrain-only chunks this error would always be zero. For the chunks containing the artist-built tower, this error could be just a counter of how many voxels in the larger chunk failed to capture the detail in the voxels from the smaller children chunks.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Starting from the distance-based configuration we can do another round of chunk refinement. Each chunk having an error that we consider too high will be subdivided. We can keep doing this until the errors are below the allowed threshold and the overall scene complexity remains within bounds.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This gives us a new scene setup:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmvTDwtwmgli-1gJjALUBw6O198rJb-Yi_aJF4SuCCSN8y9Ncd5aWNNbVYdbTi0sXoF2lcdbBs2KmqTpGbgm0cFyQ8-_CLHW7pUAHjGRyFTeK_SFLYdSM0s-sE-dIyJiL1WuQ3Py02IxQ/s1600/climap2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmvTDwtwmgli-1gJjALUBw6O198rJb-Yi_aJF4SuCCSN8y9Ncd5aWNNbVYdbTi0sXoF2lcdbBs2KmqTpGbgm0cFyQ8-_CLHW7pUAHjGRyFTeK_SFLYdSM0s-sE-dIyJiL1WuQ3Py02IxQ/s400/climap2.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
As result of the additional subdivision, we now use higher density chunks to represent the tower. Since we know how distant these are, we could even pick a chunk size that shows no degradation at all as all errors become sub-pixel on screen.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The following video shows more about this technique:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<center>
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/QK3oi3Ikbxk" width="560"></iframe> </center>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
In the last part of the video, you can see how the terrain LOD changes while the tower remains crisp all the time. If you would also like to minimize terrain LOD changes, this technique can give you that as well:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<center>
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/D6Uuoy4G-Dw" width="560"></iframe> </center>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Just like we can focus the scene more on fine architectural details, we can "unfocus" sections we know will be fine with lower information density.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
There is still one issue this technique does not address. When we are bumping up the level of detail of a distant castle, this may also bring a lot of information we do not necessarily want, like walls and spaces that may be inside the castle.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
We found a very elegant way to deal with this. This is what enabled the very complex Landmark builds from the <a href="http://procworld.blogspot.ca/2016/10/slaying-lod-monster.html" target="_blank">earlier post</a> to display in high detail and still run at interactive rates. How we did it will be the topic of the final post on the LOD series. </div>
<br />Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com6tag:blogger.com,1999:blog-3779956188045272690.post-70959110761241578042016-10-17T10:00:00.000-04:002016-10-17T10:20:34.910-04:00Slaying the LOD monsterLOD, or Levels of Detail, is a technique for managing very large and dense scenes like we have today in open world games. The general idea is you can have multiple copies of the same content at different resolutions. Then you switch which copy to use depending on how much detail is necessary for the scene.<br />
<br />
LOD switches can be implemented as plain swaps, morphing between states as shown in this <a href="http://procworld.blogspot.ca/2014/11/progressive-lod.html" target="_blank">earlier post</a>, or even as completely adaptive mesh representations, as shown <a href="http://hhoppe.com/proj/vdrpm/" target="_blank">here</a>.<br />
<br />
Sometimes we get fixated on LOD swaps and we drift away devising tricks to make them harder to see. I feel this is not the right angle to look at this problem. While LOD swapping techniques are very important, and progressive swaps are much nicer, etc., the real goal is to have as much detail as possible in the first place. If you find yourself masquerading LOD swaps, it is probably because your scenes still include levels of detail that are too coarse.<br />
<br />
How much detail do you need? Just enough to make LOD transitions close to being sub-pixel. Once LOD swaps are sub-pixel, it does not matter what swapping technique you use. It also means your rendering of the content is as detailed as the screen resolution will allow.<br />
<br />
This sounds like a Holy Grail, is it feasible with the current hardware generation? We believe it is. Take a look at the following video:<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/xMXrJjDLNX0" width="560"></iframe>
<br />
<br />
As you can see in the video, buildings preserve their detail, even when viewed from afar. LOD changes, while they do happen, are virtually impossible to detect. All this while keeping interactive frame-rates.<br />
<br />
It turns out the same techniques that prevent buildings in the distance from looking like melted crayons also give you smooth LOD transitions. I will be covering how all this works in my next post.Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com22tag:blogger.com,1999:blog-3779956188045272690.post-23189078410135841132016-09-08T12:14:00.000-04:002016-09-08T12:14:52.377-04:00Introducing Farm CloudWe have included a preview of our collaborative edition system in the latest Voxel Farm 3 release.<br />
<br />
The following short video shows what takes to setup and share a project from scratch:<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/XZl-rGK8eFo" width="560"></iframe>
</div>
<br />
We are still working on this system, but hopefully you get the idea. Our focus is to make the setup as simple as possible so people can start collaborating without significant effort.<br />
<br />
This is also intended for more than collaboration and source control. This same layer of distributed persistence can be used by any application to store and sync the changes their users make.<br />
<br />
This is a very active area of development for us. I will be posting more about this in the future, meanwhile as always I look forward to the questions you may have about this system.Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com10tag:blogger.com,1999:blog-3779956188045272690.post-57752675029288850962016-08-22T13:41:00.000-04:002016-08-22T13:41:11.691-04:00Pyramid Scene in UE4Here you can see a video of the Pyramid scene from the <a href="http://procworld.blogspot.ca/2016/08/system-integration.html" target="_blank">previous post</a>:<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/LPWtNRkpqZo" width="560"></iframe>
<br />
<br />
There are many improvements in this new engine version. Aside the new features like textured voxels and procedural materials, we invested a big deal of time in the quality of the experience. There is still some pop-in, which is coming from a little bug in the meta-material layer. Aside from that the LOD changes are pretty stable and unnoticeable for the most part. The use of UV-mapped voxels also helps minimize the pop-in.<br />
<br />
Another old problem area was the replanting of procedural flora (and other objects) every time there was an edit. The new instancing system provides a stable representation that is able to transfer the flora planting into the new geometry. Only edits that really affect the planted instances result in a visual change.<br />
<br />
The destruction and building shown here is controlled by blueprints inside UE4. You could easily switch the bombs by a pickax or by rockets.Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com12tag:blogger.com,1999:blog-3779956188045272690.post-55665832677772595912016-08-04T17:47:00.003-04:002016-08-04T17:47:47.793-04:00System IntegrationHere is a scene that combines all the recent developments in Voxel Farm:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiucv5hJXkhHSWlobAGhNKYEPrNwafCAnmyNOuf98KeW2HoilW0ubPKVrmsBI5TpTRKpon_H-20iR54O59DXeMN6bj02hhcer-6kT2HBnsXRFM3rjrQ23NSnzl75PQwv2iizq3FoX3n_Vo/s1600/pyramid1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiucv5hJXkhHSWlobAGhNKYEPrNwafCAnmyNOuf98KeW2HoilW0ubPKVrmsBI5TpTRKpon_H-20iR54O59DXeMN6bj02hhcer-6kT2HBnsXRFM3rjrQ23NSnzl75PQwv2iizq3FoX3n_Vo/s400/pyramid1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This integration is subtle. There are no giant turtle mountains here, but the same system we used for the giant turtle is applied here to produce the natural rock pillars that are connected by the bridges, also the platform where the pyramid rests:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp9df5ziSpUnlUgUB3h9TiaWyNVB4COyKJzxJLK-Ex7rheFbJOoMU6F_TW1qEsmXsWeTukhPfCEiZL4SPTgKxZ7Kj_HCvb_UV7rkQ4WHKD9Sm5dJ0k4qIyIroEdz50Hoy1Xn0OLmTTjHs/s1600/pyramid3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="315" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp9df5ziSpUnlUgUB3h9TiaWyNVB4COyKJzxJLK-Ex7rheFbJOoMU6F_TW1qEsmXsWeTukhPfCEiZL4SPTgKxZ7Kj_HCvb_UV7rkQ4WHKD9Sm5dJ0k4qIyIroEdz50Hoy1Xn0OLmTTjHs/s400/pyramid3.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
These natural structures are defined by a low resolution mesh that captures the basic shape. This is expanded in realtime into detailed features like rocks, sand and dirt using procedural materials that we call Meta-materials.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The large terrain around the pillars and the pyramid's base is using Voxel Farm's standard procedural terrain.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This scene also uses UV-mapped voxels. This is a different method to apply textures to voxels. It allows much finer control. The entire pyramid is using them:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUDGbxcpREVf_0xhfAbPYLf3zM_CwM-XN5_NCB2m1C4iYhSE_roiEbf_4W0mXu3Xa7pw_kFqAYTVR3XkpXAm8n8yoqm-nh0hmbM1Sk23WexSCq1siJuMN29zd4O2eUyVfjBsibNiKhOmQ/s1600/pyramid2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUDGbxcpREVf_0xhfAbPYLf3zM_CwM-XN5_NCB2m1C4iYhSE_roiEbf_4W0mXu3Xa7pw_kFqAYTVR3XkpXAm8n8yoqm-nh0hmbM1Sk23WexSCq1siJuMN29zd4O2eUyVfjBsibNiKhOmQ/s400/pyramid2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
There is also the new instancing system, which is responsible for all the trees plants and rocks you see scattered around. You cannot see this in just screenshots, but this new system is able to preserve existing instances even in the event of user edits and destruction. This avoid the visible "replanting" of vegetation and rocks around edits.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
And all this is running in Unreal Engine 4. I would say the UE4 integration is the last of the systems than went into taking these shots.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com12tag:blogger.com,1999:blog-3779956188045272690.post-57050843735751538912016-07-15T14:35:00.002-04:002016-07-20T02:31:58.808-04:00Intelligent Terrain SynthesisDon't you hate it when your favorite TV series puts out an episode that is just clips of stuff that happened in earlier episodes? This post has some of that but hopefully will provide you with a better idea of how we see Procedural Generation in the near future.<br />
<br />
This video shows the new procedural terrain system to be released in Voxel Farm 3:<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/N3YWH3DBvuw" width="560"></iframe>
<br />
<br />
In case you want to find out more about what is happening under the hood, these previous posts may help:<br />
<br />
<a href="http://procworld.blogspot.ca/2016/04/geometry-is-destiny.html" target="_blank">Geometry is Destiny Part I</a> and <a href="http://procworld.blogspot.ca/2016/07/geometry-is-destiny-part-2.html" target="_blank">Part II</a><br />
<a href="http://procworld.blogspot.ca/2016/06/introducing-pollock.html" target="_blank">Introducing Pollock</a><br />
<a href="http://procworld.blogspot.com/2016/05/terrain-synthesis.html" target="_blank">Terrain Synthesis</a><br />
<br />
The idea is simple. Instead of asking an artist to labor over a hundred of different assets, either by hand or by using complex generation tools like World Machine, we now have a synthetic entity that can do some of that work through a mix of AI and simulation. You do not have to be an expert or initiated at all in the arts of procedural generation to get a satisfactory outcome.<br />
<br />
Why are AI and simulation important? After working for a while in procedural generation, it became clear to me there was no workaround to the entropy problem. This I believe can be stated like this: Viewers of procedurally generated content will perceive only the "seed" information, not the "expanded" data. Yes, you may have a noise function that can output terabytes of data, but all this data will be compressed by the human physique to the few bytes that take to express the noise function itself. I posted more in detail about this problem here:<br />
<br />
<a href="http://procworld.blogspot.ca/2012/07/uncanny-valley-of-procedural-generation.html" target="_blank">Uncanny Valley of Procedural Generation</a><br />
<a href="http://procworld.blogspot.ca/2014/03/procedural-information.html" target="_blank">Procedural Information</a><br />
<a href="http://procworld.blogspot.ca/2015/05/evolution-of-procedural.html" target="_blank">Evolution of Procedural</a><br />
<br />
This does not mean all procedural generation is bad. It means it must produce information in order to be good. Good Procedural Generation is closer to simulation, automation and AI. You cannot have information without work being done, and if work is to be done better leave it to the machine.<br />
<br />
The video at the top shows our first attempt at having AI that can do procedural generation, stay tuned because more is coming.<br />
<br />
<br />Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com26tag:blogger.com,1999:blog-3779956188045272690.post-47046005119264414222016-07-11T15:09:00.000-04:002016-07-11T15:10:49.750-04:00Geometry is Destiny Part 2This is a continuation of an <a href="http://procworld.blogspot.ca/2016/04/geometry-is-destiny.html" target="_blank">earlier post</a>. That post ended in a literal, virtual cliffhanger. We generated continent shapes and we used tectonic plate simulation to compute where mountain ranges would appear.<br />
<br />
The remaining step was to assign biomes. We wanted biome placement to be believable so we did a bit of research on what biomes are where and why they appear.<br />
<br />
Scientists have distilled this to a very convenient set of rules, which are captured by the following chart:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTke_RkLHB6FbCN4wRaSxTDSSivOqaE-xFrue-ZQ3hHZNDL2pNV1tcnUNyi6GZ7_4LZtUtfPV-Yjt2f5hYRdrV_Y4vV2YVJMPkWhNFzAHjMJ6CHN5X41NsSwEC4xUCLw54goenw5iADi0/s1600/biomes.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="351" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTke_RkLHB6FbCN4wRaSxTDSSivOqaE-xFrue-ZQ3hHZNDL2pNV1tcnUNyi6GZ7_4LZtUtfPV-Yjt2f5hYRdrV_Y4vV2YVJMPkWhNFzAHjMJ6CHN5X41NsSwEC4xUCLw54goenw5iADi0/s400/biomes.png" width="400" /></a></div>
<br />
I stole this particular image from <a href="http://www.mugansbiologypage.com/" target="_blank">Mugan's Biology Page</a>, but you will find it pretty much everywhere occurrence of biomes on Earth is discussed. This is a classification made by Robert Whittaker based on annual precipitation and average temperate. His study suggests temperature and humidity are enough to determine biome occurrence.<br />
<br />
This made it simple for us. We only needed to compute two parameters across the continent: temperature and humidity.<br />
<br />
Let's start with the easiest, which is temperature. We figured out some of this would have to be user input. as we did not know the latitude for the continent we would not be able to determine how cold or hot it was. Instead of asking how much sun the landmass was getting (which is what latitude means in this case), we chose to ask temperature values for each corner of the map:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8jmHKu3-XEfNUvpwVdh-9AdH_nYwWATrnZUShouDBHdFwLZUEALpTIyIKRLgiF71jHbV_C2WIWUPIMjDGXiqJqIvMyXZMwKw-yrvYx5andrjSga0CGLcZgOoE22WxssB5cIRrwdvJQHc/s1600/Layer+1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8jmHKu3-XEfNUvpwVdh-9AdH_nYwWATrnZUShouDBHdFwLZUEALpTIyIKRLgiF71jHbV_C2WIWUPIMjDGXiqJqIvMyXZMwKw-yrvYx5andrjSga0CGLcZgOoE22WxssB5cIRrwdvJQHc/s400/Layer+1.png" width="400" /></a></div>
<br />
To get the temperature for any position within the map we just do a linear interpolation from these four corner values.<br />
<br />
Temperature also changes with elevation. This ranges from -6 to -10 degrees Celcius for each extra kilometer in altitude. We had a rough elevation map from the tectonic plate simulation, with this additional piece we are able to compute a fairly good temperature value for any point on the map. This is the horizontal axis of the Whittaker chart.<br />
<br />
The vertical axis is rainfall or humidity percentage as other biome charts have it. This one is trickier. In real life, water evaporates from large water masses like the sea into clouds. Air rises when it meets higher elevation. There it cools down losing some of its ability to hold water. The water excess becomes rainfall.<br />
<br />
We chose to simulate exactly that process. We knew the continent would be surrounded by ocean water. This would be the main source of water. The next step would be to determine wind direction. Continents are exposed to different wind systems depending on where they are on the planet. Global wind simulation was out of scope for us, so we chose again to ask the user:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqAN7-wjTPWWLXlW28imAtT4jnWkoGoDeqGK2SnImZYM-t-ctaPvb3b8wuek9dPyHpiLRK9j6OEKeR3fzWwxEzBCKzw9w83lCZzkxIBFfqdyQ0_2K_GwfYLG05-IlWab1hdR2xG1ilkzo/s1600/biome3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqAN7-wjTPWWLXlW28imAtT4jnWkoGoDeqGK2SnImZYM-t-ctaPvb3b8wuek9dPyHpiLRK9j6OEKeR3fzWwxEzBCKzw9w83lCZzkxIBFfqdyQ0_2K_GwfYLG05-IlWab1hdR2xG1ilkzo/s400/biome3.png" width="400" /></a></div>
<br />
The input is quite simple, just a wind direction for each map of the corner. With this, we would be able to produce a wind vector field for the entire map.<br />
<br />
If you remember the previous post, a key aspect of this simulation framework was the use of a mesh instead of a regular 2D grid:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-UXGkrjSeonVVQ99K3qJrI_0F3XxSI3u-84oWpwdC7_exiLsfRrriSFUjcpgIjTD4P3obwh25_s9p3R9gYmk4A_-AR4xYmL2BewRcdGiORRhIKlAF1V3hxBmzBmm5pdbrHS7Pg6pe8wQ/s1600/irregularmesh.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-UXGkrjSeonVVQ99K3qJrI_0F3XxSI3u-84oWpwdC7_exiLsfRrriSFUjcpgIjTD4P3obwh25_s9p3R9gYmk4A_-AR4xYmL2BewRcdGiORRhIKlAF1V3hxBmzBmm5pdbrHS7Pg6pe8wQ/s1600/irregularmesh.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
This came handy for simulating water transfer. Each node is seeded with an initial amount of water. Nodes over the ocean would get 100% and nodes over the landmass would get zero.<br />
<br />
Then we perform multiple simulation steps. Each step looks at each pair of connected nodes and figures out how much water moved from one node to the next and how much was lost as precipitation.<br />
<br />
Assume two connected nodes, A and B. The dot product between the wind vector at A, and the vector that goes from A to B will tell us how able the wind is to carry water from A to B. Then based on the water already contained in A and B, and the temperature changes, we can compute how much water moved and how much rainfall there is.<br />
<br />
After sufficient simulation steps to cover the node graph, the following pattern emerges:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNA9gBMrN8LuF1TLwUNir3DtSw7ngTYALeCCHmTIO3CnfYLONrbabd2mge5uhYFAHS52hD78T5nlQ11ur81eqPBdwEiwBwD3CXJMb-35itnJMubfMUmEwcA7L-YJCFKKPaLLW0wDM-1O8/s1600/moisture1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="287" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNA9gBMrN8LuF1TLwUNir3DtSw7ngTYALeCCHmTIO3CnfYLONrbabd2mge5uhYFAHS52hD78T5nlQ11ur81eqPBdwEiwBwD3CXJMb-35itnJMubfMUmEwcA7L-YJCFKKPaLLW0wDM-1O8/s400/moisture1.jpg" width="400" /></a></div>
<br />
Here the wind comes from the south. The grayscale shows humidity. The red areas show where the mountains are. As you can see most of the moisture carried by the wind precipitates right after entering the continent, leaving most of the land behind very dry.<br />
<br />
If we switch wind direction to the north, a very different pattern emerges:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6-Tae4iRghmVNyNHYCedmCCp9gOIHQ6_cPQnkGqnl542_tjSWx-GrdtzB_nDpTcmRxQb07Nws53CyUg4aXV6EQcRylMqhudgQ9E-Ybsg5ZhU9e0LqM_khY8DPcLp2TjmQwMICbuzyw4U/s1600/moisture2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="287" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6-Tae4iRghmVNyNHYCedmCCp9gOIHQ6_cPQnkGqnl542_tjSWx-GrdtzB_nDpTcmRxQb07Nws53CyUg4aXV6EQcRylMqhudgQ9E-Ybsg5ZhU9e0LqM_khY8DPcLp2TjmQwMICbuzyw4U/s400/moisture2.jpg" width="400" /></a></div>
<br />
Once both temperature and humidity are known, assigning biomes is trivial. You can think of the Whittaker chart as a 2D matrix. Humidity determines which row you would use and temperature the column:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmaCCwhDW25FI9Q1FGRr-mD59hULwEWK9sp2tGm1H6YfIOi44kXHouj-9ZX90eh3cIA5bPXJyxvXMe6ZxEaU78yTsHd7458aB3yNbaVgv1l6zaXZMTcdWjduu5cIdeaDL_if5kM-LFIVI/s1600/biomematrix.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmaCCwhDW25FI9Q1FGRr-mD59hULwEWK9sp2tGm1H6YfIOi44kXHouj-9ZX90eh3cIA5bPXJyxvXMe6ZxEaU78yTsHd7458aB3yNbaVgv1l6zaXZMTcdWjduu5cIdeaDL_if5kM-LFIVI/s400/biomematrix.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This could be generalized to other biome types by providing a different matrix, but I have not paid too much attention to other-worldly biome systems. I have not found any good examples of biome attribution beyond temperature and humidity.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Once you know the biome for each node in the mesh, obtaining a 2D map is a matter of drawing each triangle in the mesh to a bitmap. We had a software rasterizer for occlusion culling that came pretty handy here.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I leave you with a few examples of what happens when you play with wind directions and base temperatures:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS7p_V3BtUON3b99X7FqW7ad2ZOHwAIztPh6d1KwRuMkW3qlKUYee9Y_SqlR6gSTZMCdNHeFRSeNbvlncfKBQtUz9EV-u04iQLfY46UNxexK1QVS3iJR7uc9BDiWd03G6vcNE1vrSBOG8/s1600/biomeexamples.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS7p_V3BtUON3b99X7FqW7ad2ZOHwAIztPh6d1KwRuMkW3qlKUYee9Y_SqlR6gSTZMCdNHeFRSeNbvlncfKBQtUz9EV-u04iQLfY46UNxexK1QVS3iJR7uc9BDiWd03G6vcNE1vrSBOG8/s400/biomeexamples.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com13tag:blogger.com,1999:blog-3779956188045272690.post-54080406445961746562016-07-01T12:30:00.001-04:002016-07-01T12:30:13.610-04:00A speed buildOK, I am no Shattari or Ginsan (or insert your favorite master-builder here) but I gave it a run at the latest UI in Voxel Studio 3 just to see if it felt right. You can see a live capture here:<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/QVk_r6rOBtI" width="560"></iframe>
<br />
<br />
This build used lots of UV-mapped meshes. Well, it uses two or three different meshes many times over. This feels closer to building with props with the difference they are fully voxelized so you can copy-paste, deform, and continue to mess with them. When they intersect each other they behave like any other voxel content, you do not get hidden faces, you get only the surface. The mesh is gone after you voxelize it, which is a good thing otherwise this build would have dozens of thousands of individual props.<br />
<br />
This was around two hours of work. I had little idea of what I was doing. You can tell I did not prepare well and I got a bit anxious to finish the bottom part so I could go to bed. However, I did like how the tools are arranged in the new UI.<br />
<br />
I can hardly wait until this new generation of tools reaches the very talented (and patient) builders out there.<br />
<br />Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com10tag:blogger.com,1999:blog-3779956188045272690.post-68336705811827715002016-06-27T17:49:00.000-04:002016-06-27T17:49:55.133-04:00Introducing PollockPollock is the code-name for our new terrain generation system. Why Pollock? This system went rogue for a couple of days and started producing things that did not look like terrain and more like Jackson Pollock paintings:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSTgOa_2yjnZpFnDjAmnVi0EVktPmjp1BCltUNVcwCDufpikuYEibJy9Pd22uBJJsYp70os4gAHEbl-hsFicW1GZQT9oXIbBwTTqllX30K5GE_MgtduSW_9uRT_npq58SrCfoxBfgmBP8/s1600/pollock.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSTgOa_2yjnZpFnDjAmnVi0EVktPmjp1BCltUNVcwCDufpikuYEibJy9Pd22uBJJsYp70os4gAHEbl-hsFicW1GZQT9oXIbBwTTqllX30K5GE_MgtduSW_9uRT_npq58SrCfoxBfgmBP8/s400/pollock.jpg" width="400" /></a></div>
<br />
It seems mad randomness at first, just like Pollock, but there is a lot of order in this chaos (and also what appeared to be a buffer overrun error somewhere in the code.)<br />
<br />
Here are some images of the system when it behaves as expected:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihATSxT6L3j5TVEn5pi8NCpOYhp6E2EdhVHROwTD8j3wL7qHuxEhkM9aeUY5FSAkDbtMxpyZjiKoJ602Tcl6Qm3lr-Rzo9PD5THRFYB6KfKYyYz1t3vn3ztxOXLjaRTiZva1QA245av4A/s1600/pollock6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="211" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihATSxT6L3j5TVEn5pi8NCpOYhp6E2EdhVHROwTD8j3wL7qHuxEhkM9aeUY5FSAkDbtMxpyZjiKoJ602Tcl6Qm3lr-Rzo9PD5THRFYB6KfKYyYz1t3vn3ztxOXLjaRTiZva1QA245av4A/s400/pollock6.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfZ3tkBSHdcTVlK6DpVLhm6YIuydH3EcUyUfoH3cqC_-vRmJjWmjY9yyEM3GzyVs3zQ0DguEmQ2rYlHLLC7cCx2oXSG0rVVxnoZjwgsbAJIeqSQwpDy15hIYL6iBIWSLozAqrm2QF-_BQ/s1600/pollock8.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfZ3tkBSHdcTVlK6DpVLhm6YIuydH3EcUyUfoH3cqC_-vRmJjWmjY9yyEM3GzyVs3zQ0DguEmQ2rYlHLLC7cCx2oXSG0rVVxnoZjwgsbAJIeqSQwpDy15hIYL6iBIWSLozAqrm2QF-_BQ/s400/pollock8.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKHwBOxDkw5SDLeMtob_wxilr5rOp2sq0XGh_pMW6xB_tYXQSy5gtHLH0aRsisDXuIotAQeBBouVTKoJbIvappjdvq4v0C3LP35d-Ny12j7CjPUmQRKzXovXr9aMs2bn9sC1I4sx0zY2w/s1600/pollock9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKHwBOxDkw5SDLeMtob_wxilr5rOp2sq0XGh_pMW6xB_tYXQSy5gtHLH0aRsisDXuIotAQeBBouVTKoJbIvappjdvq4v0C3LP35d-Ny12j7CjPUmQRKzXovXr9aMs2bn9sC1I4sx0zY2w/s400/pollock9.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpt5LWNgEaafmoEsiMOidEbF_vbH4uzx-EBTtnP9h-8n5UVswlJtPyNyGS0RCncyuI8c4CH4mL86yFXazHIawcVTuAzJwn_bFqsbwS6Tk9GDULXK-e8iJ-4CSZfO4H6aOLU4lAwXmv4D8/s1600/pollock10.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpt5LWNgEaafmoEsiMOidEbF_vbH4uzx-EBTtnP9h-8n5UVswlJtPyNyGS0RCncyuI8c4CH4mL86yFXazHIawcVTuAzJwn_bFqsbwS6Tk9GDULXK-e8iJ-4CSZfO4H6aOLU4lAwXmv4D8/s400/pollock10.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQcsBy1dZw8Fnhqnz2uDPATWXDdJjP_aicEJR1aVsyo-yUQ35k8N7JP8iDmdGhgawkn1pY4DnZO7j3IBY5SGR372VlrLJTDHfXnsdgs6MAW91XunYT4a_PBILwNwWyzB91hNwPNcuTlHs/s1600/pollock11.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQcsBy1dZw8Fnhqnz2uDPATWXDdJjP_aicEJR1aVsyo-yUQ35k8N7JP8iDmdGhgawkn1pY4DnZO7j3IBY5SGR372VlrLJTDHfXnsdgs6MAW91XunYT4a_PBILwNwWyzB91hNwPNcuTlHs/s400/pollock11.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGAv6JtWio8YVbd62I4bj9GFeiUR2sbGm-Cz6G7ZsgXEE8P1zV5KDLGLjIE0LVVowc7pC2jGbEY6MCBdWw_yMYnLHYs4GgHMmhi6xAGexZOCFU42G1vmAzqYRMlTDlyM_vqR5a08_i1z0/s1600/pollock7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGAv6JtWio8YVbd62I4bj9GFeiUR2sbGm-Cz6G7ZsgXEE8P1zV5KDLGLjIE0LVVowc7pC2jGbEY6MCBdWw_yMYnLHYs4GgHMmhi6xAGexZOCFU42G1vmAzqYRMlTDlyM_vqR5a08_i1z0/s400/pollock7.jpg" width="400" /></a></div>
<br />
The colors you see in these renders are not the final landscape colors. Each color identifies a different layer of more detailed material that will go there. These are placeholder materials Pollock is creating for you.<br />
<br />
Pollock's main input is photographs, which you provide to suggest the geography of each biome. In case you want to create a full continent, Pollock will ask you some additional basic facts about elevation, temperature and wind direction.<br />
<br />
In continents, you will get nice surprises like a desert appearing on one side of a mountain range:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLGtJVhKI8lBB4gpbx3lDt5sJALI-RRLLtDVXtkJNirjdJpOwTrT-98V2Qs5nK1cHIJbjg37WELjkuQEmtZd3y-umU6xXXMvHIyjz6TpyycvH2XP58T1e2ND2L0qyN7TsH3mZYL8Uv_T0/s1600/pollock4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="211" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLGtJVhKI8lBB4gpbx3lDt5sJALI-RRLLtDVXtkJNirjdJpOwTrT-98V2Qs5nK1cHIJbjg37WELjkuQEmtZd3y-umU6xXXMvHIyjz6TpyycvH2XP58T1e2ND2L0qyN7TsH3mZYL8Uv_T0/s400/pollock4.jpg" width="400" /></a></div>
<br />
While the other side of the same range is all made of fertile land:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgceYR6RECUVNho0oG93DFI0tC5pyph0TktcB4jN7IVePY2pTRKvyEIU7mDKIYI64g9lG491_ATSs3HRF92BKc6eb0pnMb6QvN1DVIIwpXioJuxk3_ekEZ9yZKF8v1bzutdKu9ROXDYDN4/s1600/pollock5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="211" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgceYR6RECUVNho0oG93DFI0tC5pyph0TktcB4jN7IVePY2pTRKvyEIU7mDKIYI64g9lG491_ATSs3HRF92BKc6eb0pnMb6QvN1DVIIwpXioJuxk3_ekEZ9yZKF8v1bzutdKu9ROXDYDN4/s400/pollock5.jpg" width="400" /></a></div>
<br />
This has happened due to all the moisture coming from the sea precipitating over one side and having only dry air go over the mountains.<br />
<br />
It takes around five minutes to set this up from scratch. The system will so some pre-processing for a few minutes (usually less than five) and that's it. In less than 15 minutes you can complete the creation of an entire continent that spans over a dozen different biomes.<br />
<br />
We are in the last stages of completion for this system. There are two main features missing: the addition of forests, rocks, etc. and plugging this with the lake generator to get inner lakes. Right now the system only does ocean.<br />
<br />
This system will be included in the Voxel Farm 3 release.Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com8tag:blogger.com,1999:blog-3779956188045272690.post-16039567347215033522016-06-13T09:00:00.002-04:002016-06-13T09:25:52.362-04:00A simple creative mechanic<br />
For some people, a pencil is all they need to create something amazing. For others, the blank page can be discouraging. It is not an invitation to create, rather a reminder you may not be a creative person after all.<br />
<br />
I see voxels as a creative medium far superior in terms of simplicity to anything that came before. They are closer to working with physical matter, your mind just gets what you need to do. If done right, they can be as simple and intuitive as using a pencil on paper. But again, pencils can be quite daunting.<br />
<br />
I keep asking myself if there is a way around this. We all like to feel creative. Is there a framework where technology can help? Dumbing the medium down to large boxes to level the playing field worked for Minecraft, but this giving both Shakespeare and the village idiot a total vocabulary of five words. They may have a good time just do not expect Julius Cesar.<br />
<br />
What if you are not asked to create something entirely new after all? Drawing with a pencil is not the only way you can feel good about your creative self. Remember coloring books. They remove all the stress in the creative act, but you still feel you are creating something.<br />
<br />
Here is the equivalent of a coloring book using voxels:<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/-2zz7RjDhTs" width="560"></iframe>
<br />
<br />
If you are a Landmark builder you will know exactly what is going on. The shapes are already there, they are just filled with air. A paint tool converts the user brushstrokes into visible matter by applying the user's material of choice.<br />
<br />
I see games in the future exploiting this mechanic. My five-year-old kids had a lot of fun filling up the different shapes I set up for them. A game could make building rich objects and structures very accessible and stress-free by just hinting where things could be built, and leaving enough for the player to discover and decide on their own.Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com21tag:blogger.com,1999:blog-3779956188045272690.post-42953469557964515982016-06-09T12:30:00.000-04:002016-06-09T12:30:03.766-04:00Voxel Farm 3<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw9adovRwz2uOVyorFtzhgySbyqTB5lKXSD9A48XvUIfiamrX2O4MK1KDLxVDb6XuWTpagog7n2nBGdDNAsheoYrciapW_wp_2BNzwatG6hVsf7xxf5gKVz3UCw9_8KtR7Xj1UNN_GrTQ/s1600/brokenmoon.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="286" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw9adovRwz2uOVyorFtzhgySbyqTB5lKXSD9A48XvUIfiamrX2O4MK1KDLxVDb6XuWTpagog7n2nBGdDNAsheoYrciapW_wp_2BNzwatG6hVsf7xxf5gKVz3UCw9_8KtR7Xj1UNN_GrTQ/s400/brokenmoon.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
I'm happy to announce Voxel Farm 3, a new version of our tech, will be available August 2016.<br />
<br />
The team has been working hard towards this next major release. There are still a lot of bugs to squash, but pretty much everything included in the release is ready.<br />
<br />
The major items in the release are:<br />
<br />
<ul>
<li>UV-mapped voxels</li>
<li>Meta-materials and Meta-meshes for large, custom procedural objects</li>
<li>Improved Unreal Engine 4 Integration</li>
<li>New instancing system, both voxel and mesh-based</li>
<li>Intelligent Biome Terrain Synthesis</li>
<li>Continent and landmass generator</li>
</ul>
<div>
<br /></div>
<div>
I have covered most of these already in earlier posts. There are some other items under wraps that we have not disclosed yet, mainly because we are not sure if they will make the release.</div>
<div>
<br /></div>
<div>
The new version will bring a new business model. We are dropping the monthly fees and royalty payments. The new model is simple: you purchase for a one-time fee and you get one year of free updates. To make it fair, we have implemented these changes already for the current version. And everyone who has a Voxel Farm 2 license will get an upgrade to version 3 at no additional cost.</div>
<div>
<br /></div>
<div>
Gearing up towards the major release, we have just updated the company's website at: <a href="http://www.voxelfarm.com/">www.voxelfarm.com</a></div>
<div>
<br /></div>
<div>
There is a new WebGL demo that shows Voxel Farm in action over the web (it is in the Showcase section.) We also added Forums, something our users have been demanding almost since last year's launch. </div>
Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com13tag:blogger.com,1999:blog-3779956188045272690.post-72049269843495184952016-05-18T15:22:00.000-04:002016-05-18T20:35:06.598-04:00Terrain SynthesisThis is just a teaser. We are still working on this, but we got some results that are already good enough to show. It is not about where terrain types appear (that was covered <a href="http://procworld.blogspot.ca/2016/04/geography-is-destiny.html" target="_blank">here </a>and <a href="http://procworld.blogspot.ca/2016/04/geometry-is-destiny.html" target="_blank">here</a>), but how a particular terrain type is generated.<br />
<br />
We want to make procedural generation as accessible as possible. Just like a movie director who shows a portfolio of photos and concept art to the CGI team and just says "make it look like this", we wanted the creator to be entirely clueless about how everything works.<br />
<br />
This is how it feels to create a new terrain type. You provide a few pictures of it and we take it from there:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7NwIvF6ZssQeYiIUAfFccpcBURd1kXrB30dBBYkT_3_z7-9RsBUnwjm5gRimC7ZEqDtgAIwQAEb8cK_eb5A4bCED2Ngg0vz5ZK4zdrqYFFSvGENiqYAJ0YvqkHmHuaBvqTgJ4R8qJqc0/s1600/BiomeGen.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7NwIvF6ZssQeYiIUAfFccpcBURd1kXrB30dBBYkT_3_z7-9RsBUnwjm5gRimC7ZEqDtgAIwQAEb8cK_eb5A4bCED2Ngg0vz5ZK4zdrqYFFSvGENiqYAJ0YvqkHmHuaBvqTgJ4R8qJqc0/s400/BiomeGen.png" width="400" /></a></div>
<br />
This system builds a probabilistic model based on the samples you provide. That is enough to get an idea of the base elevation. On top of that, several natural filters are applied. It turns out we do know a bit more about this landscape. We know how dry it is, what is the average temperature among other things. The only fact we are missing and have to ask about is how old do you think this is. The time scales range from hundreds of millions of years to billions of years. (If you believe your terrain is 6000 years old we cannot accommodate you at the moment.)<br />
<br />
You can provide one or more sample pictures. The more pictures you provide, the better, but just one picture is often enough. Ready to see some results? The following terrains were synthesized out of a single photo in every case (do not mind the faux coloring, this is only to indentify the different terrain layers for now):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZmlmGzBosEm_n1dJEEXbbrcuHuh_aQLsMTsDn6qqgGdPpCpj1vLZJUdj9AhL-fhVt1_GwAh3vYL9kg-S2KhDBpWOxLB98Ss-KAEpnoJ4UK7HtNKgxiJ1S159aKiy1bCOjPDCfrQqN_pc/s1600/BiomeGen1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="387" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZmlmGzBosEm_n1dJEEXbbrcuHuh_aQLsMTsDn6qqgGdPpCpj1vLZJUdj9AhL-fhVt1_GwAh3vYL9kg-S2KhDBpWOxLB98Ss-KAEpnoJ4UK7HtNKgxiJ1S159aKiy1bCOjPDCfrQqN_pc/s400/BiomeGen1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzjTLq2QpaQkYvK5Cow6vu1T9_p6zPYc3Qa-dHmWnIDmJDbVwtgPF5Q4n81HluWti9VejJZNTjcw0hy_IOK4LaLmn-gBzvDJBw4CVvzmCGpSsDUAC-EFtbmrP0P7boCGVpLaVdcr4oZhU/s1600/BiomeGen2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="355" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzjTLq2QpaQkYvK5Cow6vu1T9_p6zPYc3Qa-dHmWnIDmJDbVwtgPF5Q4n81HluWti9VejJZNTjcw0hy_IOK4LaLmn-gBzvDJBw4CVvzmCGpSsDUAC-EFtbmrP0P7boCGVpLaVdcr4oZhU/s400/BiomeGen2.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9U1qhksvIOtrQLqUL88zUHifXhHfUb6m_KpMpBqvkCXf7M3-SDVAHIzpkAash4EjXXsZ9nFr2_ss2BKusQGX0fejZLZi5DB3dQ45vIw4b7UnkXj3ACgfrXYXNc1dAtLVsVB6tZfD4eEU/s1600/BiomeGen3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9U1qhksvIOtrQLqUL88zUHifXhHfUb6m_KpMpBqvkCXf7M3-SDVAHIzpkAash4EjXXsZ9nFr2_ss2BKusQGX0fejZLZi5DB3dQ45vIw4b7UnkXj3ACgfrXYXNc1dAtLVsVB6tZfD4eEU/s400/BiomeGen3.jpg" width="400" /></a></div>
<br />
Providing multiple samples creates some sort of mix, similar to how you find both mother and father features in their kids:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8P5mvnD70m5aU9CTjKc_NVbNr9LyT72OQY6oLpkt7ywE3lxmbWWaeaV3GHzFIQmKUwGZ_7x8Lz50q3JHKVVbNLwHyNcC9FY-hfOD983bYy0vU9bRm0fqpPNkcDyjlt8hAsRncB-RepsY/s1600/Biome3Samples.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8P5mvnD70m5aU9CTjKc_NVbNr9LyT72OQY6oLpkt7ywE3lxmbWWaeaV3GHzFIQmKUwGZ_7x8Lz50q3JHKVVbNLwHyNcC9FY-hfOD983bYy0vU9bRm0fqpPNkcDyjlt8hAsRncB-RepsY/s400/Biome3Samples.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
This works with any kind of image. It could be some fancy concept art as seen below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEmn4TvmwhCWRIr1eDSWCBPivNHkwaNpBlgmxhRMZk6lBRuhODwQEMA2jQ9CFc66GqnbURaV_9xDXt1xgShDJ9egzDoHBZPzFbyqRqCMZozgX42RN4buCbe9mrZKdzZ9FFN798_wUnDqU/s1600/BiomeGen4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEmn4TvmwhCWRIr1eDSWCBPivNHkwaNpBlgmxhRMZk6lBRuhODwQEMA2jQ9CFc66GqnbURaV_9xDXt1xgShDJ9egzDoHBZPzFbyqRqCMZozgX42RN4buCbe9mrZKdzZ9FFN798_wUnDqU/s400/BiomeGen4.jpg" width="400" /></a></div>
<br />
The natural filters in this case added some realism to the concept, and eroded some of the original hill shape. This could be avoided if you are after a more stylized look. But if you are short on time, and want to prototype different realistic terrains, the ability to quickly sketch something and feed it to the generator is a big help.<br />
<br />
Of course you can still look under the hood and tinker with generation frequencies, filter parameters, etc. You can still have terrain models imported from Digital Elevation Models, or from third party software like World Machine. The key here is you do not have to anymore.<br />
<br />
I'd be glad to enter into details of how this works if you guys are interested. Just let me know. I still owe the Part 2 of the continent generation. That should come shortly.Miguel Ceperohttp://www.blogger.com/profile/17586513342346629237noreply@blogger.com29