Document: Warped Terrains Link: https://horo.ch/docs/mine/pdf/WarpedTerrains.pdf Warped Terrains Terrains in Bryce are derived from height maps and there cannot be overhanging parts because the parts above cover the ones below. Luckily, there is a trick to warp terrains to get overhangs. Bryce Terrain Height Maps A Bryce terrain is created in the Terrain Editor (TE) as a height map. These are greyscale or monochrome images where bright means high and dark low. Greyscale images can also be created outside of Bryce in a graphics application and there are even digital elevation maps (DEM) from parts of the Earth, Moon and Mars available as height maps and these can be imported into the Bryce TE. Greyscale images have no colours - obviously - and hence there are not the three red, green and blue bytes that make up a pixel, but just one for the brightness. Because the brightness determines the height or altitude, 8 bits per pixel resulting in 256 greyscales is a bit coarse and small terraces can be observed on a terrain. Bryce uses 16 bits per pixel which gives up to 65,536 steps, this is quite an improvement. In science, this is still not enough and geographers use floating point pixel values with up to 64 bits (double precision). Bryce can import monochrome images with unsigned integer 16 bit values as height map and can also export the ones created in the TE as such (TIF, PNG). A terrain does not have a single height pixel but an area of many that make up the landscape. The number of pixels for the width and depth per unit make up the resolution of the terrain. [Picture] Above, the same terrain in different resolutions: left 16 very coarse; centre 256 fine and right 4096 planetary. Bryce defaults to a resolution of 512 very fine. The terrain comes in the size of 81.92 Bryce Units (BU) wide and deep and 20.48 BU high. This gives an area to height ratio of 4:1 which is often exaggerated, 8:1 or 10:1 may be more appropriate but sometimes 2:1 or even 1:1 gives the result you are after. The area of 81.92 BU square is almost always too small for a landscape. A landscape should interact with haze in order that near and far parts can be distinguished like in nature. A good start is an area of around 4000 BU and a height of 500 BU. Note: a good start, not the mandatory setting - much depends on the terrain used. Also consider that a material applied to the terrain can look quite different on a small or big landscape. As a reminder, terrains can be used for much more than just terrains. Many elaborate objects can be drawn as height maps. The façade of a building is just an example. [Picture] Another example is Beancounter's Delight at right. Apart from the ground plane, everything is terrains, including the calculator. This is - of course - beside the point of this document but it may encourage you to start experimenting with the TE. <<<< Page 2 >>>> Warping Terrains After the introduction we know that there are no overhangs possible with a height map but here are two examples of overhangs that were made from height maps. [Picture] Now - can it be done or can it not? Bryce takes the data in the height map and creates a mesh from it and this mesh can be warped. A warped terrain shows still the same height map when looked at it in the TE. If you want to keep it, exporting the height map for a later use is useless. What can be done is saving the warped terrain in the Objects Library. When it is retrieved, it is still warped and when opening the TE for this warped terrain, the initial height map is shown. Practical Example We use the centre terrain on the previous page but set it to default size and rotation. The TE shows the height map, the render the terrain front view with the red mesh overlaid. [Picture] The terrain is kept at the default grey so we do not get distracted by the material and bump. The sun is the key light and a uniform grey HDRI brightens up the black shadows. The terrain can be warped in two directions: left/right and front/back. For front/back, the terrain ought to be rotated by 90°. Here, we will always warp to the right. By the way, the Perspective Camera is used, not the Directors. It looks straight ahead. This setting makes it easier (at least for me) to visualise what is going on. Rotate the terrain in the Z direction (Roll or Bank). Below it is rotated by -45° (negative). If the rotation is positive, the terrain rolls to the left instead of the right. The angle can be different. You have to experiment to get what you seek. Then either pull on the X marker on the mesh or use the arrows of the Edit Resize tool, not the Reposition ones. The picture below at right shows what is meant (enlarge in your viewer). <<<< Page 3 >>>> [Picture] After resizing X using the resize arrows or by pulling X on the wireframe to the right, the terrain gets warped as shown below at left. It is difficult to precisely determine how the result will look and you may have to return to the original position or pull a bit more or move a bit in the opposite direction. [Picture] Then, set Z rotation back to zero, move the terrain into the centre and place it back on the ground. The picture above at right shows this. The sizes X (side) and Y (height) have changed. The terrain looks warped. [Picture] The view from above shows that the terrain is not square anymore. Set it back to the original size. The mesh outline is extended to the right. [Picture] Above is the result of all the labour. It has the same size and is at the same position as the initial one shown on the previous page. Next, the area to height ratio may have to be adjusted. <<<< Page 4 >>>> Below are two example renders with this warped terrain, rotated a bit and under different light and with different materials. The initial terrain was not a good choice, the peaks do not look very natural and even with the materials used the resolution fine (512) is just not sufficient. The right example seems to be a bit better and could be used as a semi-far island but when zooming in or for a big document size the resolution is just not enough. The terrains were scaled to 4000 x 4000 BU (X and Z) and 800 BU (Y) for an area to height ratio of 5:1 [Picture] Adjustments: Terrain Roll or Bank Z A cylinder was put in the middle of the depth and at one fourth of the width from left into the terrain and grouped with it. The terrain group was banked Z by different angles and the width X stretched to the right until the top of the cylinder hit the image frame. There are only small differences visible. [Picture] Adjustments: Terrain Height Y The cylinder was set in the centre of the terrain and made small. The terrain group was banked Z by -45° and the width X stretched until the bottom of the cylinder on the ground hit the image frame. The default height of the terrain was halved before warping, kept at nominal and doubled. Again, there is only a small difference visible. [Picture] Adjustment: Pulling Sideways X How much the width is stretched really makes a difference. Two additional cylinders were buried into the terrain. One 75% left of the centre (X=-30.72) and one 75% right of the centre X=+30.72). The terrain was rolled Z by -45° and then X stretched until the bottom of the cylinder hit the right image frame. Stretching right until the far left cylinder hits the image frame really stretches this stretching a bit far (see pictures below). <<<< Page 5 >>>> [Picture] The initial terrain height and the banking or rolling of Z does not change the result much, if at all, but stretching does. Unfortunately, this is just the parameter that is the hardest to control. To demonstrate what is going on I added a cylinder as reference. This is good if terrains with different resolutions are to be warped. There is no way but experimenting how far the terrain must be stretched to get the desired result. Stacking Warped Terrains Create the terrains in the different resolutions you need. Make sure X, Y and Z size are the same for all of them. Then save them to the Objects Library. I usually work with three: 1024 massive, 2048 gigantic and 4096 planetary resolution. To stack two or three warped terrains can be a bit tricky but a good method is to use the lowest resolution terrain first and experiment until you have it right. Take a note of the Z rotation and how far the terrain was stretched. Clear it out, get it anew from the library, then place, rotate and stretch it. Then get the second higher resolution terrain from the library, place it like the previous one and set Z rotation. Then stretch it until the wireframes overlap. [Picture] The picture shows at left the low resolution terrain and at right the second terrain in red over the first black one. If you have a third, do it the same as you did with the second. Then select one terrain after the other, set Z rotation back to 0, the size to default X=81.92, Y=20.48, Z=81.92 and centre X. Group the terrains and scale the group as needed, position and rotate it; place the camera. The position (mainly the height above ground Y position) can be fine adjusted and then the different materials applied to the individual terrains. At right, three warped terrains with different resolutions stacked. Green is the massive, blue the gigantic and red the planetary resolution terrain. The size is 4000 BU and the area to height ratio 5:1. The next step is to assign materials to the terrains, create an interesting sky, adjust haze and work on the lighting. [Picture] Not every terrain is suitable for warping. Assuming warping is done to the right, a good terrain will have the high mountains more on the left side and lower mounds to the right, or even just a flat part. The terrain above just ends after the right image border. <<<< Page 6 >>>> [Picture] The above example is not an ideal terrain to warp. If the camera is moved near the peak marked with the red arrow, the terrain slopes upward to the right and this may not be desired. See the picture on top right of the second page with the rock outcrop. It does not look bad but the slope at left somehow spoils the effect. Modifying the Height Map Of course, the height map can be modified in the TE before warping the terrain. But since the height map stays the same if the terrain is warped, it can also be tweaked and modified once the terrain is already warped. [Picture] At left the TE view of the terrain on top of this page, at right the modified height map with the resulting terrain in the centre. It looks quite fine from this distance and angle. If we examine this closer like below at left, we notice that the overhanging wall is flat. This must be remedied with an appropriate material and some bump. [Picture] The other option is taking a different brush than the default one to remove the unwanted parts from the terrain. At right the Rocky Wall brush from the Brush Presets was used (4th line the 1st one). The overhang is not flat anymore; using another brush will give a different result, better or less good. In the end, the material applied and the light settings will again change its appearance. How about warping in another direction? One way is to export the terrain as a 16 bit greyscale TIF or PNG image, rotate it in a graphics application and import it back into the TE, then follow the method above. <<<< Page 7 >>>> Warping in all four Directions Up to now, we only discussed warping in the X direction and only to the right. There are four directions the terrain can be warped: left (-X), right (+X), into the distance (+Z) and towards the camera (-Z). Here is a simple terrain and a render of it that shows what the directions mean. [Picture] This assumes that the Perspective (not the Directors) camera is used and all rotations set to 0. There is no need to resort to an external program; it is just a bit harder to visualise how it works and there are also a few quirks. For the four directions, there are eight possibilities; four of them are less mind boggling than the four others. [Table] The table shows the eight possibilities, the green marked ones I find simpler but the red ones work just as well. - Warp Direction means in which direction a peak should overhang. - Initial Settings show the Rotate angles of the terrain to be ready for warping. - Pull is the direction the terrain is to be warped. Use the Edit tool on top of the GUI. - Rotate Back is to move the terrain back to the default position and horizontal. Xr is the X Rotate value after warping and X how to set it to rotate the terrain back to horizontal. - Adjust Size to default for the terrain size after warping. - Use recommends which method seems easier to grasp. <<<< Page 8 >>>> Warping in the Z direction is a bit challenging because the amount of stretching is difficult to see. Therefore, the terrain should be rotated: Y +90 or -90 (270) degrees then it can be stretched X left or right as shown on the previous pages and finally Y rotated back; the X stretching results in warping in the Z direction. Steps to warp in the Z direction Here are the steps to warp the terrain in the Z direction and put it back to the default location and orientation. The terrain is initially at its default position and size and no rotation: Origin and Position 0, 10.24, 0; Rotate 0, 0, 0; Size 81.92, 20.48, 81.92 as shown at right. [Picture] Warping into the distance, away from the camera +Z 1. Set Rotate Y to +90. 2. Set Rotate X to +45. 3. Either use the Edit Resize tool or the mark on the wire-frame and pull X to the right as shown on page 3. 4. Set Origin X back to 0, double Size Y to 40.96 and half Z to 40.96 but keep Y Origin at 10.24. 5. Set Rotate X to the new calculated value and Rotate Y back to 0. Warping towards the camera, -Z 1. Set Rotate Y to -90 or 270. 2. Set Rotate X to -45 or 315. 3. Same as step 3 above for +Z. 4. Same as step 4 above for +Z. 5. Same as step 5 above for Z+ but calculation is different. Calculating new Rotate X value after warping Xr : is the new generated Rotate X value after pulling X to the right. X : is the Rotate X value to turn the terrain back to horizontal. X = Xr - 90 + Xr for +Z; Example: Xr = 72.374 after warping: 72.374 - 90 = -17.626, -17.326 + 72.374 = 54.748; X = 54.748. X = Xr + 90 + Xr for -Z; Example: Xr = -77.573 (minus) after warping: -77.573 + 90 = 12.427, 12.427 + -77.573 = -65.146; X = -65.146 (or 294.854). Instead of calculating the new Rotate X value, you can also just fiddle and set rotation with the Edit tool back manually. If you use the calculated value you can be sure that if you rotate Y the terrain base will always stay horizontal. Note that the sizes need to be adjusted as desired when the warped terrain is used for an artwork. <<<< Page 9 >>>> [Picture] This is the reference Terrain, looking at it straight ahead and looking at it from above. [Picture] Warped +X (right) with the values of first row (green) in the table on page 7. [Picture] Warped -X (left) with the values of second row (green) in the table on page 7. [Picture] Warped +Z (away from camera) with the values of fifth row, inset shows it from the side. [Picture] Warped -Z (towards camera) with the values of sixth row, inset shows it from the side. <<<< Page 10 >>>> It is difficult to exactly understand what Bryce does when the terrain is stretched in the Z direction. The terrain can also be stretched in two directions. [Picture] After +X and then +Z stretching the resulting warped terrain viewed at Y rotation 0. [Picture] After +X and then +Z stretching the resulting warped terrain viewed at Y rotation -90 (or 270). The actual terrain size is not what is shown in the Object Attributes. The outline in the wire-frame is bigger and it is extended in the directions the terrain was stretched. The table shows the terrain size set in the Objects Attributes dialogue and the actual terrain size. [Table] The differences in the Y and Z sizes are from the warping in the Z direction. Below if warped in the Z direction only then the Y and Z sizes do not match anymore. [Table] If warped in the X direction only, the values in the Object Attributes and the effective terrain sizes do match; the outline extends in the X direction in which the terrain was stretched. This concludes the discussion about warped terrains in Bryce. Not something you will use on a daily basis but it may come in handy for a particular project. September 2018/horo