Template Auto Linking

This has been superseded in 3.5 and up by the Custom Prop Editor.

In 3.4u1 features where added to add the ability to auto link some templates. The template has to be built using the basic shape single bulb. It can be comprised of however many of those single bulb elements you want.

Planning

It starts with a bit of a plan on how you want your element layout to be. For singing faces, you will want groups for the eyes, mouths and then the bulb/base. You may want other groupings for other types of props. All that really matters is that all the lights are represented somehow under a single group. Here is the layout from one of the forums of a Chroma bulb from Boscoyo Studios. Some of the colors are crappy, but it is good enough for this example. You can make your own for whatever your prop is from a picture or drawing of your liking.

ChromaBulb

Display Setup

This covers some of the steps described in other areas of the documentation around building elements in Display Setup. Make sure you have read those sections if you are not familiar.

 

So lets start in the display setup and start building our elements for the bulb. I choose the generic number item template at the top and configure it as shown below for the 143 pixels that are in the Chromabulb.

Step1
After Ok, it yields this in my element tree. Part of it is shown, but it is a sequential list up to the 143. Notice I chose to name them with a number of the bulb and then suffix of Px-xx that represents the pixel number from 1-143. In this example it will represent my pixels items in wire order for convenience.
Step1Result

At this point, this is enough to be able to auto link them in the preview. But we will want some groups for better functionality, so we can go ahead and do those as well and still be able to auto link. Now I group them according to which pixels correspond to the parts of the Chromabulb.

Step2-Group-0

 

I have not renamed any of the individual elements, but just grouped them together and removed the extras. This follows the grouping on the layout plan above.

Step2-Group-1

Now all my elements are defined. I can set the color handling and patching later.

Making the Template

Now I am going to create a scratch preview to build the template. This will allow me to build the template all on it’s own outside of my real preview.

Step3-Preview

 

Then in the new blank preview, I set the image to the plan image above that we started with.
Step3-Preview-Image
Now I have a template to follow I will hold Ctrl and click the single buib shape and that will bring up the following dialog. Here is where the magic begins. I will tell it I want the prefix name to be Px- and the starting index will be 1. This will name each item I add Px-1, Px-2, Px-3, etc in the order I add them. You will notice this matches the suffix of my element names I created earlier. This is important. This must match some portion of the element name we want to link it to. This is word association. I also set the Light Size to 5 so they are easier to see when I add them. Light size was added in a development build after 3.4u1.
Step4-StartTemplate
Now we start clicking on the points that the bulbs are supposed to be following in order as the plan indicates.  Here you see I have done part of the socket and I am working my way around the bulb. I started at the bottom of the socket and worked up. Don’t worry about perfect placement, you can tweak them later. I am following the wire order here that the prop is wired for simplicity and so that it will match were my element names are grouped. As add them one by one, each bulb will have the properly incremented name. Px-1, Px-2 ……. Px-143 for the last one. You can do all of them at once. If you have to stop, you can start the process where you left off and set the index on the dialog box to the next number you need instead of 1. So if I had to stop at pixel 55, when I start the dialog again, I would set the starting index to 56 and it will pick up where it left off.
Step5-AddBulbs
All bulbs are added and my little arrow is pointing the last one I added that I selected after changing to the pointer tool in the toolbar. You can see in the properties box on the left, it is named Px-143. It’s light size is 5 just like I told it. In this case we will leave them as a Standard bulb instead of changing to a Pixel as we might do elsewhere. Just trust me on why.
Now is the time to adjust any of the lights placement to satisfy your level of OCD.
Step5-BulbsAdded
Now I will click and drag the lasso around all of the lights to select them all. Then I will click the green plus button at the top to create a template from this. I am calling mine MyChromabulb. Name as you like.
SaveAsTemplate

Preview Linking

Now I switch over to my real preview. Here I am going to select the top level group of my Chromabulb I want to link. After I select it, then I find my template in the dropdown at the top and select it. Then I click add to preview while my element is still selected. Resize and move the new bulb on your preview. If we did everything right, I can then click off and back on the Chromabulb-1 element and I will see all the bulbs light up in purple indicating they are linked.

Step6-Linked
If I select one of the groups I see only that portion of it light up indicating my groups are properly associated.
Step6-Linked-Group-Selected

Now I can go back to the display setup and either manually setup more or I can copy my existing one and paste as new. I can then use the new find replace or the template rename to clean up the names.  For any new ones I now longer need to create the template, I can just add more in the preview and link them as I go. The only thing I need to remember is to retain the same name association somewhere in the new elements as I created in the template.  I just need to make sure that when I add more in display setup, I don’t lose the Px-xx naming on each item as that is what makes the link association. The following examples will work.

  • Px-1 My Element
  • My Px-1 Element
  • My Element Px-1

All have the Px-1 in them and will link by association to the template bulb Px-1.

Once I am done creating the template, I can remove the scratch preview if I no longer want it. It is not required once the template is saved.