PDA

View Full Version : Image controlled Parameters


JokerMartini
02-22-2012, 01:09 PM
http://forums.cgsociety.org/attachment.php?attachmentid=166636&stc=1

I came across this video on youtube.

http://www.youtube.com/watch?v=em1jZtc7dz0&feature=endscreen

It seems like a very cool and intuitive way to animate properties of objects. My question is where in max can you tie images to properties like that? How would that be possible through maxscript. I couldn't imagine hime doing a calculation through a getPixel method on every frame, that would just destroy max. Especially if you end up doing multiple maps. Does anyone have any ideas on methods or ways to possible do something like this?
I'd love to get some pointers on this. It is a very cool idea.

Thanks

lo
02-22-2012, 03:13 PM
I couldn't imagine hime doing a calculation through a getPixel method on every frame, that would just destroy max. Especially if you end up doing multiple maps. Does anyone have any ideas on methods or ways to possible do something like this?


I don't think it would be too slow, you're not iterating over every pixel, just one pixel per object. And if you're updating 10000 scripted controllers, the getPixel part should be the least of your concerns.

JokerMartini
02-22-2012, 03:18 PM
Would it be best to just grab the 1 pixel in the center of one polygon per object then?

PEN
02-22-2012, 05:56 PM
I think that you might want to do it one of two ways. First off is just a baking process where there is nothing real time. Second would be to make it real time by running a setup script first that would collect the data about where the object is on the map and what pixel it needs to follow so that search is out of the way. Then just using getPixel at each frame. Depending on the number of objects it might work quite well. I think that it would be more about what math you want to do with the data.

That was really cool to see, some interesting math going on there and it would just be fun to setup and learn just for the hell of it.

JokerMartini
02-22-2012, 06:23 PM
Alright well I really appreciate the direction and help Paul as well as Lo. If you guys are interested in this I'll just make sure to post my progress here on this post and we can all see where we can get with this tool. It seems like it would be a lot of fun to mess with.

3ak
02-22-2012, 06:25 PM
this is what particles should used for.

JokerMartini
02-22-2012, 06:25 PM
The first step is figuring out a way to get the average RBG value for an objects diffuse bitmap texture, assuming that for this tool we just make it mandatory that the object has to have a standard material aapplied to it. Maybe down the road making a CA which would have the bitmap stored in there so the user doesn't have to mess with making a standard material then.

Although it would be ideal to figure out a way to get the RGB of a procedural texture. I'll look into it.

lo
02-22-2012, 06:32 PM
this is what particles should used for.

Quoted for agreement.

3ak
02-22-2012, 06:35 PM
i'd better define imaginary plane with matrix3 and height and width.
find x,y for every object in that plane coords
load bitmaps in memory (as bitmap class or as arrays - don't know what is quicker).
change whatever parameter you want with sampling this bitmaps.
you can take color value as absolute change or as velocity of change of this parameter.

something like this.

CGTalk Moderation
02-22-2012, 06:35 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.