User Tools

Site Tools


reference_guide:thinkingparticles_nodes:blackbox_nodes:blackboxesoperator

Black Boxes Overview

thinkingParticles is a highly complex and advanced particle animation system that offers many modeling concepts that are completely new.

thinkingParticles is like programming your very own particle system without having to write a single line of code. Thanks to its advanced graphical user interface, it’s an easy task to wire up even the most complex particle behaviors in a few moments.

The fact that non-programmers can use thinkingParticles does not mean that there are no programming-like features at all. Moreover, these programmatic features should appeal to technical directors who need to design very specific tasks for the creation of particle effects within their pipeline. That's where Black Boxes come into play.

What is a Black Box?

The simplest definition of a Black Box is that it is nothing more than a standard DynamicSet saved to your hard disk so it can be re-used. Not only will they be reusable for many particle situations, but with them you can achieve better particle effects in a shorter span of time.

More specifically, Black Boxes (at least good ones that you want to share with others or re-purpose) exist as collections of scene independent conditions and operators. These saved DynamicSets can then be used in other scenes without any further adjustments and become drag-and-drop in the same way you do with the other thinkingParticles operators. When you create your own Black Boxes you need to keep in mind that everything should be scene independent as it doesn't make sense to create Black Boxes that include Particle Group names or other scene-specific data.

And for non-programmers, using Black Boxes that have been built by technical directors allows them to get their work done without having to understand everything that goes on within the operator itself. They can simply wire up the various input and output data streams provided to see the results without having to dig into the various Operators, Conditions and Helpers since these nested DynamicSets are hidden from view.

There are some restrictions that apply to the Load and Save operations of DynamicSets when you create Black Boxes; for example you can't save a wired particle Group along with its Operators and Conditions. Reloading DynamicSets that use specific particle Groups will fail. This is because the only particle group that will be available in all scenes is the ALL particle group, any other particle group may not exist in a scene.  

Why would I want to use a BlackBox?

Black Boxes can be used like any other Condition, Operator or Helper. Black Boxes are pre-wired for a specific kind of particle effect and this is the big advantage. You do not need to set up operators and conditions each time you need a specific effect; instead everything can be accessed and applied with a simple mouse click.

And in many cases, the effects that are set up as Black Boxes are the most common ones. Think about setting up a system to set the shape or size of a particle. This task is a must for every particle system, but it makes little sense to do the wiring each time you create a new effect. By having a Black Box to handle that task, you can get your work done in a far more efficient manner.

You are strongly urged to make use of the Black Box system that thinkingParticles has to offer. The more you work with thinkingParticles, the more power you will get out of it and a growing library of Black Boxes you create.

How to use a BlackBox

Black Boxes are accessed through the Black Box icon from the right side menu. When you activate this icon, a set of buttons shows up. Each button represents a saved DynamicSet (Black Box) along with its file name. The list of buttons will increase whenever you save a new DynamicSet to a specific folder on your hard drive.

Example 1: Particle Speed

Nearly every particle system animation needs to have moving particles and so at some point one must set a speed for the particles. Check out the sample illustration below:

image12.gif

You can see that it shows a DynamicSet that sets a specific speed for a particle group. However, one thing within this DynamicSet makes it really special. The Particle input data stream connectors aren't wired to a specific Group node. Instead, each of the Particle input data streams are wired to the upper left corner of the DynamicSet. This is called the DynamicSet Channel Bar (DCB). As is shown above, the DCB still shows the input data stream for the Particle group connection in yellow. Normally, this would cause a DynamicSet to become invalid, but since it's wired to the DCB, it makes it so that this DynamicSet must rely on another external Group node to activate this set of operations.

Likewise, the DCB in the upper-right corner of the Speed DynamicSet can be used to send any output data streams back out for other DynamicSets to use.

As you can see, this simple Speed Black Box does nothing complex or mysterious - it only needs a particle Group input data stream to work properly. The needed information can be supplied by any DynamicSet from the hierarchy above.

image13.gif

In the example above, the Speed Black Box has been connected to a particle Group (called MyParts). The Black Box is added as you would any other operator (it's highlighted white within the upper DynamicSet and prefaced with a D: within it's name), and then you connect the scene specific elements to it.

Keep in mind that this DynamicSet does not have any connection or reference to an existing Particle group. This is ideal since it makes little sense to create Black Boxes with particle group information, since these Groups generally change for every scene. So, when you create your own Black Boxes, think about how you could create a setup that will be of “universal” use.     If you want to create a collision Black Box, for example, do not store the Distance operator along with the Node helper in the BlackBox. The already picked Node certainly won’t be available in another scene! Instead, you would drag the Position1 and Position2 connectors to the left-hand DCB. This will make sure that any other operator or condition is able to supply the needed position for measuring distances.

In a programming vocabulary, a Black Box is a defined Function that needs a set of parameters when called to process. The variables passed to such a function are defined by the input data stream connectors of the conditions or operators. Any results that these kinds of functions produce are also often used for other functions or rules within the system.

How To Save a BlackBox

  image1.gif

thinkingParticles offers several ways to save a complete Node setup or individual nodes. BlackBoxes or TD-Tools are nothing else than saved Node setups. However, there are several things that need to be thought of when saving complex BlackBoxes or TD-Tools. Usually complex Node setups use Hierarchies of particle groups, those particle groups might need to be recreated when loading back a BlackBox or TD-Tool into a thinkingParticles scene setup. Very often it will be the case that there are already particle groups in a scene when a BlackBox is added to it. In such a situation it is mandatory to know how the BlackBox or TD tool should behave on loading.

There are 3 Methods to save a Black Box

  1. From within the DynamicSet Tree View; use the M or Save or Load options
  2. From within the DynamicSet; next to the On button use the Save button
  3. Select operators to be saved and right click into the gray background to bring up the Save option!

  When saving a DynamicSet or a single (selected) operator a dialog will show up, after choosing the file name, presenting the following options:

image1.jpg

Request - choose this option to force the user to decide on loading this DynamicSet (BlackBox) how particle groups should be handled.

None - when selected, no particle groups will be used at all (all groups will be deleted)

Use Existing - select this option to re-use an existing particle group in the scene; if this group is not found (by name; the first one is chosen, only) then the existing particle group in the DynamicSet (BlackBox) will be deleted and NONE is chosen!!

Exist/Create - choose this option to make sure when the group exists, it is used from the scene (first name found). If this particle group does not exist the particle group hierarchy is created with the original group names as saved in this BlackBox file. If the group name is found and the hierarchy is not identical the missing hierarchy particle group will be created

Create New - choose this option to force the re-creation of the particle groups as they are stored inside the BlackBox regardless if they exist in the scene or not.

When loading a BlackBox back into a thinkingParticles scene, a dialog box will show up whenever a BlackBox was saved with the Request option. The dialog shown is similar to the one above but the Request is missing.

Important
When a BlackBox is saved with the following name:startup.thi and it is placed into the first search path found in the thinking.ini file, it will be automatically loaded when a fresh TP helper is created in a 3ds Max scene.

Startup.thi allows you to save custom setups for TP like Dynamic Sets and Groups. For instance if you are always creating a 3 Groups and 4 Dynamics sets (named as you like with properties you like), then you can simply save out this setup in the startup.thi and every time you create a TP particle system they will be created for you.

Conclusion

  Black Boxes are a great organizational tool that help save time when creating complex particle setups. All of the complexity of a Black Box is hidden within the hierarchy, and usually no-one needs to know about it. One or more data streams are passed from the top level of the hierarchy into the Black Box, and that’s all that is needed to get things working.

©2024, cebas Visual Technology Inc.

reference_guide/thinkingparticles_nodes/blackbox_nodes/blackboxesoperator.txt · Last modified: 2024/01/24 18:34 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki