Creating Anim-Brushes from Flame-Fractals

From MediaWiki
Jump to: navigation, search

Creating Anim-Brushes from Flame-Fractals

In most painting-programs like PD Howler you can not only paint with brushes, but also with animated brushes. I will show you a technique which will allow you to create an endless number of awesome animated brushes from fractals on the fly.

You may use those brushes to paint really interesting scenes or to create textures.

Anbtut01 introjpg.jpg

Supported output formats

Currently, the creation of ANB-files (PD Howler AnimBrush) ist directly supported by JWildfire. If you use another painting-software, you must find out how to create an animated brush by importing an image-sequence. In JWildfire you would then create an image-sequence of PNG-files (don't forget to enable transparency rendering) and would use the painting-program or some other tool to create the actual animated brush. Hopefully, this sounds more complicated than it is. In PD Howler, the software I use, you can just import an image-sequence from the brush-menu, I would guess that in other painting-software it is as easy as well.

Basic idea

Anbtut01 example1.jpg

The basic idea is to create a fractal animation and use the Easy Movie Maker to render it. Either by rendering frames (for further processing in your painting-programm) or creating the anim-brush directly.
There are two possibilities to create such animated fractals in JWildfire:

  1. Key-framed animation
  2. Animation by motion-curves

We will show both in this tutorial.

Prerequisites

Example Flame

The tutorial is written using the following example-flame, but of course you may use any other flame as well. You may copy the params of this flame at the bottom of this article.

Anbtut01 flame.jpg

Make the flame transparent

It is recommended to turn on background-transparency for your flame. You do this on the Coloring-tab. Please note that the background is always automatically transparent when you use the feature to create ANB-files directly from JWildfire. Anbtut01 transparency.jpg

Create an appropriate size-profile

In order to render the image-sequence we will need an appropriate size profile, brushes will usually be a rather small and quadratic size. A good value to play with, is a resolution of 256x256.

Create a size profile if you do not have one, yet:
Anbtut01 flame1 create size profile.jpg
In the resolution-fields enter the desired values:
Anbtut01 size profile.jpg

Alternative 1: Keyframed animation sequence

The simplest approach is to create a keyframed animation sequence. Simply stated, you just create another version of your flame and let JWildfire calculate a transition between the two. If you want to loop the animation-sequence (i.e., return to the initial state) you would just create keyframes: initial flame -> modified flame -> initial flame.

  1. Load/create your initial flame into the main editor
  2. Copy this flame to the "Easy Movie Maker" by pressing the "Movie"-button

Anbtut01 flame1 editor.jpg

  1. The software automatically switches to the "Easy Movie Maker"-tab

Anbtut01 flame1 movie maker.jpg

  1. Go back to the "Flame-Editor"-tab and modify your flame in order to generate an interesting mutation. Slightly change colors, move triangles and maybe change a few parameters of variations. But please avoid to add or remove transforms and add or remove variations. Otherwise the generated animation sequence will probably not be very smooth.
  2. Copy this modified flame to the "Easy Movie Maker" by pressing the "Movie"-button.

Anbtut01 flame2 editor.jpg

  1. The software again automatically switches to the "Easy Movie Maker"-tab. We have now defined two keyframes.
  2. In order to create a smooth animation sequence between these two keyframes, we have to change certain parameters:
    1. Set the duration (number of generated frames) of the first fractal in the field "Duration (frames)" to the desired value. A value of 30 is a good value to start
    2. Set the number of interpolated frames of the first fractal in the field "Morpth (frames)" to the same value
    3. Important: set the morph-type of the first fractal to MORPH
    4. Set the duration of the second fractal to 1


Anbtut01 flame1 movie sequence1.jpg

  1. You could stop here, but we want to create a closed (looping) animation. In order to do this we have to add a third keyframe and use the first fractal for it
  2. So, reload the first fractal into the editor and press the "Movie"-button. The software again automatically switches to the "Easy Movie Maker"-tab. We now have defined three keyframes. Again, we have to adjust some parameters of the animation sequence.
    1. Set the duration (number of generated frames) of the second fractal in the field "Duration (frames)" to the desired value. In my example I used a shorter value than before, for example 16
    2. Set the number of interpolated frames of the second fractal in the field "Morpth (frames)" to the same value
    3. Important: set the morph-type of the second fractal to MORPH
    4. Set the duration of the third fractal to 1

Anbtut01 flame1 movie sequence2.jpg

  1. We just finished the design process and can preview the sequence by pressing the "Play"-button.

Alternative 2: Animation by using motion-curves

Creating animations by motion-curves is much more versatile and precise, but probably takes a little more effort.

To start with it, you must enable the availability of motion-curves in the interface by pressing the large button with the movie-like-symbol:
Anbtut01 enable motion curves.jpg
This adds small buttons to nearly each parameter-field. Instead of having a fixed value in this field you can have a motion-curve which describes the change of the property over time. Time is here represented by frame-numbers, together with a frame-rate (fps=frames per seconds) you can come to time in seconds. But, for creating an anim-brush it is sufficient to work with frame-numbers, we want create a sequence of 64 frames now.

It is recommended, but not necessary to enter the desired frame count in the Frame count-field at the right border of the editor window:
Anbtut01 framecount.jpg

Please select now the 2nd transform (the having linear as only variation), and click at the small motion-curve-button left of the rotate-button, in order to create a motion-curve for the rotation-angle of the 2nd transform:
Anbtut01 create motion curve.jpg

When entering point, you see only one point, which means the value is not changing over time. Values at frames before the first point are equal to the value at the first point, where values at frames after the last point are equal to the value at the last point. So, when you have only one point, the value is the same for all frames.

To change this, let's add a new point by pressing the Add Point-button. The mouse-pointer will turn into a crosshair, click into the black viewpoint in order to place the point:
Anbtut01 edit motion curve.jpg

Drag the point and watch the preview change, movie it to a position which show an "interesting change", and adjust the frame-position of the point by entering the end-frame-number (64 in our case). This is to ensure that the animation ends with the shape your "interesting change".
Anbtut01 edit motion curve2.jpg

Of course, you may use any number of points you want, not only two. And you may create a motion-curve for any property you want to change. In the example-flame in the appendix I create a 2nd motion-curve for the shift-parameter of the gradient, in order to let the shape slowly let change the color.

When ready, just press Movie-button to transfer the animated flame (i. e. the motion curves are bound to the flame) to the Easy Movie Maker
Anbtut01 flame3 editor.jpg

Set the duration to the desired number of frames (64 in our case) and we are done:
Anbtut01 flame3 movie sequence1.jpg

Render it

Creating an ANB-file for PD Howler

JWildfire supports the creation of animbrushes for PD Howler directly, they have the extension *.anb. To create such a file, choose in the Easy-Movie-Maker the following settings:

  1. Resolution: your desired resolution for the brush, usually square size
  2. Quality: a quality-profile with some decent quality, a value of 500 is a good start to experiment with
  3. Output: ANB

Anbtut01 render anb.jpg Hit the Generate sequence to render the frames and to create the ANB-file in one step. Switch to PD Howler and load the file using the Brush->Animated brush->Open...-menu.

Creating an image-sequence

If your painting-program can not import ANB-files, you can create a sequence of PNG-files from within JWildfire and then use the painting program or some third-party-software to create the animated brush. In the most cases this should be easy.

To create a sequence of PNG-images, choose in the Easy-Movie-Maker the following settings:

  1. Resolution: your desired resolution for the brush, usually square size
  2. Quality: a quality-profile with some decent quality, a value of 500 is a good start to experiment with
  3. Output: PNG_IMAGES

Make sure, that your flame has background-transparency ENABLED, the ANB-exporter handles this automatically, the PNG_IMAGES-exporter does not.
Anbtut01 render png.jpg

Appendix

Params of initial sample flame

<flame smooth_gradient="0" version="JWildfire 2.34 (22.02.2015)" size="458 458" center="0.6301118051385284 0.6584322003862277" scale="45.823991543388416" rotate="-37.96116888765869" filter="0.0" filter_kernel="GAUSSIAN" quality="100.0" background="0.0 0.0 0.0" bg_transparency="1" brightness="4.0" saturation="1.0" gamma="4.0" gamma_threshold="0.01" vibrancy="1.0" contrast="1.0" white_level="200.0" temporal_samples="1.0" cam_zoom="1.0" cam_pitch="0.0" cam_yaw="0.0" cam_persp="0.0" cam_xfocus="0.0" cam_yfocus="0.0" cam_zfocus="0.0" cam_pos_x="0.0" cam_pos_y="0.0" cam_pos_z="0.0" cam_zpos="0.0" cam_dof="0.0" cam_dof_area="0.5" cam_dof_exponent="2.0" cam_dof_shape="BUBBLE" cam_dof_scale="1.0" cam_dof_rotate="0.0" cam_dof_fade="1.0" resolution_profile="256x256" shading_shading="FLAT" antialias_amount="0.75" antialias_radius="0.36" motion_blur_length="12" motion_blur_timestep="0.015" motion_blur_decay="0.03" post_symmetry_type="NONE" post_symmetry_order="3" post_symmetry_centre_x="0.0" post_symmetry_centre_y="0.0" post_symmetry_distance="1.25" post_symmetry_rotation="6.0" frame="1" frame_count="300" mixer_mode="OFF" >
  <xform weight="0.5" color="0.0" mod_gamma="0.0" mod_gamma_speed="0.0" mod_contrast="0.0" mod_contrast_speed="0.0" mod_saturation="0.0" mod_saturation_speed="0.0" symmetry="0.0" cannabiscurve_wf="1.0" cannabiscurve_wf_filled="1" coefs="1.0 0.0 0.0 1.0 0.0 0.0" chaos="1.0 1.0" />
  <xform weight="0.5" color="0.0" mod_gamma="0.0" mod_gamma_speed="0.0" mod_contrast="0.0" mod_contrast_speed="0.0" mod_saturation="0.0" mod_saturation_speed="0.0" symmetry="0.0" linear3D="1.0" coefs="0.12799208171992568 0.7314273901194848 -0.7314273901194848 0.12799208171992568 1.5817153703191111 1.2258294119973112" chaos="1.0 1.0" />
  <palette count="256" format="RGB" >
6CC90969C10C66BA0E62B2115FAA135CA216599B1956931B528B1E4F83214C7C23497426
466C2842642B3F5D2E3C5530394D33364635323E382F363B2C2E3D292740261F43221745
1F0F481C084A1B054B1E0C48211246241843271E4029243D2C2B3B2F3138323735353D33
3843303B492D3D502B405628435C254662224968204C6E1D4E751A517B18548115578712
5A8D105D930D609A0A62A008629D076198076093075F8E065E88065D83065C7E065B7906
5A7406596F05586A05576505566005555A05545505535005524B045146045041044F3C04
4E37044D31044C2C034B27034A22034A1E034F21035423045A26045F2804642B04692D04
6E2F057332057834057E3705833906883C068D3E069240069743079D4507A24807A74A07
AC4D08B14F08B65108BB5408C15608C65909CB5B09C95A0CC25710BB5315B45019AD4C1E
A649229F462798422B913F308A3B358238397B353E7431426D2E47662A4B5F2750582454
5120594A1D5D4319623C166635136B2E0F6F270C7420087819057D19057818067318066E
17076A17076516086016085B15085615095114094D140A48130A43130B3E120B39120B34
120C30110C2B110D26100D21100E1C0F0E170F0E120E0F0E0E0F090D10040D11010E1301
0F1501101701111901121B01131D02141F02152102162302172602182802192A021A2C02
1B2E021C30021D32021E34021F3602203803213A03223C03233E03244003254303264503
2744032842032A40032B3F032C3D032D3B032F3A03303803313703333503343303353203
373003382E03392D033A2B033C29033D28033E2603402503412303422103432003451E03
461C03461B03441A034119033F18033C17033917023716023415023214022F13022C1202
2A1102271102241001220F011F0E011D0D011A0C01170B01150B01120A011009010D0800
0A07000806000505000A07011309031D0C05260E072F110939130B42160C4C180E551B10
5F1D126820147222167B251885281A8E2A1B972D1DA12F1FAA3221B43423BD3725C73927
D03C29DA3E2AE3412CED432E</palette>
</flame>

Params of the modified sample flame (2nd keyframe)

<flame smooth_gradient="0" version="JWildfire 2.34 (22.02.2015)" size="458 458" center="1.1757004766258534 0.6941189993197292" scale="49.71841379390803" rotate="-78.65079678911783" filter="0.0" filter_kernel="GAUSSIAN" quality="100.0" background="0.0 0.0 0.0" bg_transparency="1" brightness="4.0" saturation="1.0" gamma="4.0" gamma_threshold="0.01" vibrancy="1.0" contrast="1.0" white_level="200.0" temporal_samples="1.0" cam_zoom="1.0" cam_pitch="0.0" cam_yaw="0.0" cam_persp="0.0" cam_xfocus="0.0" cam_yfocus="0.0" cam_zfocus="0.0" cam_pos_x="0.0" cam_pos_y="0.0" cam_pos_z="0.0" cam_zpos="0.0" cam_dof="0.0" cam_dof_area="0.5" cam_dof_exponent="2.0" cam_dof_shape="BUBBLE" cam_dof_scale="1.0" cam_dof_rotate="0.0" cam_dof_fade="1.0" resolution_profile="256x256" shading_shading="FLAT" antialias_amount="0.75" antialias_radius="0.36" motion_blur_length="12" motion_blur_timestep="0.015" motion_blur_decay="0.03" post_symmetry_type="NONE" post_symmetry_order="3" post_symmetry_centre_x="0.0" post_symmetry_centre_y="0.0" post_symmetry_distance="1.25" post_symmetry_rotation="6.0" frame="1" frame_count="300" mixer_mode="OFF" >
  <xform weight="0.34" color="0.5387849270000247" mod_gamma="0.0" mod_gamma_speed="0.0" mod_contrast="0.0" mod_contrast_speed="0.0" mod_saturation="0.0" mod_saturation_speed="0.0" symmetry="0.0" cannabiscurve_wf="1.0" cannabiscurve_wf_filled="1" coefs="1.0 0.0 0.0 1.0 0.0 0.0" post="0.5809558674650417 0.6953234310092115 -0.6953234310092115 0.5809558674650417 -0.7710862430305662 -0.5536003796116891" chaos="1.0 1.0" />
  <xform weight="0.6" color="0.680407062281882" mod_gamma="0.0" mod_gamma_speed="0.0" mod_contrast="0.0" mod_contrast_speed="0.0" mod_saturation="0.0" mod_saturation_speed="0.0" symmetry="0.0" linear3D="1.0" coefs="0.12799208171992568 0.7314273901194848 -0.7314273901194848 0.12799208171992568 1.5817153703191111 1.2258294119973112" post="1.0775052623675716 -0.2438655563424056 0.2438655563424056 1.0775052623675716 0.0 0.0" chaos="1.0 1.0" />
  <palette count="256" format="RGB" >
4968204C6E1D4E751A517B185481155787125A8D105D930D609A0A62A008629D07619807
6093075F8E065E88065D83065C7E065B79065A7406596F05586A05576505566005555A05
545505535005524B045146045041044F3C044E37044D31044C2C034B27034A22034A1E03
4F21035423045A26045F2804642B04692D046E2F057332057834057E3705833906883C06
8D3E069240069743079D4507A24807A74A07AC4D08B14F08B65108BB5408C15608C65909
CB5B09C95A0CC25710BB5315B45019AD4C1EA649229F462798422B913F308A3B35823839
7B353E7431426D2E47662A4B5F27505824545120594A1D5D4319623C166635136B2E0F6F
270C7420087819057D19057818067318066E17076A17076516086016085B150856150951
14094D140A48130A43130B3E120B39120B34120C30110C2B110D26100D21100E1C0F0E17
0F0E120E0F0E0E0F090D10040D11010E13010F1501101701111901121B01131D02141F02
152102162302172602182802192A021A2C021B2E021C30021D32021E34021F3602203803
213A03223C03233E032440032543032645032744032842032A40032B3F032C3D032D3B03
2F3A03303803313703333503343303353203373003382E03392D033A2B033C29033D2803
3E2603402503412303422103432003451E03461C03461B03441A034119033F18033C1703
3917023716023415023214022F13022C12022A1102271102241001220F011F0E011D0D01
1A0C01170B01150B01120A011009010D08000A07000806000505000A07011309031D0C05
260E072F110939130B42160C4C180E551B105F1D126820147222167B251885281A8E2A1B
972D1DA12F1FAA3221B43423BD3725C73927D03C29DA3E2AE3412CED432E6CC90969C10C
66BA0E62B2115FAA135CA216599B1956931B528B1E4F83214C7C23497426466C2842642B
3F5D2E3C5530394D33364635323E382F363B2C2E3D292740261F432217451F0F481C084A
1B054B1E0C48211246241843271E4029243D2C2B3B2F3138323735353D333843303B492D
3D502B405628435C25466222</palette>
</flame>

Params of sample flame with motion-curves

<flame smooth_gradient="0" version="JWildfire 2.34 (22.02.2015)" size="814 458" center="0.6301118051385284 0.6584322003862277" scale="63.63331576767474" rotate="-37.96116888765869" filter="0.0" filter_kernel="GAUSSIAN" quality="100.0" background="0.0 0.0 0.0" bg_transparency="1" brightness="4.0" saturation="1.0" gamma="4.0" gamma_threshold="0.01" vibrancy="1.0" contrast="1.0" white_level="200.0" temporal_samples="1.0" cam_zoom="1.0" cam_pitch="0.0" cam_yaw="0.0" cam_persp="0.0" cam_xfocus="0.0" cam_yfocus="0.0" cam_zfocus="0.0" cam_pos_x="0.0" cam_pos_y="0.0" cam_pos_z="0.0" cam_zpos="0.0" cam_dof="0.0" cam_dof_area="0.5" cam_dof_exponent="2.0" cam_dof_shape="BUBBLE" cam_dof_scale="1.0" cam_dof_rotate="0.0" cam_dof_fade="1.0" resolution_profile="256x256" shading_shading="FLAT" antialias_amount="0.75" antialias_radius="0.36" motion_blur_length="48" motion_blur_timestep="0.01" motion_blur_decay="0.03" post_symmetry_type="NONE" post_symmetry_order="3" post_symmetry_centre_x="0.0" post_symmetry_centre_y="0.0" post_symmetry_distance="1.25" post_symmetry_rotation="6.0" frame="32" frame_count="64" mixer_mode="OFF" palette_modShiftCurve_enabled="true" palette_modShiftCurve_view_xmin="-6" palette_modShiftCurve_view_xmax="70" palette_modShiftCurve_view_ymin="-144.0" palette_modShiftCurve_view_ymax="16.0" palette_modShiftCurve_interpolation="SPLINE" palette_modShiftCurve_selected_idx="1" palette_modShiftCurve_locked="false" palette_modShiftCurve_point_count="2" palette_modShiftCurve_x0="0" palette_modShiftCurve_y0="0.0" palette_modShiftCurve_x1="64" palette_modShiftCurve_y1="-128.0" >
  <xform weight="0.5" color="0.0" mod_gamma="0.0" mod_gamma_speed="0.0" mod_contrast="0.0" mod_contrast_speed="0.0" mod_saturation="0.0" mod_saturation_speed="0.0" symmetry="0.0" cannabiscurve_wf="1.0" cannabiscurve_wf_filled="1" coefs="1.0 0.0 0.0 1.0 0.0 0.0" chaos="1.0 1.0" />
  <xform weight="0.5" color="0.0" mod_gamma="0.0" mod_gamma_speed="0.0" mod_contrast="0.0" mod_contrast_speed="0.0" mod_saturation="0.0" mod_saturation_speed="0.0" symmetry="0.0" linear3D="1.0" coefs="0.12799208171992568 0.7314273901194848 -0.7314273901194848 0.12799208171992568 1.5817153703191111 1.2258294119973112" chaos="1.0 1.0" xyRotateCurve_enabled="true" xyRotateCurve_view_xmin="-6" xyRotateCurve_view_xmax="70" xyRotateCurve_view_ymin="-7.331048387096774" xyRotateCurve_view_ymax="65.97943548387097" xyRotateCurve_interpolation="SPLINE" xyRotateCurve_selected_idx="1" xyRotateCurve_locked="false" xyRotateCurve_point_count="2" xyRotateCurve_x0="0" xyRotateCurve_y0="0.0" xyRotateCurve_x1="64" xyRotateCurve_y1="53.44570759625391" />
  <palette count="256" format="RGB" >
6CC90969C10C66BA0E62B2115FAA135CA216599B1956931B528B1E4F83214C7C23497426
466C2842642B3F5D2E3C5530394D33364635323E382F363B2C2E3D292740261F43221745
1F0F481C084A1B054B1E0C48211246241843271E4029243D2C2B3B2F3138323735353D33
3843303B492D3D502B405628435C254662224968204C6E1D4E751A517B18548115578712
5A8D105D930D609A0A62A008629D076198076093075F8E065E88065D83065C7E065B7906
5A7406596F05586A05576505566005555A05545505535005524B045146045041044F3C04
4E37044D31044C2C034B27034A22034A1E034F21035423045A26045F2804642B04692D04
6E2F057332057834057E3705833906883C068D3E069240069743079D4507A24807A74A07
AC4D08B14F08B65108BB5408C15608C65909CB5B09C95A0CC25710BB5315B45019AD4C1E
A649229F462798422B913F308A3B358238397B353E7431426D2E47662A4B5F2750582454
5120594A1D5D4319623C166635136B2E0F6F270C7420087819057D19057818067318066E
17076A17076516086016085B15085615095114094D140A48130A43130B3E120B39120B34
120C30110C2B110D26100D21100E1C0F0E170F0E120E0F0E0E0F090D10040D11010E1301
0F1501101701111901121B01131D02141F02152102162302172602182802192A021A2C02
1B2E021C30021D32021E34021F3602203803213A03223C03233E03244003254303264503
2744032842032A40032B3F032C3D032D3B032F3A03303803313703333503343303353203
373003382E03392D033A2B033C29033D28033E2603402503412303422103432003451E03
461C03461B03441A034119033F18033C17033917023716023415023214022F13022C1202
2A1102271102241001220F011F0E011D0D011A0C01170B01150B01120A011009010D0800
0A07000806000505000A07011309031D0C05260E072F110939130B42160C4C180E551B10
5F1D126820147222167B251885281A8E2A1B972D1DA12F1FAA3221B43423BD3725C73927
D03C29DA3E2AE3412CED432E</palette>
</flame>