Announcement

Collapse
No announcement yet.

drive object scale via distance tex

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • drive object scale via distance tex

    as title.. anyone think of a clever method?

    any suggestion has to be applicable to a massive pre-built model, provided by someone else, so i cant go rebuilding it using pflow!

  • #2
    That's a job for mcg or maxscript really. Is the provided model loads of individual parts? If you're using distance tex then it means you'd be using the colours of the map that's on a reference object - is the reference object something simple like a plane? If so then you'd be able to ignore the plane and just use an expression based on the object's coordinates.

    With distance tex, it has an issue called circular referencing. The map is calculated by seeing how far another object's polygons are from the object using the map and calculating distance radius values. If the other object's scale is driven by the distance tex, the object gets bigger or smaller and since it's polygons have changed, they're no longer in the same place that the distance tex calculated itself from. In theory it could update eternally through a cycle of calculate distancetex > Apply to scale > recalculate distance tex from new scale > new distance tex updates scale and so forth. What'd be hand in some ways would be to tell distanne tex that it can calculate ONCE, based on the state of objects as they are and then stop. You could kind of do this by baking out the distance tex map and using it as a bitmap.

    Could you tell us more about the object that's going to be holding the distance tex and a little bit more about the pre-built model?

    Comment


    • #3
      hm ive got to do progressive growth of a load of trees across a park. from a fairly distant vantage point.

      ideally id just use forestpack and be done, but the trees (proxies) are already positioned and collapsed into instances.

      i thought it would be nice to just have a simple animated mesh under the park that i could keyframe spreading however i wanted. the trees would scale up from 0 as the animated geometry approached.

      i see the problem of the circular reference, although if im just animating the scale of the trees, the pivot should stay put.. and its distance from the target geometry would remain unchanged.

      Comment


      • #4
        Distance tex calculates itself via raytracing from polygons though, not from the pivot, hence it's abilities to do accurate contours and outlines around objects.

        What I'd probably do is use pflow and dumb things like volume select or collision gizmos to paint through the areas you want - you'd end up making a particle for each of your trees at their pivot, set up your animation and then export the pflow particles as nulls, you can relink your objects to them after. It'd be a job for maxscript I reckon.

        Comment

        Working...
        X