How to Construct and Visualize a Continuous Spin MA3D Effect
There are two parts to the process of constructing a continuous spin visualization for a profile such as the Ayrton Magic Panel/Blade/Dot/etc.
The first part consists of constructing the 3D model with the appropriate parameters within the hierarchy of the object. This is done by creating a simple 'polygon' object and giving it a special name, a suffix starting with "_X". It should be located at the position of the 'pivot' or rotation. The 'normals' of the polygon object, usually a 2-triangle square plane[I imagine a single triangle might suffice], should point in the direction of the rotation you need, along it's axis. In the case of our example the Magic Dot-R, a 'Headmover' class object, it has a continuous Pan and Tilt. Since the default position of this class is underhung and at a 'center'/50% Pan/Tilt, the lens should be pointing straight down. This means we will be using a Z vector for the Pan-Spin and an X vector for the Tilt-Spin. The documentation for fixture creation has these parameters listed as being named, "_XAI" and "_XAG". This fixture profile also has the standard Pan/Tilt attribute and should also contain the parameters for those visualizations. Those are labeled, "_XAP" and _XAT". There are other parameters in the fixture as well, but I won't cover those in the process presented here. Once the polygons are created and positioned where they are needed inside the physical model itself, I then 'parent' them together inside the modeling program's Attribute Panel, much like the Properties Tab in MA3D. I utilize Cinema4D, so I am able to Drag and Drop items onto each other in a 'Navigator' type UI and they are thus 'parented' together; they don't move physically in the Scene, they just are now linked together in a chain. This means when you rotate or move or scale an object, all the objects nested below it in the hierarchy receive the same movement/scale/rotation along with the parent node. For this example, I parented the pan _XAP to the spin _XAI and then down the chain, I parented the tilt _XAT to the _XAG. All of these polygons received a 'transparent' material as I'd seen done to the provided VL1000 example file. I don't think they need this as they get destroyed as the placeholder is generated. Here's some output from the Import process showing the construction of the Hierarchy of Parameters within the object. As you can see, there are the _XAI,_XAP,_XAT,_XAG objects inside the model, ready to be triggered. You'll also see the 'beam' objects as well and the removal of objects as the process churns to a conclusion.
---: ------------------------------------------------------------------------------------
Start importing "NULL\Ayrton\AYRTONmodels\MagicDot\MDot_Std.3ds" via "3ds Model Import" plugin.
---: ------------------------------------------------------------------------------------
Got data from plugin.
Starting post processing of "MDot_Std".
Tree of 3d objects:
| MDotR_XSX (parameter: SunshadeType/ExcludeOwnBeam)
| _XAI (parameter: Axis/SpinZ)
| _XAP (parameter: Axis/Pan)
| Y_XSX (parameter: SunshadeType/ExcludeOwnBeam)
| _XAG (parameter: Axis/SpinX)
| _XAT (parameter: Axis/Tilt)
| H_XSX (parameter: SunshadeType/ExcludeOwnBeam)
| L_XSN (parameter: SunshadeType/None)
| _XLD (parameter: LightType/BeamDiameterAtOffset)
| _XLC (parameter: LightType/BeamNearClippingDistance)
Special material "lens_XJ" for emissive inking color found.
Axis "_XAI" found.
Child of axis "_XAI" is an axis too. -> Inserting new placeholder object.
Axis "_XAP" found.
Axis "_XAG" found.
Child of axis "_XAG" is an axis too. -> Inserting new placeholder object.
Axis "_XAT" found.
Beam placeholder object "_XLD" found.
Removing empty object "_XLC" (no vertices and no children).
You'll also notice that the names are very short and this is a caveat of the format used for Importation/Visualization. The .3DS format only allows for naming up to 8 characters, including the 'suffix' codeblock. The shapes construction is also as optimized as possible, with no UV mapping which puffs up the vertex count and isn't really needed. All of these 'restrictions' are within the documentation of Fixture Creation provided by MAlighting, a great place to start learning this process.
Once the model is Imported and written into a .GMAMEDIA file and then changed in the Patch, the continuous spin visualization still will not be available, and that is where the second part of the process heads. We'll need to hack into the profile to make this visualization work.
Save a copy of the profile as an .XML as I always insist to work on. Open this copy in an .XML editor, I use Notepad++. If you're using some form of IDE to edit with, you should get a collapsing tree structure to the file. I start by folding all the code up to the beginning of the file and navigate to the <Modules index="0"> block of code. This is where all the functions of the fixture are indexed with their corresponding DMX value ranges for the encoders are stored, the very nerve center of the profile!! Under the Main Module there are all the ChannelTypes indexed. We need to find the special 'continuous spin' channels for Pan and Tilt inside the fixture. They are index="3" and index="4", "PANMODE" and "TILTMODE", NOT the "PAN" and "TILT" channels! Open these two channels as well and you'll see where the DMX range is stored and the preset 'names' come from that are on the Tabs of the Presets in the Programmer. You'll also see an assignment statement, subattribute="PANMODE", as well as the subattribute="TILTMODE". This is where we hack.
Now, a tad of 'backstory': There are 2 'lists' of parameters, one for what the model needs the polygon to be named, and the other is the parameter list where that information is stored in a very specific name as well. The 'visualizable' effect names we're looking for is the, "MP_SPIN_Z" and "MP_SPIN_X" naming convention. It seems that the 'subattribute' of a fixture class is what is visualized in MA3D.
Back to the 'frontstory', lol... Inside the profile, in the Modules section, inside the channelType, we edit out the meaningless name of PAN/TILTMODE in the subattribute assignment and insert our very meaningful, MP_SPIN_Z and MP_SPIN_X, instead. This was the ONLY edit I did to the stock profile to make this visualization function. Well, that and Save my geometry to the file for future Patching. I did not change the subattribute's name to avoid confusing the user at the controls of the encoders.
Once the edits are completed, Save out the file and check inside the Patch and MA3D.
I hope this helps the understanding of the mysterious process of building custom fixtures for profiles in MA3D.
Rex
NB: while writing this tutorial I noticed that my spin was not reversing....now I see why, didn't change the subattribute for the other direction in the profile....D'oh!.....edit the other side of the range for both and you should 'see' it slow down and reverse direction, which I did not see while looking at the edits...mea culpa, mea culpa.
Edited 4 time(s). Last edit at 11/19/2015 05:11PM by Rex.