Announcement

Collapse
No announcement yet.

Animation for laser display

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

  • Animation for laser display

    Bit of an odd one.. I've been playing around with a cheap display laser, it reads files from a sd card in a specialised format. (. Ild)

    There is a piece of software which can convert dxf files for display.

    Interestingly it supports folders with a dxf sequence as an animated source.


    People have had success rendering sequences using "illustrate"


    I was thinking of a simpler solution of directly exporting each frame to dxf from max.


    This would require two things:

    A script which would scrub through timeline and save a snapshot of scene as numbered dxf.

    A way to animate/keyframe the wireframe colour of objects.. This might be more tricky?


    Any suggestions for either of the above would be most useful! .

    Thanks all

  • #2
    Did you try the Illustrate! demo? It says it's fully functioning for 30 days so that may give you enough time to do the export.
    Otherwise, maybe this works https://www.scriptspot.com/3ds-max/s...timport?page=6
    https://www.behance.net/bartgelin

    Comment


    • #3
      Or...interestingly, you could try this, which I just got my mate to quickly code

      You may know him/her/it...name is Chatgpt

      -- Set the start and end frame numbers
      local startFrame = 1
      local endFrame = 10

      -- Set the output directory path
      local outputPath = "C:\\Exported DXF Files\"

      -- Loop through the frames and export a DXF file for each frame
      for i = startFrame to endFrame do
      -- Set the current frame
      setFrm i

      -- Set the output filename
      local outputFilename = "frame_" + i as string + ".dxf"
      local outputFilepath = outputPath + outputFilename

      -- Export the DXF file
      exportFile outputFilepath #noPrompt usingWGEXP
      print ("Exported " + outputFilename)
      }

      -- Set the frame back to the original frame
      setFrm startFrame
      https://www.behance.net/bartgelin

      Comment


      • #4
        So after a while it's obvious that that script 'can' work in a modified form, though I could only get a version which output 1 frame.
        This is the version that does that, so someone here should be able to spot the error and adjust it so it works.

        /* Set the start and end frame numbers */
        startFrame = 0
        endFrame = 100

        /* Set the output directory path */
        outputPath = "C:\\whatever\\DXF TEST\"

        -- Loop through the frames and export a DXF file for each frame
        for i = startFrame to endFrame do
        -- Set the current frame
        setFrm i

        /* Set the output filename */
        outputFilename = "frame_" + i as string + ".dxf"
        outputFilepath = outputPath + outputFilename

        /* Export the DXF file */
        exportFile outputFilepath #noPrompt usingDWGEXP
        print ("Exported " + outputFilename)
        }

        -- Set the frame back to the original frame
        setFrm startFrame
        https://www.behance.net/bartgelin

        Comment


        • #5
          I've had an interesting morning messing with this. I managed to get it to generate iterations to refine it but just
          couldn't work it out completely.
          I got it to get the frame range output correct, plus some rotation for each frame but it then gets too complex for me to work out the errors
          on subsequent attempts to make it work as expected.
          It's fascinating watching it get a bit muddled up on each attempt and unnecessarily complicating/breaking it as it tries to fix the errors.
          https://www.behance.net/bartgelin

          Comment


          • #6
            Ahaha.. I tried bing chat.. It gave "a result". But I've nit had time to test it in max yet..


            I could go the illustrate route, but ideally I'd like nice clean single splines (the laser traces a single spline path). And if I recall (might not still be the case, last time I tried illustrate was at least 15 years ago). Objects need to be polygons to work and a spline needed a thickness and rendered with a spline "outline" in the output.. Which is not ideal and would need cleaning up..

            Having said that, if I can resolve that issue, it's certainly more powerful than my idea, since shading could use materials rather than just wire color, and shapes could occlude each other.

            Comment


            • #7
              Yeah I looked into the laser tech so am now aware of how it does what it does, which is fairly obvious I guess, so the dxf route looks to be the obvious one.
              The script option does work for what I imagine is what you need to do, so hopefully someone with experience can take a look and fill in the missing gaps.

              I would have thought Lele would have been summoned automatically by this post, though maybe they've let him go on holiday or something
              https://www.behance.net/bartgelin

              Comment

              Working...
              X