SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Lounges / Maya Basics & Newbie Lounge / Set ramp color position as driven
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 21-06-2003, 10:49 PM   #1
spandy
Subscriber
 
Join Date: Jun 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Question Set ramp color position as driven

Hi there

I've made an eyeball with a pupil from a ramp texture. Then I've made a custom attribute "Pupil" inside my locator for the eyeball.

Now I want the pupil to crow as the pupil attribute changes. Inside the "Set Driven Key" dialog there is no "position" attribute for the ramp, so I added it inside the "Channel Control" of the ramp, named "colorEntryList[1].position", when I now got back to my "Set Driven Key" dialog I got a new attribute "Position" for the ramp, but when I try to set it as a key, I get the error message "Error: No object matches name ramp1.position".

Am I missing something? Please help me.

Spandy
spandy is offline   Reply With Quote
Old 22-06-2003, 05:29 PM   #2
Nem
Subscriber
 
Nem's Avatar
 
Join Date: May 2002
Location: Faringdon, UK
Posts: 1,480
Thanks: 0
Thanked 2 Times in 2 Posts
Default

ok, i dnt have a solution, but that is a very good idea!!

you shud link up the ramp position with light intensity, that wud be amazing
__________________
- Simon

My Website: www.Glass-Prison.com
Nem is offline   Reply With Quote
Old 23-06-2003, 12:37 AM   #3
Blinn
Registered User
 
Blinn's Avatar
 
Join Date: Sep 2002
Location: Nova Scotia
Posts: 290
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If I understand you correctly, (and i hope I do), you want basically want to be able to drive where color's position on the ramp will be?

to test I set up a 3 color circle ramp on a nurbs plane. The top color being white(colorEntryList[2]), and the bottom 2 black(colorEntryList[0] & [1]) . The I used the following expression to test it out.

ramp3.colorEntryList[2].position = nurbsPlane1.translateY (replace this with whatever)

as i moved my plane along the Y-axis, the circle grew and contracted, as a pupil would.

Hopefully this was what you meant!
__________________
________

- Jacob
Blinn is offline   Reply With Quote
Old 23-06-2003, 12:51 AM   #4
Blinn
Registered User
 
Blinn's Avatar
 
Join Date: Sep 2002
Location: Nova Scotia
Posts: 290
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just tryed it with light intensity, it was pretty cool.

ramp3.colorEntryList[2].position = 1-(ambientLightShape1.intensity)

that would need to be tweaked though
__________________
________

- Jacob
Blinn is offline   Reply With Quote
Old 23-06-2003, 05:31 PM   #5
BabyDuck
Subscriber
 
BabyDuck's Avatar
 
Join Date: Nov 2002
Location: USA
Posts: 1,170
Thanks: 3
Thanked 12 Times in 12 Posts
Default Re: Set ramp color position as driven

Quote:
Originally posted by spandy
Hi there

I've made an eyeball with a pupil from a ramp texture. Then I've made a custom attribute "Pupil" inside my locator for the eyeball.

Now I want the pupil to crow as the pupil attribute changes. Inside the "Set Driven Key" dialog there is no "position" attribute for the ramp, so I added it inside the "Channel Control" of the ramp, named "colorEntryList[1].position", when I now got back to my "Set Driven Key" dialog I got a new attribute "Position" for the ramp, but when I try to set it as a key, I get the error message "Error: No object matches name ramp1.position".

Am I missing something? Please help me.

Spandy
set driven key does not work for the "colorEntryList[1].position". the attribute "position" does not belong to the ramp either - it is only a virtual name for the selected position when you edit the ramp in attribute editor. if you want to use a sdk then there is a nasty little workaround for it:
  • create a new float attribute with the needed min and max values for the position of the the desired colorentrylist in ramp1
  • create a new expression with e.g.
    Code:
    ramp1.colorEntryList[1].position = ramp1.pupil_position;
    ramp1.colorEntryList[3].position = ramp1.pupil_position-0.02;
    this you even make as in the example to move 2 positions at once - for a smooth transition from iris to pupil that is always same thickness
  • create another attribute (e.g. in the material, not the ramp) form 0 to 1
  • create a sdk between the new attribute as driver and the ramp1.pupil_position as driven
hope that helps some
BabyDuck is offline   Reply With Quote
Old 24-06-2003, 01:24 PM   #6
spandy
Subscriber
 
Join Date: Jun 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your responses.

BabyDuck that was just what I needed.

Spandy
spandy is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.