Duplicate Layer
DeanBrettle (Talk | contribs) m (→The Index Paramter) |
m (Terminology Updated) |
||
Line 2: | Line 2: | ||
{{Title|Duplicate Layer}} | {{Title|Duplicate Layer}} | ||
{{Category|Layers}} | {{Category|Layers}} | ||
+ | {{Category|NewTerminology}} | ||
<!-- Page info end --> | <!-- Page info end --> | ||
Line 8: | Line 9: | ||
== About Duplicate Layer == | == About Duplicate Layer == | ||
− | The | + | The {{Literal|Duplicate Layer}} makes multiple copies of the layers under it in real time. |
− | The Duplicate | + | The Duplicate Layer works like a loop over the content below it and provides a changing variable to that content. This variable (the {{l|Export|exported}} Index) can now be used ({{l|Connect[Connected}}) within that content. |
== Parameters of Duplicate Layer == | == Parameters of Duplicate Layer == | ||
The parameters of the Duplicate Layers are: | The parameters of the Duplicate Layers are: | ||
− | {|border="0 | + | {|border="0" style="border-collapse" cellpadding="3" cellspacing="0" |
|-style="background:silver" | |-style="background:silver" | ||
|'''Name'''||'''Value'''||'''Type''' | |'''Name'''||'''Value'''||'''Type''' | ||
Line 35: | Line 36: | ||
||Duplicate | ||Duplicate | ||
|} | |} | ||
− | |||
− | |||
=== The Index Parameter === | === The Index Parameter === | ||
− | The | + | The {{Literal|Index}} is automatically {{l|Export|exported}}. This is the only ValueNode that will change from one copy to the next. This exported value can then be selected in the {{l|Library Panel}} and {{l|Connect|Connected}} to the parameter(s) in the layer under the duplicate dialog which should change in the copies. |
− | The | + | The {{Literal|Index}} parameter has 3 sub-parameters, {{Literal|From}}, {{Literal|To}}, and {{Literal|Step}}. The value of the exported {{Literal|Index}} parameter varies from the value of {{Literal|From}} to the value of {{Literal|To}} in steps of size {{Literal|Step}}. |
− | + | {{Literal|From}} can be higher or lower than {{Literal|To}}. It doesn't matter whether {{Literal|Step}} is positive or negative. The steps will be in the direction from {{Literal|From}} to {{Literal|To}}. | |
− | The duplicated layers are placed in the layer stack in order, so that those corresponding to the | + | The duplicated layers are placed in the layer stack in order, so that those corresponding to the {{Literal|From}} value will appear lower down (i.e. least visible with normal composite blend mode) than those corresponding to the {{Literal|To}} value (most visible). |
== Known Problems == | == Known Problems == | ||
− | * The Duplicate Layer doesn't do anything about bounding boxes. | + | * The Duplicate Layer doesn't do anything about bounding boxes. Doing so could help to speed up rendering when the duplicated layers are outside the visible area. It's not clear how useful or possible this would be. To calculate its bounding box, the duplicate layer would need to loop through all values of Index to get the underlying bounding boxes and union them together. Maybe it's worth doing anyway. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | * | + | * Editing a Spline below a Duplicate Layer becomes very difficult while a recent edit is still being rendered, because the Spline Handles move around as the render runs (if the duplications are at different positions or scale). I tried using the same mutex around the Duplicate ValueNode's operator() method as is used in the Duplicate Layer's code, but it lead to [http://dooglus.rincevent.net/random/deadlock.txt a deadlock]. |
Revision as of 10:31, 16 February 2013
Contents
About Duplicate Layer
The "Duplicate Layer" makes multiple copies of the layers under it in real time.
The Duplicate Layer works like a loop over the content below it and provides a changing variable to that content. This variable (the exported Index) can now be used ([[Connect[Connected|Connect[Connected]]) within that content.
Parameters of Duplicate Layer
The parameters of the Duplicate Layers are:
Name | Value | Type |
Z Depth | 0.000000 | real |
Amount | 1.000000 | real |
Blend Method | Composite | integer |
Index | 3.000000 | Duplicate |
The Index Parameter
The "Index" is automatically exported. This is the only ValueNode that will change from one copy to the next. This exported value can then be selected in the Library Panel and Connected to the parameter(s) in the layer under the duplicate dialog which should change in the copies.
The "Index" parameter has 3 sub-parameters, "From", "To", and "Step". The value of the exported "Index" parameter varies from the value of "From" to the value of "To" in steps of size "Step".
"From" can be higher or lower than "To". It doesn't matter whether "Step" is positive or negative. The steps will be in the direction from "From" to "To".
The duplicated layers are placed in the layer stack in order, so that those corresponding to the "From" value will appear lower down (i.e. least visible with normal composite blend mode) than those corresponding to the "To" value (most visible).
Known Problems
- The Duplicate Layer doesn't do anything about bounding boxes. Doing so could help to speed up rendering when the duplicated layers are outside the visible area. It's not clear how useful or possible this would be. To calculate its bounding box, the duplicate layer would need to loop through all values of Index to get the underlying bounding boxes and union them together. Maybe it's worth doing anyway.
- Editing a Spline below a Duplicate Layer becomes very difficult while a recent edit is still being rendered, because the Spline Handles move around as the render runs (if the duplications are at different positions or scale). I tried using the same mutex around the Duplicate ValueNode's operator() method as is used in the Duplicate Layer's code, but it lead to a deadlock.