Giter Site home page Giter Site logo

maxscript-dynamic-projection's Introduction

Max Script Requirements

​​Short Pitch:

​​ Write a max script that takes a list of positions in 2d, a target object and a starting position selection by the user as inputs to generate a list of positions in 3d based on a deformation of the 2d positions over the object.

​​

​​Details:

​​The objective of the script would be to take an array of pre-defined positions in 2d space (around 100 dots in a grid-like configuration) and project them over a 3d body to generate a new set of positions in 3d.

​​The process would work similarly to a "project" modifier, but dynamic and interactive.

​​

​​In order for the script to place the array properly, it needs some inputs from the user.

​​

​​Components:

  1. ​​The source file for the 2d array (a CSV file with a Point ID and an X and Y position value)

​​

  1. ​​A selected position placed over the surface. A null object can mark the spot. This selected position corresponds to the midpoint of both the 2d and 3d arrays. This point is also oriented along the normal of the surface.

  2. ​​A radius setting. Essentially configuring the distance between the center and the border of the 2d array.

  3. ​​An orientation setting to define the array rotation.

​​

​​The final "projected" positions should be visible in the view-port and interactive in real time. They can be displayed as null objects for example.

​​The script also needs to handle two arrays simultaneously.

​​Proposed user interface:

Positioning Example

​​The user selects a file that contains the 2d array positions

Positioning Example

​​The user clicks a button on the script to activate the desired array to be placed. (left or right)

Positioning Example

​​The user clicks on the target object. A single click selects the object and sets the center point in the click location.

Positioning Example

​​A null object appears over the surface, alongside with a circle representing the radius parameter and a handle that controls the orientation. An array of nulls are also placed over the surface at the correct projected positions.

​​The user can grab the center null tu adjust the position, and the points move in real time.

Positioning Example

​​The user can grab the handle to rotate the array, and the nulls move in real time.

Positioning Example

​​After the user is done adjusting, they can select the other array and repeat the process.

Positioning Example

Positioning Example

Positioning Example

Positioning Example

​​The script features a radius parameter that affects both arrays simultaniously.

Positioning Example

​​After both arrays are placed, the user can click on the export button to export a list of 3d position.

Positioning Example

​​The output should be a CSV file saved in the same folder as the source array. The name of the file should be the name of the object.

Extended Feature:

Spherical projection.

Current projection is planar. Positioning Example

We need a feature that enables “spherical projection”

Essentially, a circle is created with the center of the array as the center and the position of the point as the radius, the third reference axis is the normal orientation. The point is then placed at the intersection between the circle and the object.

Here is a 2d representation of this: Positioning Example

Here is a representation of a single line of points in 3d Positioning Example

The script needs to create a circle for each point

maxscript-dynamic-projection's People

Contributors

pegasus1982 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.