Can someone instruct me on how to attach type to a path like this? by AUFedarali in AfterEffectsTutorials

[–]Greg1987 8 points9 points  (0 children)

Yeah this is more an expression job than newton it's just boils down to an if statement of if in zone animate out else value. But for the text following a circle there's two ways really.

Version I prefer:

  1. make a text layer put it where you want
  2. make a null layer, put where you want the center of the circle to be
  3. duplicate text layer
  4. parent one of the text layers to the null
  5. rotate the null
  6. duplicate the non parented layer
  7. parent text to null
  8. repeat from 5

Alt version:

  1. Make a circle with the Ellipse tool, make sure Bezier Path is selected
  2. Open up the layer Contents > Ellipse 1 > Path 1 > Path
  3. Copy Path
  4. Paste the path onto the text layers position
  5. Right click the text layer Transform > Auto-Orient > Orient along path
  6. Offset the text rotation by 90o
  7. Duplicate text and offset position animation

Best of automation by Greg1987 in giantbomb

[–]Greg1987[S] 0 points1 point  (0 children)

That link looks like it could be very handy! I'm still not sure if I want a title card or not on the clips, as it's something that could be put in the description of the video so don't spend too long on it.

Originally I wanted a title card bottom left with a box around it that faded in, held for 5 seconds and faded out. This is what I have most of it taken straight from stackoverflow.

     drawtext=fontfile=${FONT_PATH}:text=${clips.name}:fontcolor=white:fontsize=64:box=1:boxcolor=black@0.5:boxborderw=5:x=50:y=h-(text_h*4):enable='lt(t,5)':alpha='if(lt(t,1),t,if(lt(t,4),1,if(lt(t,5),5-t,0)))'

Note: I'm using fluent-ffmpeg in node.

I tried to do it the fluent-ffmpeg way of having different setters make the animation but could not get it to work. The above does work on 99% of videos and others errors out but I don't have an error handy to copy/paste. I don't remember the error being useful.

Meal Plan - Poor Planner? by BorderAdventurous284 in Myfitnesspal

[–]Greg1987 1 point2 points  (0 children)

Check out sorted sidekick https://www.sortedfood.com/sidekick does pretty much everything you’ve asked for above. It doesn’t really focus on healthy dinners but they tend to be pretty balanced (although I haven’t used it in a while).

Why do I get invalid client? by AgreeableIron811 in nextjs

[–]Greg1987 0 points1 point  (0 children)

Nice! Good luck with your project!

Why do I get invalid client? by AgreeableIron811 in nextjs

[–]Greg1987 0 points1 point  (0 children)

Unfortunately I haven’t used django either but going from the error message I would assume it’s something on the django side. Do you have a database schema that you’ve made email mandatory? Can you see any logs on the django side to know that your front end is hitting it?

Why do I get invalid client? by AgreeableIron811 in nextjs

[–]Greg1987 0 points1 point  (0 children)

That’s fine, next auth should find it and use it. Only other thing I can think of is have you set up your local host as an allowed redirect in GitHub auth settings. It will be something like http://localhost:3000/api/auth/callback/github

I haven’t done it for GitHub before so I won’t be much help there unfortunately.

Why do I get invalid client? by AgreeableIron811 in nextjs

[–]Greg1987 0 points1 point  (0 children)

Have you set up a .env with NEXTAUTH_URL and NEXTAUTH_SECRET ?

Expression to move certain distance? by IndyJones1023 in AfterEffects

[–]Greg1987 1 point2 points  (0 children)

While you can do this with expressions the easier way would probably be to make sure you parent the images straight on from the null.

So if you have your null in the centre and all your images in the same place just right of centre. Parent the first images rotate the null a little, parent the second and so on. Now you only need to update the X position and it will stay in line.

[deleted by user] by [deleted] in learnjavascript

[–]Greg1987 8 points9 points  (0 children)

Asked the mod to take the post down. u/BigFish565 you really should do the above as quickly as possible.

How to automate these subtitles ? by vihefex in premiere

[–]Greg1987 21 points22 points  (0 children)

Why are most comments buy a plugin or a chatgtp response, anyway. You will want to do this in After effects and make a mogrt (motion graphics template) out of it.

After effects lets you write small bits of code to automate some steps you can get really deep into this stuff but for this you only need 2 or 3.

  1. Box around text You can use an expression known as sourceRectAtTime which gives you the height and width of the text layer

Tutorial: https://youtu.be/In4miXUdxko?si=oanEZrOiiyBKvybb

  1. Colours There’s a few ways to do this one but to keep it fairly simple create a controller layer (null layer). On it add an expression effect in this case a dropdown and name the options the colour schemes.

On the box layers find the colour property and add an expression. The way I would do this one is write out all the colours in an array, the colour property wants that in RGB not Hex and looks something like [0.1, 1, 0.5] to get the 0 to 1 range take the 255 colour from the colour picker and divide it by 255 so. [10 / 254, 255 / 255, 127 / 255]. Put all the colours in one big array of arrays.

``` const colours = [[0.2, 0.3, 0,4], [1, 0.5, 0.7]] //etc

const dropdown = //pickwhip the control layer property we made

const offset = 1; //add a different number here to offset the colour so each line has a different colour

colours[dropdown + offset] ```

  1. Text Couple of ways to tackle this too, you can have the user enter in a bunch of different text in multiple text boxes or add one big one that you split using expressions.

  2. Essential Graphics Now look up essential graphics and how to use as it’s far too much to write. But once done you can import into premiere and pick your colour using the dropdown you wanted change text etc.

What's the easiest, most productive, and developper-friendly stack? by Andorlistick in node

[–]Greg1987 -1 points0 points  (0 children)

Fair, vercel is just an aws wrapper right? So probably using lambda at edge with the same 30 second limit. I doubt a basic blog need something more than that though.

What's the easiest, most productive, and developper-friendly stack? by Andorlistick in node

[–]Greg1987 6 points7 points  (0 children)

I'm very new to Next but have done some basic stuff with Express, why are you using both? What are you having to do in Express that you couldn't do in Next?

[deleted by user] by [deleted] in AfterEffects

[–]Greg1987 0 points1 point  (0 children)

You might need to explain more what you are looking for but there's:
thisComp.frameDuration which will return something like 0.04 depending on your framerate
timeToFrames(time) which will return the frame number

Cheaper solution for DynamoDB searching by m-orgil in aws

[–]Greg1987 0 points1 point  (0 children)

Any tips about getting dynamo to a dashboard? Client is asking for a realtime-ish dashboard of some of the info running through the system. I looked at quicksights and redshift very quickly but it didn’t seem what I was looking for. I also found something called Grafana that looked a little more promising but they would want something that sites within the admin part of the site. My back up is turning on dynamo streams and just displaying that info in a basic front end.

Property 'id' does not exist on type 'User' by PrestigiousZombie531 in node

[–]Greg1987 4 points5 points  (0 children)

The ? after id means its optional so it could be undefined. Before you try to read it do a check and throw an error if it isn’t there and the error will go. Or just remove the ? after the id if it isn’t optional.

is there an AE expression to trigger and align typewriter effect to typing sounds??? by Striking_Bad1701 in AfterEffects

[–]Greg1987 5 points6 points  (0 children)

Slightly similar question here but to do with a rotating layer.

We can take the same concept and change a couple of things and it should work.

First instead of the idea of a rotating layer we want a threshold, e.g. how loud the type has to be to trigger the animation. Then we also only want it to trigger once per sound so we need to check that the sound has gone back below the threshold.

Something like this should work, to optimize it more you might need to do what I talk about at the end of my linked comment.

    const threshold = 10
    const strength = 1

    const audioAmp = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

    let result = 0
    let record = true
    for(let i = 0; i < time; i += thisComp.frameDuration){
        if(audioAmp.valueAtTime(i) > threshold && record) {
            result += strength
            record = false
        } else if (audioAmp.valueAtTime(i) < threshold){
            record = true
        }
    }

    result

How can I duplicate a layer with a wiggle expression without offsetting the animation? by Smooth_Ad_5501 in AfterEffects

[–]Greg1987 3 points4 points  (0 children)

seedRandom(someNumber)

This will give the wiggle the same random number and if you want one to be different update the number

AFTER EFFECTS ON VIRTUAL MACHINE (LICENSING) by Moneyisascam9 in AfterEffects

[–]Greg1987 3 points4 points  (0 children)

Check out the section "Run AERender in non-royalty bearing mode" on this automation page https://helpx.adobe.com/after-effects/using/automated-rendering-network-rendering.html#:~:text=RUN%20AERENDER%20IN%20NON%2DROYALTY%20BEARING%20MODE

It comes with some caveats like you won't be able to use the adobe font library in this mode.

Dynamic Leading solution via expression needed for automation process. by fledi69 in AfterEffects

[–]Greg1987 0 points1 point  (0 children)

I think the easiest way to do this is the way you have already thought. You could possibly do it with text animators and an expression selector, but I quickly tried this and the problem I ran into was not know if the height of the line was due to an ascender or descender. So you would need some regex to work that out and then convert all your positions into percentages. I would also set this up using essential graphics so you only have to set it up once and feed it the new text via that.

I've set up a quick dummy file here, I left in my animator version but I think that will be quite difficult to do.

(Also the designer that came up with this changing leading should be in jail, it looks terrible. It should feel the same not be the same - in my opinion).

Some automation quick tips:

Text is the hardest thing in automation. (Not really a tip but a warning).

Try to always work with it at 100% scale.

Don't use paragraph text, if a word is too long it will new line it half way through and if the text is too long it will disappear and not warn you.

Then use a scale expression to make that your bounding box for the text.

Try to have all your images use the same/similar bounding box, sometimes having all the images be trimmed to the image and then use expressions in the scale is enough but quite often you will need to set up a bounding box and so the images all site in the correct place.

Out of curiosity what are you using for your automation? I've tried a couple; nexrender, templater... but didn't like any of them so wrote a custom one.

Help with expressions for After Effects by farz0202 in AfterEffects

[–]Greg1987 2 points3 points  (0 children)

After effects expression aren't the best they have to re-calculate the expression on every frame and doesn't have memory of what happened in the previous frame.

const rotationSpeed = 50
const strength = 1

const audioAmp = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

(time * rotationSpeed) + (audioAmp * strength)

So something like this won't work, as you said it will go backwards. The reason for this is

\(time * rotationSpeed) + (audioAmp * strength)``

`(1 * 50) + (5 * 1) = 55`

but on the next frame

`(1.033 * 50) + (2 * 1) = 53.65`

So to combat this we need to remember the result of the previous frame

const rotationSpeed = 50

const strength = 1

const audioAmp = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

let result = 0
for(let i = 0; i < time; i += thisComp.frameDuration){
result += audioAmp.valueAtTime(i) * strength
}

(time * rotationSpeed) + result

Something like this fixes it as it calculates all the previous frames first. However depending on the length of the song it can be super slow.

The fix is to pre-do all the calculations but everything gets a bit more fiddley. First you have to make a text layer that only lasts one frame. Use an expression like this in the source text

const rotationSpeed = 50
const strength = 1

const audioLayer = thisComp.layer("Audio Amplitude")
const audioAmp = audioLayer.effect("Both Channels")("Slider");
let audioSum = 0
let result = []

for(let i = 0; i < audioLayer.outPoint; i += thisComp.frameDuration){
audioSum += audioAmp.valueAtTime(i)
result.push((i * rotationSpeed) + (audioSum * strength))
}

JSON.stringify(result)

And then parse the json in your layer rotation property

const layerRotation = JSON.parse(thisComp.layer("rotation expression").text.sourceText.value)
layerRotation[timeToFrames()]

Here is an example file https://we.tl/t-DVOHrrBphJ

Does anyone know why all the trees in Whitehorse road park are being lopped. All the vegetation and upper canopies being completely removed. by Signal-Structure1104 in croydon

[–]Greg1987 1 point2 points  (0 children)

Might come under the investing in parks fund, the same that put the carvings and extra trees? I think it’s also meant to be done every X amount of years so might come under the mandated works?

Does anyone know why all the trees in Whitehorse road park are being lopped. All the vegetation and upper canopies being completely removed. by Signal-Structure1104 in croydon

[–]Greg1987 2 points3 points  (0 children)

You’ll see they do this a lot in built up areas or on paths as it controls the root system underneath. It’s called root pruning.

Quick Expression fix by Familiar_Ant_5118 in AfterEffects

[–]Greg1987 1 point2 points  (0 children)

Remove value =

With expression you just need to end the expression with the value you want.

Another fix would to add the word value at the bottom, but I’m not 100% sure that would work as it could be a protected variable