https://distorted.org/redmine/https://distorted.org/redmine/redmine/themes/distorted/favicon/favicon.ico?16151139322016-11-24T15:58:43ZDistorted AndroidDistorted Android - Feature #8: Add support for new types of Regionshttps://distorted.org/redmine/issues/8?journal_id=412016-11-24T15:58:43ZLeszek Koltunskileszek@koltunski.pl
<ul></ul><p>Proposed improvements:</p>
<p>Completely decouple the Region from the Effect. Provide possibility to set up 'Masks' which, for every point on the Object, return a float describing the 'strength degree' the effect has on this very point.</p>
<p>Current implementation has this fixed: one can define a circle and a point (called the center of effect) and then the 'strength degree' is 1 in the center, linearly going to 0 towards the borders of the circle, and stays 0 outside.</p>
<p>Some effects also cut off the 'strength' at Object boundary (DISTORT) others don't (DEFORM).</p>
<p>The 'MASK' would make all of this generically adjustable for all effects:</p>
<p>1) define if we cut off the effect at:<br /> a) only Region boundaries<br /> b) common part of the Region and Object<br /> c) only Object<br /> d) never (i.e. Mask switched off and 'degree strength' 1 everywhere)<br />2) define a 'Region' (circle as now, but probably defined with absolute coordinates of the center of the circle, and not as a offset vector from the center of the effect)<br />3) define a pair of 'translation' functions which would translate the linear (-infinity, 1) 'degree' as returned by the 'degree' functions to actual 'strength degree'. <br /> The first of those functions, F1, would be responsible for translating values outside of the Region (negative degrees), the second, F2 - inside (the (0,1) degrees).</p>
<p>In order to do 3) above, we'd first need to rewrite the 'degree_region' and 'degree_bitmap' so that they return (negative) degrees when point is outside the (respectively) Region or Object, and not like now - cut off outside and always return 0.</p>
<p>Currently the 'translation pair' is - in Vertex effects - implicitly fixed at: F1 = 0, F2 = x; in case of Fragment effects, we have F1=0, and F2=x or 1 depending on if the effect is 'smooth'.</p> Distorted Android - Feature #8: Add support for new types of Regionshttps://distorted.org/redmine/issues/8?journal_id=1122020-02-27T14:11:11ZDistorted Adminadmin@distorted.org
<ul><li><strong>Assignee</strong> set to <i>Leszek Koltunski</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>20</i></li></ul><p>Partly done - we have decoupled the Region.</p> Distorted Android - Feature #8: Add support for new types of Regionshttps://distorted.org/redmine/issues/8?journal_id=1132020-02-27T14:16:09ZDistorted Adminadmin@distorted.org
<ul></ul><p>Idea for a new Region: a five dimensional 3D 'strip'. Definition:</p>
<p>1) a 3D plane ax+by+cz=d<br />2) a distance 'e'</p>
<p>Then to return a degree:</p>
<p>- compute distance 'E' a given point is from the plane<br />- return max(0, 1-E/e)</p>