Anim8or Community

General Category => ASL Scripts => Topic started by: magicsiwu on July 30, 2018, 04:54:36 am

Title: change object color in scene
Post by: magicsiwu on July 30, 2018, 04:54:36 am
Is it possible to change object color in scene editor?

I am going to do something like chameleon.
I'v been search a solution for long time.

Thansk
Title: Re: change object color in scene
Post by: AlecJames on July 30, 2018, 10:19:20 am
I can think of 2 solutions:

(1)  2 objects, one red one green, switch objects using the visibility keys.  It's an abrupt change but if you are compiling your video in a post processing editor, add 12 frames either side of the switch and use a cross fade transition.

(2) Raxx's animated textures using controller scripts http://www.anim8or.com/smf/index.php/topic,5333.0.html (http://www.anim8or.com/smf/index.php/topic,5333.0.html) will let you do it all in anim8or.  You will need a uv map of your object for each frame of the transition.

I would use 1 for speed.  I would use 2 if I wanted to do something a bit more clever in the transition - i.e. more than a cross fade, flickering, sweep from head to toe, etc.

You could extend (1) by using 12+ objects over 12+ frames - a bit fiddly but doable.

Title: Re: change object color in scene
Post by: magicsiwu on July 30, 2018, 10:35:02 am
Thanks anyway
But these two solutions are not exactly what I need.

If I try to make an object turns to transparency by time,
these method can't do it.
Title: Re: change object color in scene
Post by: AlecJames on July 30, 2018, 11:07:33 am
Like this?

Title: Re: change object color in scene
Post by: davdud101 on July 30, 2018, 12:26:25 pm
Could render twice with the two colours and fade between the clips, or use a bright green for example and do some basic color keying in a special effects software to make it happen
Title: Re: change object color in scene
Post by: magicsiwu on July 30, 2018, 01:14:30 pm
Hi AlecJames

yeah, it is what I need.
I believe it must be a hard work for you.
You use 10 objects to achieve the effect.

So, are you telling me it is not possible to change material property by single object and single material?

I will consider your method.

Thanks.
Title: Re: change object color in scene
Post by: AlecJames on July 30, 2018, 04:21:04 pm
If you use Raxx's script that I linked and you animate the transparency texture, you can do it.  But I would use the 10 objects approach unless you want some clever effect that the script will allow. 
Raxx's script can take some fiddling to get it setup right, try the tutorials, once you get it working its quite straight forward but you need to understand how it works so you can fix it when it doesn't.

It doesn't take so long.
Get tea.
Copy and paste the 10 objects and adjust the transparency of each one.
Add them to the scene and for the first one add visibility keys for each of 10 frames.
Edit the animator.an8 file to increase keys to 20,  duplicate the keys for all 10 objects and adjust the visibility keys for the animation.  (fade out / fade in)
Back in anim8or copy and paste the fade out/ in keys to make the completed scene.
Check tea hasn't gone cold.

But you could lose you project if you make a mistake so do it in a test project, then when you know it's correct import the scene into your live project. back it up first of course :)
Title: Re: change object color in scene
Post by: magicsiwu on July 31, 2018, 01:49:56 am
Hi Alecjames

I am studying Raxx's script.
Thanks for your help