Home Technical Talk

Using an image to control animation in max SOLVED

Manic
polycounter lvl 18
Offline / Send Message
Manic polycounter lvl 18
EDIT: I actually managed it on my own! w00t!

basically i spent today tinkering with max script and now have a working app. I'm uploading it here for people to have a play with.

Here's how it works:

First you need a very tall image, 160pixels wide, and as many pixels tall as you have frames. for me, this was 4550.

I made my spectrograph with winamp using the AVS studio (i've included the preset in the zip), i'm sure there's better ways though.

The script then runs through each row, divides up the pixels into groups and assigns the averaged value to an ellipse in the scene per frame.

Once in the scene you can use the ellipses as wire controllers for anything else you want.

Grab the zip here;

http://www.graphicfilth.com/spectro.zip

You can have between 8 and 24 EQ bands, although i've only tested it with 16. There's very little error checking, so don't try to hard to break it, also it takes ages to process, I'm not a great coder, but i don't think it can go any faster.


Give it a try and let me know what you think!

Manic






I was wondering if anyone knew if it was possible to use an image's RGB values to define an object's properties, scale for example.

Basically, what I've got is a spectrograph of some music that I've been asked to make a video for. It's essentially a very long image that reads from left to right over time, where the top pixels represent the bass notes and the lower ones represent high notes, I'd like to be able to use it to define some motion in the animation, so that the visuals really do represent what the music is doing.

Is this possible within max, or would it be something that would have to be done in maxscript?

Cheers for any input

Manic

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    Thanks for sharing this. Don't have a need for it right now, but saved it in case I do. Will let you know if I use it.
  • sevenfingers
    Options
    Offline / Send Message
    sevenfingers polycounter lvl 18
    Wouldn't it be easier to control with the sound controller?
    For instance, you could EQ out the stuff you don't want, and render a wave, rince and repeat.
  • Manic
    Options
    Offline / Send Message
    Manic polycounter lvl 18
    yeah, it possibly would have, but I only found out about the sound controller in Max 2 days ago... one of those "oh... well... never mind" moments.

    Also, I reckon this way is probably quicker than creating individual waveforms, as if you change your mind about how many channels you want you can just rerun the script. I admit making the spectroscope is a bit time consuming though.
Sign In or Register to comment.