PDA

View Full Version : Control Color of object by moving bone


Tricky4D
06-05-2003, 03:04 PM
Hi all, I'm having a real problem with this and can't find any tutorials on it anywhere.

I'm trying to change the colour of an object(cylinder in this case) from white to blue via rotating the bone thats inside of the object.

This is not an animated set, it's more dynamic, so when you move the bone the objects colour changes in real time with no frames being moved.

I've tried using Link With, with Rot Z being the driver and the incandesence Red being the driven, but I'm doing something wrong.

If you have any ideas / solutions, I'd be very very greatful

Cheers

ThE_JacO
06-05-2003, 03:56 PM
Incandescence is only shown at rendertime.
color divots are present and usable for parameters but they won't show in the material PPG where you only see one divot (for sake of simplicty during more common GUI tasks), but they are nonthless accessible from the explorer when you pt visibility to "show all parameters".

anyway, if what you need is having a reference object to present you with some sort of visual feedback on a bone's rotation give a shot to this scene.

www.thejaco.com/tempstuff/bone2color.scn

it's not the most elegant way (SCOPs would better fit the bill and would give more options) but it works and will hopefully get you on the right track.

It's just 3 expressions on the RGB of the constant material.

enjoy.

Tricky4D
06-05-2003, 04:34 PM
Great.... thanks for such a quick reply.

I've looked at the scn file you gave me. Interesting. I might do the job, I'm hoping.

Is there another way of doing this like in Maya using the Set Driven Key feature, do you know??

If not then I'll keep plugin away, using the concept u gave me.

Thanks.

ThE_JacO
06-05-2003, 04:42 PM
yes, all set driven key does is estabilishing expression-like relationships in your place.
I didn't really understand at what point you were encountering issues in your workflow (bear with me, english is not my 1st language) but I suspect you were trying to use the materialPPG unified divot. That divot is of no use to you in this case, you should have set the links calling the driven keys from the explorer's subset of parameters located under object.material.color.colorofchoice.

Is that correct ?
was the issue something else and I missed it ?

Tricky4D
06-05-2003, 05:41 PM
Thanks again for replying...
Your english is pretty good, so don't worry there.

Anyway... I've been expreimenting with what u gave me, and so far pretty good.

Just got one problem though. I've been trying to use a shader other then constant. Is there any way of using Lambert or blinn, as I need to see a shaded representation within the viewport when animating..

Again, I hope you can help and thanks for your earlier replies.

By the way, I'm no XSI expert as u probably have guessed so all help is welcomed.

So what does SCOP mean?
and when u say 'divot' do you mean the radio buttons at the side of each parameter..

ThE_JacO
06-05-2003, 05:56 PM
Originally posted by Tricky4D
Just got one problem though. I've been trying to use a shader other then constant. Is there any way of using Lambert or blinn, as I need to see a shaded representation within the viewport when animating..


the procedure is always the same, but instead of a unique color you'll have to control both the ambience and the diffuse.
you do what I did with the ambient and then drag the divot on the left of ambience over the divot on the left of diffuse.
this will create another expression for you to force diffuse == ambience


So what does SCOP mean?


SCOP is for SCripted OPerator.
unlike normal scripts it's bound to an object (like an expression) but allows for a full range of operations like scripting would, and adds the convenience of having input and output functions etc.
this is more about digging into scripts and operators tho then into simple expressions.

and when u say 'divot' do you mean the radio buttons at the side of each parameter..

yes, those thingie there are the divots.
they aren't simple radio buttons tho. they provide both a visual feedback
flat green = no animation
RedCurve = Kframe
GreenCurve = animation between keys
YellowCurve = animation that has been changed and not Keyed
= sign = equality expression
C = constant value
Blue arrow = parameter overridden
Arrow = parameter controlled by an expression
framed S = Driven by a SCOP
and so on for clips, constrains etc.

and also a quick way to key (clicking them will add a keyframe or remove it if it's present) and to access with a right click the most common animation needs (edit Fcurve, edit expression, SCOP etc. )

Tricky4D
06-05-2003, 08:08 PM
ThE_JacO.

Thanks a lot for the reply..

All the info you have given me has worked a treat. It's working just how I want it now.

Thanks very much for everything, I really appreciate it.

Tricky4D :beer: :thumbsup:

ThE_JacO
06-05-2003, 08:29 PM
anytime.

If you are developing any custom workflow that you think could be interesting for other ppl as well keep the thread alive and let it evolve :)

btw one last go.
if you need visual feedback in the viewports, but want a different render, remember that realtime shaders and MRay surfacing have different inputs; the former will only show in viewports set to RTShaders, the latter properly rendering without being influenced by your own customized visual cues.

I recently tend to do this a lot, it can do miracles for accelerating scene understanding at a glance.

CGTalk Moderation
01-15-2006, 08:00 AM
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.