Results 1 to 3 of 3

Thread: Using Macros in 3ds Max

Hybrid View

  1. #1

    Default Using Macros in 3ds Max



    Hi TA,

    I'm currently in the process of optimising a falcon model and I was wondering if there was any way that I could automate the optimisation of the feathers as they appear to be instances.

    falcon_optimisation.jpg

    feather_macro.jpg

    I've tried to record a macro but nothing happens when I try to run it.

    Could it be to do with the fact that the names of the feathers are different and the macro references the original feather model?

    Any help on this would be greatly appreciated as I have minimal experience with MAXScript :\

    Thanks,
    Mike
    Last edited by barnesy; 01-06-2017 at 02:24 AM.

  2. #2

    Default

    * Problem solved

  3. #3
    Administrator Jeff Hanna's Avatar
    Join Date
    Jul 2008
    Location
    Champaign, IL
    Posts
    126

    Default

    As with your last post asking for help your screenshot of the recorded macro is too low resolution to be readable. Since I cannot give specific replies to that macro I'll give some general information that may help.

    You are correct in your assumption that since the recorded macro deals with a specific object in the scene it will not work holistically on all similar objects in the scene. How could it? To 3ds Max the scene graph is a collection of point and face data. It has no understanding that some of those points and triangles are what you perceive as feathers and others are not. If you want to perform an action on all objects that represent feathers you will need to write a for loop to iterate over all of the objects in the scene, test them to see if they are a feather object, and then perform the operation you want on the object if it passes that test. In pseudo code that would be something like:

    Code:
    for obj in geometry do (
       if ( matchPattern obj.name "feather" ) == True then ( -- Assumes all feather objects are named with a "feather" prefix
          -- do something
       )
    )
    Jeff Hanna
    Principal Technical Artist
    Volition

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
  •