Document: CurvatureC Link: https://www.horo.ch/docs/mine/pdf/CurvatureC.pdf Curvature Texture in Channel C The Materials Lab has 4 channels A, B, C and D. If channels A, B and C are selected together, the alpha channel of the texture in channel C controls (and mixes) the output of the textures in channels A and B. Introduction The curvature option in the Materials Lab and Deep Texture Editor (DTE) came with Bryce 7.1. Curvature works on concave and convex surfaces. A texture can be set to handle curvature, the Mat Lab can be set to handle curvature and curvature can be used to determine whether the texture in channel A or B or a combination of both is output as material on a surface. David Brinnen made some videos about the usage and possibilities of curvature filtering. The videos are worthwhile to watch. Here, we concentrate on "How_to_investigate_curvature1", starting around 12 minutes into the video. The link to the video is at the end of this document. Concave and Convex Both are curved surfaces, contrary to a flat surface like a table top. A concave surface is hallow like a bowl that can hold water. Think of concave as accepting. A convex surface is the opposite, like a concave surface turned upside down. It cannot hold water, it trickles off the surface. Think of convex as expelling. The saddle, as David used in the video, has concave and convex surfaces and where they meet an ambiguous surface, mostly flat, results. Using a curvature texture in channel C selects channel A for a concave surface, channel B for a convex one and for the part that is neither concave nor convex both channels A and B are selected and combined. The resulting material applied to the object looks elaborate and even very natural, depending on the textures used for channels A and B. The role of channel A concave and channel B convex for the curvature filter in channel C can be swapped in the DTE. We will look at this, though swapping the curvature response roles of channels A and B may add perplex and confuse to convex and concave. Numbers There are controls that can be adjusted by moving the mouse and the values of the parameters are shown and usually ignored. An artist looks at the result, not numbers. The reason I am a fanatic of the numbers is because I can exactly repeat an experiment and often extrapolate how a certain parameter must be changed to get the result I am after. DTE Filter and parameter setting - with full precision There are no fields to enter numbers for the a and b parameters of a filter. Placing the mouse into the filter display, holding down the left hand mouse button (LMB) and moving the mouse up and down changes the b parameter and moving it sideways the a parameter. With the mouse in the a or b field, holding down the LMB and moving left or right, the value can be adjusted, but only with limited precision. There is a way for fanatics that want to adjust the value to the three decimal places. Like above, adjust the value as near as possible, let go of the LMB, press it again and move the mouse. The increments get smaller. Repeat this step and finally the last decimal place can be adjusted (e.g. 17.997, 17.998, 17.999, 18). <<<< Page 2 >>>> Creating a "default" material A good idea is to start a project with a defined material which is then adjusted to meet the needs and fits the object. There is nothing wrong with starting from scratch each time but it is more tedious and chances are that a small detail gets forgotten. At right, the Materials Lab with the channels A, B, C and D identified. Hold down the [Ctrl] key (Mac [Option] key) and click on channel C (arrow 1). This sets dots in channels A, B and C and assigns random textures. [Picture] The button on the lower left T of each texture is set by default (arrow 2). This selects texture as opposed to P picture just right of it. Clicking on the second button on top (arrow 3) opens the Deep Texture Editor (DTE). Clicking on the arrow (4) on top right of the preview opens the Materials Library. The three random textures in channels A, B and C must be changed in the DTE to serve our purpose. DTE Overview [Picture] <<<< Page 3 >>>> Set Texture in Channels A and B Only component 1 is used for both textures. Set the upper swatch to red (like above) and middle one to blue, never mind the lower one and set Color Mode to Linear Interpol2. Enable C (colour) and A (alpha), no need for B (bump). Note that Interpol is the abbreviation for Interpolation and has nothing to do with the international police called Interpol. Noise Type must be Nothing and Noise Mode Standard, never mind the other settings in the noise dialogue. Make sure Phase is also set to Nothing and Standard. Set Filter Type to Sine(aX)+b and click on Reset, this results in the parameters a = 1, b = 0 und c = 2. Ignore c. For channel A move parameter b to a value of about -2 (minus). Disable Colour and the preview must be black, re-enable Colour and accept [ ] to get back into the Materials Lab. For channel B move parameter b to a value of about 2. Disable Colour and the preview must be white, re-enable Colour and accept [ ] to get back into the Materials Lab. Set Texture in Channel C Components 1 and 2 are used. Work on component 1 first. Set the colour swatches from top to bottom to red, green and blue like shown in the DTE overview above but disable Colour and Bump, keep only Alpha. Enable Linear Interpol3. Noise and Phase must be set as for channels A and B: Nothing and Standard. Set Filter Type to X(a*curvature+b), which is the option at the end of the list. Click on Reset to set the parameters a = 1, b = 0 and c = 2; ignore c. Set the parameter a to 35 and b to -17.5 (minus). This is the same for both components, so copy component 1 to component 2. To do so, move the mouse into the preview of component 1, press LMB and move the mouse over the preview of component 2, then let go of the LMB. Now set the Blend Mode between the two components to Average. With this setting, channel A responds to concave surfaces and channel B to convex ones. If parameter a is set negative (-35) and b positive (17.5), the role of channels A and B is swapped. To get the transition into the middle of the preview, keep the value of parameter a the same for both components and make -b = a/2 for both components. If the transition area is in the middle with parameter b negative half of parameter a, concave and convex surfaces are treated equally. Setting -b to half of a is a good approximation if a is greater than 20. If a is 10, -b should be a/2.5. Setting the b parameters to equal values for both components makes the transition area between concave and convex the narrowest possible and not much area between the two is left for flat surfaces. Set the colour swatches for the combination also to red, green and blue and the Color Mode to Linear Interpol3, enable Colour on components 1 and 2. The left half of the preview is blue and the right half red. There is a narrow green line between them (like in the DTE picture above) and this green line is the transition area between concave and convex curves. The colours help to adjust the width of the transition area. Once the width is adjusted, Colour can be disabled for components 1 and 2 so that only left white, right black and a blurred thin grey line between them is visible. The Color Mode for the combination can be set back to None. <<<< Page 4 >>>> Materials Lab The access to the Material Options is by clicking on the down arrow left of the first (cannel A) texture. At the end of the list, there are six options concerning curvature. The first two, Calculate curvature and Linear scaling are usually selected if any curvature filter is used in the DTE. Make sure they are indeed set. Since our "default" curvature material works on concave and convex surfaces, Find concave must also be enabled. Hard edges is optional, it can give better results. Another option is Curv accounts for bump and is not covered here. Use it at your own risk and surprise. World space curv may or may not improve the result. Adjusting channel C The concave and convex curves of the objects are adjusted in the centre, which makes sense. However, either concave or convex surfaces can be favoured by moving the transition part left or right of the centre. This can be done with filter parameter b. If the transition is moved to the left, concave will get a higher resolution then convex and if the transition is moved right of the centre, it will be convex getting more space at the cost of concave. Adjusting the b parameter for both components will also allow adjusting the width of the transition in an asymmetric setup. Effect of Filter parameters a and b The filter parameter a value is set to 35 for the "default" texture. The higher the value for a, the sharper the transition gets. The b parameter is set to -17.5 which puts the transition in the centre between concave and convex. [4 Pictures] The Bunny from the Stanford Scanning Repository is used for the examples. The values for the a and b parameters are the same for component 1 and 2. The following sequence starts with the "default" setting but moves the b parameter equally left and right from the middle to enlarge the transient area. Parameter a is always 35. [4 Pictures] It does not matter whether the left b is component 1 or 2 or the right b component 2 or 1. It is the difference between the b parameter values that makes the transition area wider. <<<< Page 5 >>>> Size does matter, not for the curvature filter as such but the mesh is analysed and if the object gets smaller, the mesh gets compressed and leaves less room for the transition between concave and convex. Conversely, an enlarged object has the mesh somewhat coarser and there is more space between the opposing curves and hence more ambiguous area. [4 Pictures] The "default" material was used for the renders above; the size was changed from the reference shown in the previous examples. As expected, making the bunny smaller does not change much but making it bigger shows progressively more pink parts. Up to now, all examples have the transition in the centre by moving the b parameter for both components equally off-centre in the opposite direction to enlarge the transition. Keeping the "default" set up and the original size of the bunny, the b parameter can moved off centre by the same amount in the same direction for both components, keeping the transition area the same size but emphasising either concave or convex. [4 Pictures] The percent value is how much off-centre the transition is set. The centre is at 50% and -20% is 30% from left and +20% is 70% from left. Note that the b value does not behave symmetrically: 2.5 for 10% and 6.5 for 20% to the left; 4.5 for 10% and 8.5 for 20% to the right. If the transition is left of the centre, concave is favoured, if it is right of the centre convex. The above test renders confirm this; red is concave and blue convex. [3 Pictures] To adjust the b value in the centre or somewhat left or right of the centre, you can use these scales that show lines from 0% to 100% in 10% increments against the caption of the preview of the component. Save this "default" material as curvature template in the Materials Library. It is handy to adjust the filter parameters for the object(s) in a scene. Once it looks good, only the textures in channel A and B have to be replaced. <<<< Page 6 >>>> Examples The bunny was enlarged trice (300%), a shadow capture disk and the WhiteSphere HDRI as backdrop was added. The first, "default" has Filter a = 10 and b -4 which gives a wider transient area. The second, wood, has the same filter settings, two brown textures from High Resolution Terrain sets, additionally bump and default specular and as backdrop and ambient light the SmallWorld1 specular convolved HDRI. [4 Pictures] The third, stone, has again the same filter setting, grey textures from High Resolution Terrain sets, specular is controlled by the ABC channels but specular boosted by a hyper texture (PHT) and bump; backdrop and light by the At-Ford specular convolved HDRI. Finally, transparent, has different filter settings: a = 140 and b = -70. Channel A has a texture 5% transparent, channel B 90% transparent and the material is only used for Transparent, there is Specularity boosted by a PHT with a bit of Anisotropy. Backdrop is from the White-Sphere HDRI mixed with the blue sky colour. Convex is 90% transparent, concave only 5%. [2 Pictures] The "default" material is a helper to set up the filter for a scene. The terrain is in the gigantic resolution 2048, the size 4000 x 500 x 4000 Bryce Units. Both renders are lit identical; the right one has the HDRI (Illhorn_1280) tone-mapped used as backdrop and there is haze and cumulus clouds, and rendered with soft shadows; camera FOV is 105°. Links to the Video mentioned https://www.bryce-tutorials.info/bryce-tutorials/investigate-curvature-advanced-bryce-tutorial/ or https://www.youtube.com/watch?time_continue=4&v=UT52UpPFALg September 2017/horo