Giter VIP home page Giter VIP logo

Comments (7)

inlife avatar inlife commented on May 14, 2024 1

According to Adobe's limitations Expressions can be used to control very particular amount of object properties. So if you want to make complex controls of your scenes/layers/etc. you should use only AE Scripting.

However, AE Scripting requires you to open After Effects application to operate. It simply runs inside AE Application environment.

Unlike AE scripting, Expression scripting allows you to describe simple object property behaviors beforehand, and they will be executed at render runtime, without opening AE Instance.


Each male/female scene is a separate layer.

For your task, i'd used different compositions, one for male, other for female.
When you are describing a project, you can set a composition which will be rendered this time.

You can put all needed images (might be a person photo) as asset, which will be renamed to a particular name (photo.jpg). This way you can achieve dynamic image changing for each rendered video (i call this tehnique asset substitution). And you can give all needed information such as person name, age, etc in, for example, darthvader.js script asset file, which will can be used as i've described in previous post.

The darthvader.js file might look like this:

var person = {
    name: "Darth Vader",
    occupation: "Manager at DeathStar Co."
    age: 45
};

And using it inside your male composition at text filed "name":

$.evalFile("/Users/myuser/Projects/myrpoject/data.js"); person.name

Note: it's important to understand and remember about renaming of assets. In this case darthvader.js > data.js


And project file might look like this:

{
    template: 'template.aepx',
    composition: 'male',
    settings: {
        outputModule: 'h264',
        outputExt: 'mp4',
        startFrame: 0,
        endFrame: 542
    },
    assets: [
        {
            type: 'project',
            src: 'http://localhost:3000/projects/HUMANS.aepx',
            name: 'template.aepx'
        }, {
            type: 'image',
            src: 'http://localhost:3000/images/DARTH_VADER_FACE_PROFILE.jpg',
            name: 'face.jpg'
        }, {
            type: 'image',
            src: 'http://localhost:3000/images/DARTH_VADER_DEATHSTAR_BACKGROUND.jpg',
            name: 'background.jpg',
            filters: [{
                name: 'cover',
                params: [1920, 1080]
            }],
        }, {
            type: 'audio',
            src: 'http://localhost:3000/music/IMPERIAL_MARCH.mp3',
            name: 'track.mp3'
        }, {
            type: 'script',
            src: 'http://localhost:3000/projects/darhvader.js',
            name: 'data.js'
        }
    ]
}

from nexrender.

iadj avatar iadj commented on May 14, 2024 1

@southernsun @inlife Thanks so much, works instantly! It's a pretty confusing concept from After Effects haha. Noticed this is explained in the Wiki too, thanks again!

from nexrender.

inlife avatar inlife commented on May 14, 2024

Well, it's quite simple. Result is achieved by using AE Expressions.

Firstly, you need to create a script (data source) which will be included at render process. This script must be attached as asset, and will downloaded along with rest of your project asset files.

In project it might look something like that:

image

Hope that helps. :)

from nexrender.

kolyadin avatar kolyadin commented on May 14, 2024

Thank you!
You know, i am practicing in AE scripting (adobe extend tool script) and i see that some functional which is possible via scripts does not work via expressions.

Imagine situation, when we want to create personal video with scene for male or for female.
Each male/female scene is a separate layer.
So, i need an expression where i will find certain layer and remove it.
But when i remove a layer via expression i've got an error "remove method not find" or something like that.

Can you explain how to remove/add layers via nexrender and expressions or how you can handle such task?

Also very interested in nexrender+expressions restrictions.
Thanks again.

from nexrender.

iadj avatar iadj commented on May 14, 2024

@inlife I'm trying to use $.evalFile("data.js") but it doesn't accept it as a path.

It only appears to work when I define a full path i.e. C:\Project\data.js.

I think I need to call the data.js file from the working (temp) directory in order to use the downloaded data.js file in the render node. How do I achieve this, or am I overlooking something?

from nexrender.

southernsun avatar southernsun commented on May 14, 2024

just define the full path to the file on your disk, then specify it as an assest for download. Nexrender has a module to rename the paths to the temp assets directory. For this you need to provide the aepx (xml file) as input for the project so it can rewrite the directories.

from nexrender.

inlife avatar inlife commented on May 14, 2024

hey @iadj
the problem is that adobe after effects accepts only absolute paths !

so, to solve this problem there is a so called "patching" process
it will try to find all absolute paths in expressions and replace them to paths pointing to the file in the temp directory
works only for aepx templates (xml saved)

from nexrender.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.