Results 1 to 7 of 7

Thread: Expresion value erroneously showing as 0

  1. #1
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143

    Expresion value erroneously showing as 0

    This weird problem has been causing me no end of trouble, and after a week of trying to solve it on my own with no results I figured I'd pester you people with it.

    So I'm calculating this value, as shown below:



    MC.Util_Camera_Angle is being calculated correctly. Hooray.

    Then I tried using it in another expression and got an "Illegal division by zero" error. To make sure this really was the source of the problem, I removed everything but MC.Util_Camera_Angle in the expression and applied that expression to another channel. Sure enough, it shows up as zero:



    I also tried (1 / [MC.Util_Camera_Angle]) and verified that it throws a divide-by-zero error. I cannot fathom why this would be since that channel is obviously non-zero (as shown in the first image).

    Edit: This is in Lightwave 9.6 build 1539 (Mac 32) running under Mac OS 10.6.2
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Exp_Value_01.png 
Views:	172 
Size:	20.8 KB 
ID:	82941   Click image for larger version. 

Name:	Exp_Value_02.png 
Views:	169 
Size:	19.9 KB 
ID:	82942  
    Attached Files Attached Files
    Last edited by jrandom; 03-08-2010 at 01:13 AM.

  2. #2
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    Uh oh... total silence from the community. This does not bode well.

    Would I be better off packing this stuff into an LScript file?

  3. #3
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    I'll bump this up one more time before pestering Lightwave tech support with it.

    Has no one else ever run into this kind of problem? Some of my expressions work just fine, but others fail to work and just return '0' for no apparent reason. Maybe it's leprechauns... evil, devious leprechauns...

  4. #4
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,792
    Ok... the first channel is getting a value above 0 as driven by expression, but its still keyed as 0.

    What you're doing with the second expression is referencing a channel that's being controlled by an expression... that wont work. It will only reference the channels keyed value, not its expression driven value.

    What you should do instead is reference the first expression inside the second expression (done by just typing the expression name with [] around it.

    Remember though also when doing this... that expressions can only run 2 deep. So one expression can reference a subexpression, but any 2nd level subexpression referenced in that expression will be ignored.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  5. #5
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    Oh lordy, that's good to know. Thank you!

    I think I'm going to have to convert some of this stuff to LScript to get around those particular limitations.

  6. #6
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,792
    The other thing u can try is the expression motion modifier in the motions panel for a given item. The expression modeifier has a scratch pad that holds 4 expressions, A, B, C, D... and then these can be combined in various ways in the actual channel application slots... such as (A+B) - (C (sinD)... etc, etc.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  7. #7
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,792
    oh, and when I say A+B, etc... thats how the expression names work in the expression modifier, rather than you giving them names.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •