Shader Array: Difference between revisions
| Line 10: | Line 10: | ||
The Shader array shows quite a lot of information in the 3D Preview. It draws an orange dot at the location of each shader instance in the array. It draws a box around the area of the array. If you choose to limit the effect area (see the Settings section for more information) then it draws a dashed outline showing the the extents of the array plus the "Boundary padding". By default the Shader array displays the shader instances at each corner of the array. You can choose to preview all of the shader instances but this can make the 3D Preview slow and difficult to interact with. | The Shader array shows quite a lot of information in the 3D Preview. It draws an orange dot at the location of each shader instance in the array. It draws a box around the area of the array. If you choose to limit the effect area (see the Settings section for more information) then it draws a dashed outline showing the the extents of the array plus the "Boundary padding". By default the Shader array displays the shader instances at each corner of the array. You can choose to preview all of the shader instances but this can make the 3D Preview slow and difficult to interact with. | ||
The image below illustrates what rows and columns mean and the layout of the shader array. | |||
[[File:shader_array_schematic.png]] | |||
Currently the Shader array is only applied in a straight-up-and-down Plan Y projection. | Currently the Shader array is only applied in a straight-up-and-down Plan Y projection. | ||
Revision as of 10:30, 4 May 2011
Shader Array
Node Description and Purpose
The Shader array creates an array, or grid, of shaders. You might think of it like a populator for shaders, although it only works on a regularly spaced grid rather than random locations like a populator does.
The Shader array shows quite a lot of information in the 3D Preview. It draws an orange dot at the location of each shader instance in the array. It draws a box around the area of the array. If you choose to limit the effect area (see the Settings section for more information) then it draws a dashed outline showing the the extents of the array plus the "Boundary padding". By default the Shader array displays the shader instances at each corner of the array. You can choose to preview all of the shader instances but this can make the 3D Preview slow and difficult to interact with.
The image below illustrates what rows and columns mean and the layout of the shader array.
Currently the Shader array is only applied in a straight-up-and-down Plan Y projection.
Performance note: The Shader array can be slow, particularly with a large number of rows and columns. A 10 x 10 array will have 100 items in it. A 100 x 100 array will have 10,000 items. That's a lot of shader calculations. The most efficient shaders to use are ones which covered a defined area like the Simple shape shader or Image map shader. To improve performance you can also use the Limit effect area and Boundary padding settings to restrict the area covered by the Shader array.
Node Type: Shader
Settings:
- Position: This sets the position of the lower left corner of the Shader array.
- Rotation: This param sets the rotation of the array around the lower left corner. You can only rotate the array around the Y (upright) axis.
- Number of columns: This sets the number of columns in the array.
- Column spacing: This setting controls distance between columns.
- Number of rows: This sets the number of rows in the array.
- Row spacing: This setting controls the distance between rows.
- Limit effect area: If this setting is checked then the effects of the shaders are not applied outside the the area enclosed by the array. You can use the Boundary padding settings to expand this area.
- Boundary padding: This setting expands the area around the boundary of the array when Limit effect area is turned on. This could be useful if the shaders in the array are being clipped undesirably, as in the image below. It basically pads the array out on all sides.
- Shader: This is the shader used for the array.
- Use shader colour for displacement: If this is checked then the shader array will use the colour from the attached shader to generate displacement, rather than using the displacement information from the shader. This is especially useful when the attached shader doesn't actually handle displacement.
- Displacement direction: Choose the direction for displacement.
- Displacement amplitude: Set the amount of displacement.
- Displacement offset: Set the starting offset of the displacement.
- Preview all instances (slow): The default behaviour of the Shader array is to only preview shader instances at the corners of the grid, which means 4 instances are show at most. If this is checked then the shader array will show all shader instances in the grid in the 3D Preview. This can be slow, especially with a large number of rows and columns.

