Announcement

Collapse
No announcement yet.

Creating a 3DS Max script which renders through two different layer structures during an animation sequence.

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

  • Creating a 3DS Max script which renders through two different layer structures during an animation sequence.

    I need some help / pointers / guidance - as this will be my first attempt at writing a 3DS Max script as I cannot see any other way of doing this.

    I've never written a 3DS Max script before.

    Here's my requirement.

    I have an object in a 3D scene which can be configured in 4 different ways. I've set up my scene to have each of these configurations on separate layers (4 separate layers).

    The floor in my scene can be seven different types and I've set up my scene to have each of these floor types on a separate layer.

    My animation is 280 frames long, my camera rotates 360 degrees around the object that's in the centre of the scene and whilst the floor changes every 40 frames, the configurations change every 70 frames.

    So;

    Flooring changes from Floor type 1 to 2 to 3 to 4 to 5 to 6 and to floor type 7 at frames 0, 40, 80, 120, 160, 200, 240 and 280.

    Configuration 1, 2, 3 and 4 start at frames 0, 70, 140 and 210.

    Can any one help please ?

    I just haven't got a clue how or where to start so any pointers would be really very much appreciated.

    Thanks.
    Jez

    ------------------------------------
    3DS Max 2023.3.4 | V-Ray 6.10.08 | Phoenix FD 4.40.00 | PD Player 64 1.0.7.32 | Forest Pack Pro 8.2.2 | RailClone 6.1.3
    Windows 11 Pro 22H2 | NVidia Drivers 535.98 (Game Drivers)

    Asus X299 Sage (Bios 4001), i9-7980xe, 128Gb, 1TB m.2 OS, 2 x NVidia RTX 3090 FE
    ---- Updated 06/09/23 -------

  • #2
    The writer of this tool is going to be releasing something soon that'll do a great job on configurators, layer rendering, batching and res per camera - https://renderstacks.com/rsprvrender/

    Comment


    • #3
      Welcome to the wonderful world of scripting Jez!

      USE ATTACHED AT OWN RISK!!!

      Included, a script and maxfile to play with. The script is not exactly optimized or streamlined, but I made it this way so easier to understand and as a bonus, it works.

      Some assumptions were made:
      Object Configs are each on its own layer, Object01, Object02 etc
      Floor Configs each on its own layer, Floor01, Floor02 etc

      So what happens here is that time is set to single frame (the script sorts the next frame etc)
      A folder is created in your renderoutput folder called "layers_objects_floors"
      Render output is split per channel and saved into that folder with names test0000.png, test0001.png, test0002.png etc
      Layers are switched on and off as per your requirements.

      Use caution, as when it starts, you can't stop it by simply clicking cancel!

      I'll leave it to you to adjust things as you like it, but this should get you going.

      Attached Files
      Kind Regards,
      Morne

      Comment


      • #4
        Thanks to you both so much.

        That tool sounds great, I'll keep an eye out for it - any idea when it's going to be launched ?

        Morne, that's super generous, thank you. It works like a charm, though I've yet to test it on my own scene file (I use nested layers, so am not sure at this stage - I'm going to read your script and try and understand it

        I've also found a link to a free online course presented by none other than the author of MAXScript, John Wainwright. This course used to be for sale on a DVD, but it's now been generously provided free of charge on Vimeo;

        https://vimeo.com/showcase/1514565 (MAXScript 101).

        Jez

        ------------------------------------
        3DS Max 2023.3.4 | V-Ray 6.10.08 | Phoenix FD 4.40.00 | PD Player 64 1.0.7.32 | Forest Pack Pro 8.2.2 | RailClone 6.1.3
        Windows 11 Pro 22H2 | NVidia Drivers 535.98 (Game Drivers)

        Asus X299 Sage (Bios 4001), i9-7980xe, 128Gb, 1TB m.2 OS, 2 x NVidia RTX 3090 FE
        ---- Updated 06/09/23 -------

        Comment


        • #5
          Originally posted by JezUK View Post
          I've also found a link to a free online course presented by none other than the author of MAXScript, John Wainwright. This course used to be for sale on a DVD, but it's now been generously provided free of charge on Vimeo;

          https://vimeo.com/showcase/1514565 (MAXScript 101).
          That is THE maxscript tutorial.
          When you're done with it, you can pick up those by Bobo and Laszlo:
          MAXScript Fundamentals 1 – Variables, Macroscripts & Functions
          MAXScript Fundamentals 2 – MAXScript For The Masses
          Advanced MAXScript 1 – The Matrix: Explained


          I know those are hard to find after the publisher ran with the money, but i have it directly from the authors that they do not mind if you watched these through, herm, odd means (youtube, torrent, vimeo, dailymotion. no matter.).
          In "The Matrix" Bobo will have you running your own maxscript raytracer by the end of the course.
          Right? ^^
          Lele
          Trouble Stirrer in RnD @ Chaos
          ----------------------
          emanuele.lecchi@chaos.com

          Disclaimer:
          The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

          Comment

          Working...
          X