Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 16-05-2012 , 03:49 PM
Registered User
Join Date: Apr 2012
Posts: 6

I want a flickering light

Hi guys,

I'm new to maya's expressions and I really don't understand scripting much at all generally.

I've been searching online for an expression to control the intensity of my point light and I found several.

I created a new expression on the intensity and copied the coding into the expression editor. I always get some kind of error telling me an 'attribute is not found or variable missing'.

Pointlight1.intensity=linstep(-1,1,noise(time))*0.2+1.5;

That is one script I inputed.... It uses noise as the randomness.... At least it's supposed to but fails to work in this instance... I don't get it!

What should I be typing that will work please!?

Oh, and if you have some suggestions, please don't assume I know to replace certain text or numbers with my own values because to some of us, it really isn't that obvious! user added image

Ps - my point light intensity is 2000 using quadratic interpretation.


Thanks!

Luke.

# 2 16-05-2012 , 04:05 PM
daverave's Avatar
The thin red line
Join Date: Aug 2009
Location: England
Posts: 4,472
Im no lighting expert but I think you should have your light intensity set to 100.............dave




Avatar Challenge Winner 2010
# 3 16-05-2012 , 07:54 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Do you have an object called Pointlight1? (It's case-sensitive)


Imagination is more important than knowledge.
# 4 17-05-2012 , 12:05 AM
Registered User
Join Date: Apr 2012
Posts: 6
Dave - the large overly scaled scene imported from Cinema 4D is he reason for the light value.

Yes I had checked case sensitivity.


Guys, is that expression even right? I'd like to know what exactly I should be typing please.

Thanks,

# 5 17-05-2012 , 02:54 AM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
We'd like the help you out, but you aren't giving us much information. We need to know what the names are of your lights. Post a screen shot of the outliner, or even the file, and we'll take a look. If you send us the file, make sure you save it as a .ma file.


Imagination is more important than knowledge.
# 6 17-05-2012 , 09:10 AM
honestdom's Avatar
The Nurb Herd
Join Date: Oct 2007
Location: London
Posts: 2,381
seems all pretty demanding to me...

i'd probably do this in 2d. can't you use keyframes? what kind of flicker do you need?

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads