Forum Replies Created

Page 23 of 29
  • Declan Smith

    February 19, 2012 at 9:27 pm in reply to: Creating a Thick Liquid Look

    You could try adding the roughen edges filter, cranking up the border and keyframing the evolution. In addition, to give the edge a little more depth, try bevel alpha and cranking up the edge thickness, also experiment with the blending modes.

    Declan Smith
    https://www.madpanic.tv
    After Effects CS5.5/ FCS3 / Canon 7D / Canon XL2 / Reason / Cubase

  • Declan Smith

    February 18, 2012 at 12:18 am in reply to: Why doesn’t the AE Numbers plug-in have commas???

    Hi

    You would put the currency symbol before the expression. I have shown this below, and shown it more verbosely in the second example.


    "$" + (effect("Slider Control")("Slider").value.toFixed(0)).replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");

    In the fragment below, number is a variable that takes the numeric value from the slider. The other variable names should be self explanatory and are all strings.
    The last line shows how they are concatenated together.


    number = effect("Slider Control")("Slider").value;
    numberFormatted = number.toFixed(0);
    numberFormattedAsStringWithCommas = (numberFormatted + '').replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");
    prefix="$";

    prefix + numberFormattedAsStringWithCommas;

    Declan Smith
    https://www.madpanic.tv
    After Effects CS5.5/ FCS3 / Canon 7D / Canon XL2 / Reason / Cubase

  • Declan Smith

    February 17, 2012 at 9:55 pm in reply to: Why doesn’t the AE Numbers plug-in have commas???


    (effect("Slider Control")("Slider").value.toFixed(0)+" Miles").replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");

    Last attempt above to get the cow to insert backslashes. Everytime you see a d above put a backslash before it if backslashes are not being displayed.

    It should look like this:

    Declan Smith
    https://www.madpanic.tv
    After Effects CS5.5/ FCS3 / Canon 7D / Canon XL2 / Reason / Cubase

  • Declan Smith

    February 17, 2012 at 9:42 pm in reply to: Why doesn’t the AE Numbers plug-in have commas???

    Nick

    I will put this in a code section as I think the COW has been stripping bits off, but the basic answer to your question is that javascript is lacking in number format area and you have to write your own function for it. I have got your expression down to a one liner for you. If you want to do the same format to another number, first make sure your number is a string, then add from the .replace part as below: I have cut & pasted and tested this so it should work for you


    (effect("Slider Control")("Slider").value.toFixed(0)+" Miles").replace(/(d)(?=(d{3})+(?!d))/g, "$1,");

    Declan Smith
    https://www.madpanic.tv
    FCS3 / After Effects CS5 / Combustion / Canon 7D / Canon XL2

  • Declan Smith

    February 17, 2012 at 9:32 pm in reply to: percentage counter problem…

    Nick

    Here it all is as a one liner


    (effect("Slider Control")("Slider").value.toFixed(0)+" Miles").replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");

    Enjoy!

    Declan Smith
    https://www.madpanic.tv
    FCS3 / After Effects CS5 / Combustion / Canon 7D / Canon XL2

  • Declan Smith

    February 17, 2012 at 9:08 pm in reply to: percentage counter problem…

    Hi Nick

    You would have your expression something like below. The first line grabs the value from the slider in the format you want it, with the text suffix of “Miles”. Then the regular expression does the work of searching groups of three numbers. The very last line returns the final formatted value.

    str=effect(“Slider Control”)(“Slider”).value.toFixed(0)+”Miles”;

    regEx = new RegExp(‘(.*[0-9]+)([0-9]{3})’);
    while(regEx.test(str)) {
                             str = str.replace(regEx, ‘$1,$2’);
    }
    str

    Declan Smith
    https://www.madpanic.tv
    FCS3 / After Effects CS5 / Combustion / Canon 7D / Canon XL2

  • Declan Smith

    February 17, 2012 at 8:34 pm in reply to: percentage counter problem…

    More efficient way of adding in commas:

    str=”1232224.2″;
    regEx = new RegExp(‘(-?[0-9]+)([0-9]{3})’);
    while(regEx.test(str)) {
                             str = str.replace(regEx, ‘$1,$2’);
    }
    str;

    Declan Smith
    https://www.madpanic.tv
    FCS3 / After Effects CS5 / Combustion / Canon 7D / Canon XL2

  • Declan Smith

    February 17, 2012 at 8:18 pm in reply to: percentage counter problem…

    You could use something like what is described here:
    https://www.mredkj.com/javascript/numberFormat.html

    i.e., in your source text, assuming that the number value is in a variable called nStr:

    This basically runs over the number and inserts the commas for every three digits, then adds anything after the decimal point if it were supplied.

    nStr += ”;
    x = nStr.split(‘.’);
    x1 = x[0];
    x2 = x.length > 1 ? ‘.’ + x[1] : ”;
    var rgx = /(d+)(d{3})/;
    while (rgx.test(x1)) {
    x1 = x1.replace(rgx, ‘$1’ + ‘,’ + ‘$2’);
    }
    x1+x2

    Given that nStr is 100000 result would be 100,000
    nStr=1234.56 result=1,234.56
    nStr=100000000 result=100,000,000

    etc etc

    Declan Smith
    https://www.madpanic.tv
    FCS3 / After Effects CS5 / Combustion / Canon 7D / Canon XL2

  • Declan Smith

    February 16, 2012 at 12:39 am in reply to: percentage counter problem…

    I think I know what you mean, when the numbers change each character slightly shifts either left or right ?

    It looks like it is the kerning. I changed the kerning from metrics to 0 for the “American Type” font (which had the wobbling) and this appears to have fixed it. Worth trying. I set the kerning for each character position separately. I set the static text as 100%, selected all the text and changed the kerning to 0.

    Declan Smith
    https://www.madpanic.tv
    FCS3 / After Effects CS5 / Combustion / Canon 7D / Canon XL2

  • Declan Smith

    February 15, 2012 at 11:47 pm in reply to: Sky Replacement

    I downloaded your clip and managed to replace the sky with quite good results by masking the lower cloud layer and feathering it 363 pixels (image below shows he mask line), then using multiply as the transfer mode on the video footage. You will need to separate the golfers arm and rotoscope the golf club for the few frames it is in. I literally spent about 4 minutes on the clip below so obviously it would look better with a bit more tweeking and attention to luma balance between the foreground and background. I was more concerned with the leaves / edges, which are passable with this method.

    Declan Smith
    https://www.madpanic.tv
    FCS3 / After Effects CS5 / Combustion / Canon 7D / Canon XL2

Page 23 of 29

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy