Announcement

Collapse
No announcement yet.

any scripters /coders out there?

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

  • any scripters /coders out there?

    ok so it sounds quite easy in theory, but not being a scripter myself, maybe its not as easy as i think.


    i am trying to design a couple of personal projects that involve mirrors and lasers. i wish to design this in 3d, and was thinking it would be amazing if i could draw and adjust a spline in 3d to represent the laser beam, and at each vertex, 3dsmax would place a correctly angled plane representing the mirror. i could then get the rotation measurements from max to set up the real thing.


    probably the kinda thing that is better done in cad, but then max is my playground and im not particularly good in cad.




    basically i need a script that will place a plane or dummy object at each vertex of a spline, and align it so the entry and exit angles are equal, just like a light ray bouncing off a mirror. ideally interactively.

    easy? possible?



    on another note i had a related idea.. would it be possible to use raytracing to generate splines? i.e. pick a starting point, fire a "ray" and get a spline generated showing the path of the ray bouncing round the scene.. ideally taking into account material properties (reflection/refraction/total internal reflection..etc)

    this would be very useful for another project im working on.. no idea if this is something that could use vray somehow?



    probably much more complicated...?

  • #2
    I wonder could you use a particle to do the bouncing around instead of a ray? The ray command in max tests for a hit between a vector and a single object and then you've to work out the angle it bounces off at yourself so a particle using a single mesh of your entire world with a udeflector could do a lot of the dirty work for you.

    Comment


    • #3
      You could draw this in autocad within minutes. All the measuring tools are mostly automatic, so with one click you can grab the angle difference between the 2 lines you drew, draw down the mid point of the two then rotate that one 90 degrees.
      You could learn enough cad to do this quicker than you could copy & paste a script into max...
      Last edited by Neilg; 01-06-2011, 03:17 AM.

      Comment


      • #4
        I guess it would be funny to do a "laser beam" script with renderable splines, reflecting off surfaces. But it's definitely not trivial, as joconnell said.
        You can try posting the idea here, maybe someone bites:
        http://forums.cgsociety.org/forumdisplay.php?f=98
        Marc Lorenz
        ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
        www.marclorenz.com
        www.facebook.com/marclorenzvisualization

        Comment


        • #5
          thanks for the suggestions guys. by far the more important one is the one that will generate correct mirror angles from a spline. what i want is to be able to drag a spline around or keyframe it, and have the mirrors rotate to keep the correct angles.. this will either be used to plan, or ideally drive directly, a set of servo controlled mirrors. im not sure if autocad would be better in that respect.


          the calculations seem trivial i just dont know about the implementation. probably i should just do what i keep needing to, and bloody learn scripting.

          Comment


          • #6
            I would have to start playing around to figure it out, but I'm pretty sure you can do a simulation of this fairly easily using the EposeTm helper object and some wiring.
            - Geoff

            Comment

            Working...
            X