Results 1 to 3 of 3

Thread: getting VMWEIGHT map values in Displacement script

  1. #1
    Animator / Artist Sculley's Avatar
    Join Date
    Feb 2003
    Location
    England
    Posts
    159

    getting VMWEIGHT map values in Displacement script

    Im having a problem getting the correct points value and information inside of a Displace script for Layout.

    I need to get the weight value for the current point being evaluated inside a displacement. I can access the vmap and find the map i ask for and that comes back fine. My problem is how to know which point data and where to get it for the current point being displaced is.

    Any help would be much appreciated.

    Stephen

  2. #2
    Animator / Artist Sculley's Avatar
    Join Date
    Feb 2003
    Location
    England
    Posts
    159
    Solved.. forgot to put a value in a bracket .. oh well.. thanx

    if(AItem.isMapped(AItem.points[currentPoint]))
    {
    value = getValue(AItem.points[currentPoint], 1);

    and do my code n stuff

    }

    forgot the 1... spent hours looking and trying to find why.. then it hit me.

    Stephen

  3. #3
    Animator / Artist Sculley's Avatar
    Join Date
    Feb 2003
    Location
    England
    Posts
    159
    Ok... i have spent hours trying to figure out a way to find layer number and I still cant.

    I can displace an single layer object and control it with a weight map.....

    but..

    I need to be able to do that for any object layer the script is applied to. Why is this so difficult? I can figure so far that the pointcount for the layer being processed doesnt match for the point i need to look up in isMapped... but I can not find a way to get the layer number so I can ask how many points in current layer.... and can also work out how many points are in previous layers to use that value as the start for my point count. If that makes sense?

    Would really appreciate if anyone can let me in on the secret.

    Stephen

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
  •