View Full Version : connecting ramp colors of shader to SDK?
JasonA 08-14-2003, 08:48 PM hi folks,
I'm trying to figure out a way of connecting the colors of a ramp texture in the color channel to a SDK. But I can't seem to getthe connected. Is this possible?
I can get the ColorRGB channels into the driven windows of SDK, but I cannot key them if a ramp is in the color channel. (well, I can hit the button, but its not keyed)
|
|
loked
08-14-2003, 09:26 PM
I dont know if this will work, its just a suggestion;
Try adding custom attributes to something in your scene, be it a locator and then make a connection via the connection editor from the ramps colors to the attributes. Then use set driven keys on the attributes. I'm not really sure exactly what it is you're trying to do and I havent tried what I'm suggesting, so forgive me if it doesnt work:blush:
later:wavey:
loked
JasonA
08-14-2003, 09:39 PM
I appreciate the thoughts, but that didn't work I'm afraid. bascially I can't get the properties of the ramp shader into the connection editor. Thanks tho.
It seems like the basic challenge is how to get the ramp1.outcolor into the list of keyable attributes in the SDK dialog box. I say this, because you can animate the color R,G, and B (its a listed attribute in the SDK dialog) and get the effect of one solid color changing into another, but keying those when a ramp is in the color slot has no effect.
Anyone else have any thoughts on how to tackle this?
andrewjohn81
09-03-2003, 02:33 AM
I was just trying to do the a similar thing and figured it out based on what Loked said.
Create new attributes to the ramp that you created.
Now bring up the connection editor,
Load the ramp in both columns
In the left column select the new attribute you create
In the right column select the colorEntryList[x].position that you want to use as SDK.
Note: you need to think ahead when creating the added attributes. If this is used for an eye, say, then you should note the position of the black iris for the center. Use that number for the default position. You can estimate the min and max number remembering they should be between 0 and 1.
Once the attributes are properly attatched to the new attributes you will notice that the new attributes are keyable. Now you can make whatever controllers you want and use set driven key to control the desired motion.
Note that the colorEntryList position number seems to be in no particular number. If you remember the order you created each color, they should match. Sorry, that is a pain.
You can also use the Outliner to see the position numbers. The advantage to this is you won't accidentally move the position from where it was desired to be. You have to turn off the option that says view only DAG objects and turn on the attributes function. Now when you click on the ramp's plus sign you can see the attributes. Don't get excited though, they aren't keyable. You still have to connect them to something.
Instead of adding attributes to the ramp, if you didn't want to do things twice, you can just add the attributes to the object you were going to use SDK with. But if you are like me, then you will use SDK so that the default number can be easily remembered like 1 or I prefer 0.
Good luck. I hope it helped.
dmcgrath
09-03-2003, 07:03 AM
You should be able to see the colors of the ramp in the channel box and all you should have to do is right click on it and roll down to set driven key. It should automatically start the SDK UI and put it in the Driven area. Then select your control object and put it in the Driven area. (I could be wrong about the channel box, you might have to select the ramp contorl through the Attribut Editor.)
Hope that works. It sounds like andrewjohn81's reply is workable also.
andrewjohn81
09-03-2003, 05:48 PM
Unfortunately when you try the methd of right clicking on the color position the SDK does pop up, BUT you will notice that it gives you an error that the XXX.position node is not found. It loads the ramp in the driven slot, but with no attributes for the color.position node.
That would have been a great and obvious solution. Hopefully Alias will create an easier solution for doing this in the future.
magilla
09-04-2003, 03:06 AM
I was looking at this the other day and wondering why you'd ever use it - it was in a mel thing called "kollectiv stroika", and it used shaders to drive blendshapes - not quite the same thing but I'm sure the principles were the same.
Unfortunately I don't know where it came from, let me know if you are desperate and can't find it and I'll track it down.
--magilla
CGTalk Moderation
01-15-2006, 09:00 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.