i need help about ccCrurve

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 09 September 2009   #1
i need help about ccCrurve

Hey Guys,

i have a ccCurve with only two Point Start + End. I want only copy as a integer the Y-Value when the X-Value is for example is 0.325. My Range for x is 0 - 1. I'm too stupid. Can every body help me.

mfg
hot chip
 
Old 09 September 2009   #2
Originally Posted by thorsten hartmann: Hey Guys,

i have a ccCurve with only two Point Start + End. I want only copy as a integer the Y-Value when the X-Value is for example is 0.325. My Range for x is 0 - 1. I'm too stupid. Can every body help me.

mfg
hot chip


from MXS help
getValue ccCurve <time_value> <float_x> [lookup:<false>]

Returns a Point2 value corresponding to the specified X position along the curve at the specified time.


getValue ccCurve 0f 0.325
 
Old 09 September 2009   #3
ah thank you very much.
 
Old 09 September 2009   #4
Oh Sorry, it will not work,


the error message is: not "getValue" function for #(ccCurve : Reflection Curve)

my code:

.....
global Glossy_Reflection_Curve
...
...
CurveControl cc_ReflSamples ......
...
Glossy_Reflection_Curve = cc_ReflSamples.curves
...
...
... here come the error
zwerg_gloss_RefSamples = getValue Glossy_Reflection_Curve 0f mtl.refl_gloss

mfg
hot chip
 
Old 09 September 2009   #5
Originally Posted by thorsten hartmann: Oh Sorry, it will not work,


the error message is: not "getValue" function for #(ccCurve : Reflection Curve)

my code:

.....
global Glossy_Reflection_Curve
...
...
CurveControl cc_ReflSamples ......
...
Glossy_Reflection_Curve = cc_ReflSamples.curves
...
...
... here come the error
zwerg_gloss_RefSamples = getValue Glossy_Reflection_Curve 0f mtl.refl_gloss

mfg
hot chip


in your code Glossy_Reflection_Curve is an array of cc curves...
you have to call
zwerg_gloss_RefSamples = getValue Glossy_Reflection_Curve[curve_id] 0f mtl.refl_gloss
 
Old 09 September 2009   #6
super that works now,

ähm little last problem ( i can run in the wall)

..
..
spinner ReflSamples pos:[128,498] width:40 height:16 range:[0,512,16] type:#integer
on ReflSamples changed val do ( max_glossy_Reflection_Samples = value )
..
..
max_Refl_Samples = max_glossy_Reflection_Samples
..
zwerg_gloss_ReflSamples = (getValue Glossy_Reflection_Curve[1] 0f mtl.refl_gloss)
..
.. here come the error: Incompatible types: 0.210001, and SpinnerControl:ReflSamples
zwerg_gloss_ReflSamples= zwerg_gloss_ReflSamples * max_Refl_Samples

thank so much at your help.
 
Old 09 September 2009   #7
Originally Posted by thorsten hartmann: super that works now,

ähm little last problem ( i can run in the wall)

..
..
spinner ReflSamples pos:[128,498] width:40 height:16 range:[0,512,16] type:#integer
on ReflSamples changed val do ( max_glossy_Reflection_Samples = value )
..
..
max_Refl_Samples = max_glossy_Reflection_Samples
..
zwerg_gloss_ReflSamples = (getValue Glossy_Reflection_Curve[1] 0f mtl.refl_gloss)
..
.. here come the error: Incompatible types: 0.210001, and SpinnerControl:ReflSamples
zwerg_gloss_ReflSamples= zwerg_gloss_ReflSamples * max_Refl_Samples

thank so much at your help.


1)
spinner ReflSamples pos:[128,498] width:40 height:16 range:[0,512,16] type:#integer
on ReflSamples changed val do ( max_glossy_Reflection_Samples = val ) -- not value!

2)
zwerg_gloss_ReflSamples = (getValue Glossy_Reflection_Curve[1] 0f mtl.refl_gloss)
-- it's a point2
3)
zwerg_gloss_ReflSamples.value = (zwerg_gloss_ReflSamples * max_Refl_Samples).y
 
Old 09 September 2009   #8
thank you so much!

cheers
hot chip
 
Old 09 September 2009   #9
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



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
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 07:38 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.