View Full Version : Wire parameters for materials
02-18-2005, 10:40 AM
I have a little problem here.
I'm trying to wire the value of a slider to the color or the brightnes-level of a material (diffuse-color)...
I need this, because I'm trying to create a scene-environment, where I can control the day-&night-time by pulling the slider.
when I'm trying to wire those parameters, I get an error-message ("unable to convert: 0.0 to type: Point 3") and the color of the diffuse-slot becomes black.
I'm not very familar with expressions and max-script but there hast to be a way to solve this, or am I wrong?
I'll be thankful for any answer.
Thanks in advance
02-18-2005, 11:35 AM
you are trying to wire a float value to a point3 value - this wont work - you need to convert the value to the accepted type =
02-18-2005, 11:45 AM
And were I have to put this into?
Into the "Expressions"-Area in the Wire-Paramters-Dialog?
02-19-2005, 08:08 AM
This info from scriptspot.com...by Mr.Bobo
"We use a Point3 value in the form [X,Y,Z] to specify 3D coordinates...."
I believe you have to write the numbers in the proper syntax.
I know veeery little about scripting...still it's a start.
-why it's called point3 i don't know..if it had been called 3d coordinates it would sure make things simple eh?
I wish i could help but i am in the same position trying to learn a little scripting..argh.
02-19-2005, 12:29 PM
here is an example -
say you want to wire the materials diffuse colour off an object to the objects Z_Position -
rightclick the object - go to wire parameters in the quad menu - select -transform - position - Z_position from the menu - now select that object again and select (Material name) - diffuse colour.
the parameter wire dialog pops up
on the left you should have a the objects positon z highlighted, on the right you should have the materials diffuse colour hightlighted. on the right the expression reads "Z_Position"
change this to something like "[(Z_Position/100),(Z_Position/100),(Z_Position/100)]" and select the --> button and hit connect. now when you move the object up (assuming it's position started at [0,0,0]) the colour of the diffuse will change
02-19-2005, 03:25 PM
marktsang:I don't have max on this computer at the moment and i was just curious to know if
the diffuse value is able to step from 0.0 to 0.1,.. 0.2,.. 0.3...etc. when it is wired up?
02-21-2005, 01:08 AM
okay got it.. set up a slider with these parameters..
..then wire up these setting on the slider ..
slider settings wired (http://img110.exs.cx/my.php?loc=img110&image=screenhunter0021fw.jpg)
(ignore all the markings for now they just show the relationship of all the stuff)...
now wire up these settings on the sphere...
sphere diffuse wiring (http://img213.exs.cx/my.php?loc=img213&image=screenhunter0036jb.jpg)
note..the value of the slider maximim is set to 1.0 -for some reason it sees the diffuse slot
not as ..100 units but... as 1.0 unit total,so when you move the slider it changes through
0.1 on the slider and the diffuse slot will move to 1.0 .
-hope this helps. :)
ps..the pics are clear but you may have to view them up- sized in your browser..
02-21-2005, 08:41 AM
well, looks interesting...
I'll try it today and come back to you, if I have any result.
02-21-2005, 08:55 AM
thank you very much cloeops!
it works perfectly :) I think now it will be much esier to create a day/night enviroment... I hate do animate the light and the materials seperatly ... now I think I didn't have to anymore :)
02-21-2005, 09:17 AM
i gotta say,...
-thanks for the thank you...some people you just never hear from. :)
02-21-2006, 10: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.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.