So as I was running into the xmesh issue of loading lots of objects into a scene – though Bobo pointed out that you could use the .ms maxscript files which I hadn’t thought off – I am now curious why with the PRT Volume you can only choose one object. Basically I am doing a similar thing to Bobo’s cloud tutorial, but I want to apply it to lots of objects and I can’t seem to find a way of doing this easily. Any suggestions? Am I missing something obvious?
The other question, which is a bit premature because I haven’t truly looked at the setup to see if I can change this in the magma editor, is if I can do the noise in local space rather than world space. As it is, I have to link the PRT Volume to the object, and then that would create another problem for applying this setup to lots of objects.
Because the PRT Volume was originally intended to operate in object space, and that requires ONE object. The “In World Space” checkbox was added much later. If it were to be only in world space all the time, it probably would have been possible to have multiple meshes.
Right now you can either use a Compound > Boolean in Attach mode to combine a lot of objects into a single object without actually changing their topology, or XMesh them. The former method lets you be more interactive in your adjustments.
Note that you can easily create multiple PRT Volume objects by selecting a bunch of meshes and pressing the VOL icon on the Krakatoa toolbar, or by using the Krakatoa menu. Right now, there is no option to automatically parent them to the sources, but there is a manual option to do so, which requires you to select each PRT Volume, click the [>] button, select “Inherit Source Object’s Settings…” and then “Link PRT Volume To Source Object”. We should probably move this out to the other automatic options like Hide Source, Display As Box etc. so it can be done on creation.
Why wouldn’t it be in Object space? What is your setup? If you are creating the PRT Volume particles in object space and you feed in the Position channel divided by some large value into a VecNoise node and output as Color, you will see that the noise is in object space - moving the PRT Volume around does not change the location of the pattern.
If “In World Space” is checked, the Noise will be of course fixed in world space as you move the Source Object. In that case, if you Align and Link the PRT Volume to the Source and insert a FromWorld transform node between the Position and the VecNoise operator, you will get local noise pattern but world space particle distribution. Alternatively, without aligning and linking the PRT Volume to its source, you could insert a ToSpace transform node between Position and VecNoise and pass the Source object as the transform node. The result will be the same if you move the Source, and the PRT Volume does not have to be linked. But this would require a different Magma modifier for each PRT Volume, so it is not so good…
The reason why I didn’t think, and still haven’t tried yet, boolean or x-mesh as one object would work is because if I’m applying a Magma flow to it with local space noise and the objects are moving they would now be moving through the one newly created object space (even if it contains a lot of objects). If I was wrong and booleans and x-mesh as one object still keeps each object’s individual object space then I made a bad assumption.
As for creating Krakatoa objects through the Krakatoa toolbar/menu, it’s simply something I haven’t thought of doing as I (almost) always use the script “activetype” to create objects and modifiers.
No, that won’t work since there will be only one object space for all.
Do yourself a favor, customize a toolbar. A lot of the Krakatoa features are best enjoyed throught it. When you create a PRT Volume via the MacroScript on the toolbar or menu, it
*Aligns the PRT Volume to the mesh source
*If there are multiple objects selected, creates one PRT Volume per valid object
*Adjusts the viewport spacing to the size of the bounding box to avoid nasty surprises
*Assigns the wireframe color of the source to the PRT Volume to shade it the same
*Assigns the material (if any) of the source object to the PRT Volume
*Can optionally either hide or turn the source object to Bounding Box display so you can see the particles better
*Renames the PRT Volume according to the source object’d name.
As I mentioned, it is currently not linking the PRT Volume to the source, but the [>] menu contains that option.
So you see just in the PRT Volume case you are missing half a dozen useful adjustments!
And we have a lot of other tools (esp. the assign Krakatoa / revert to previous renderer) in the MacroScripts that solve other problems…
That’s great to know, thanks. I’ll do that, as well as set shortcuts in Activetype to launch those macroscripts for Krakatoa (+your other software) Objects I’m used to. I’m just so used to that workflow since Nuke, Houdini, Naiad, Max (with activetype) + others uses it. I find it extremely efficient, and if I don’t remember a command I can just type in the letter I do remember and the command will pop up in the list. I actually wanted to suggest it as an addition to the Magma Flow editor as while I appreciate the shortcut keys you have implemented, they are so Magma specific. Being able to hit tab, or another specified key, and bring up a small text window that you can begin typing in letters and the nodes will appear, just like the aforementioned software, in a list below would be really nice. I’ll get used to the way Magma Flow does things though – I’m not against it – it’s just a feature I and so many artist I know really like.
I have looked into this (it was suggested before). It might happen, but I find it unlikely that it would help that much with Magma (unless it also scans the description of each node to find keywords the user might be thinking of that are NOT in the node’s name). The number of nodes in Magma is very limited compared to what is in Max. And hitting the [`/~] key (upper left key below [Esc] on US keyboards) pops up the full creation menu. When you are looking for a node, you most probably know what it is for - the general category. Is it a Transform node or a Logic node? Or an Input? So hitting the first key of the category brings you even closer. If you are looking for InputChannel Position, pressing I>C>P is faster than trying to type in “Input”, “Channel” or “Position”… Of course, typing “Pos” could show that same result and would be useful, too… If you need mapping channel 5, I>C>M>5 is probably also faster than anything an activetype-style dialog would give you because typing “map” will show you 100 possible channels and you still have to hunt for the #5 on a long list.
We will see.
The case of Input, if you type in “I” and the first node in the alphabetized list that comes up is Input you just hit enter and it would appear. Or usually at most 2-3 letters are required to get to the node you want.
As for instances where you have multiples words, like mapping channels, you could just hit the arrow right and then type in #5 if that’s the one you were after. You can even use wildcards, so you could do “M*5” and if that’s the only left over that’s all you have to type. Like I said, I don’t dislike the Magma way. I just like switching between software and using the same input methods when possible. Now that so many have adopted this method, I would just enjoy having it in Magma as well. But I completely respect the way you choose to do it for the reasons you find are the best.
First the xmesh manager, and now this! You are super fast at putting these things together and also very grateful that you listen to user feedback! Looking forward to this whenever you’ll have time to get it out, I know you are a busy man.
Here is a first prototype of the MagmaFlow ActiveType tool.
To install, copy the scripts from the zip file into your \Thinkbox\Krakatoa\Scripts folder and start Max. You must have Administrator rights to overwrite those files! Back up the originals first
Please use the latest Krakatoa v2.1.6 to avoid surprises. It won’t work with 2.0.x builds!
Unfortunately, the only way to make it work with the TAB key would require porting the whole MagmaFlow Editor to DotNet, so that won’t happen. Currently, you can access it via the [`/~] key on US keyboards (upper left below [ESC]), or via Ctrl+Spacebar. The mouse pointer must be within the Editor for the keys to work, the tool will appear at the last known mouse position, and newly created nodes will be placed there, too.
You can cancel via [ESC] or by pressing [ENTER] when no valid option is selected. The tool is modal, once opened, you must close it before continuing work in Magma/Max.
The rest should be obvious, but here is some additional info:
You can show all possible operators and options by typing *
Rolling over the name of an operator shows its description as a tooltip.
You can use * as wildcard, but most of the time it is not necessary. If you enter “A”, the tool will automatically search for both “A*” and “A” in the operator names, for "A in Category names, and for “A” in descriptions. Use * mainly in the middle of a word, for example “M*19” shows “Mapping19”…
If one or more valid options are found, the top option will be automatically selected and pressing [ENTER] will create that. If you want to select another option, press the Down Arrow to go to the list. Up Arrow will go back to the text field if you reach the top of the list. You can also single-click with the mouse.
A bunch of additional entries are provided for faster access to special values, and Values in general. The basic colors (and some not so basic ones like “purple” or “turquoise”) can be accessed to create InputVector nodes. Arbitrary Float, Integer and Vector values can be entered to create corresponding InputValue nodes, e.g “7” creates an Integer InputValue of 7, “123.4” creates a Float InputValue, [1,2,3] creates a Vector InputValue and so on.
Entering “Pi” will create an InputValue with the value of 3.14159…, but entering “e” will not create 2.71828… directly because too many operators start with “E”, you have to type in “e const,” to show that entry. A bunch of typical vectors like “Up”, “Down”, “Left”, “Right” etc. and Floats like “Zero” and “One” are also pre-defined.
Any MAXScript global variables could be created. For example, typing in “bobo” will do nothing, but if you go to the MAXScript Listener and enter ‘bobo=42’, entering “bobo” in the Magma ActiveType will create an InputValue with Integer value of 42… Even better, if you have a Box in the scene and want a static InputValue Vector with its position, you can say “$Box001.pos” and a new node with the value will be created (note that this does NOT connect the value to the controller in any way like in old KCM, it just grabs the value from the scene). Similarly, typing in “$Box001.wirecolor” will create a Vector InputValue with the box’ color!
You can enter more than one token separated by space, for example “RED COLOR” will look for either “red” or “color” (logical OR). Using comma will perform logical AND, so “RED,COLOR” will search for both. The search is independent per area, so the names, categories and descriptions are searched independently applying the logical rule to each one. No logical AND or OR is performed between names and categories, names and descriptions, categories and descriptions, these areas are searched individually. Note that the location of the comma plays no role - a single comma turns the whole search string into a logical AND, so “RED COLOR,” does the same as “RED,COLOR”
I am sure there will be some early issues with this tool since it is less than two days old, but I am quite pleased with it so far. It is not faster to use in general compared to the direct keyboard shortcuts, but in some cases it can be quite useful. Krakatoa_Magma_ActiveType_20130105.zip (93.1 KB)
Just wanted to mention that I have never used J.Lim’s version, haven’t looked at his code and until an hour ago, had not even seen the videos on ScriptSpot about what his version does. So what you are getting is my personal improvisation on the theme ActiveType. I saw his version has history, and parts of Magma already have usage history, but I am reluctant to produce a tool that changes the order of results based on previous choices. I feel it would confuse the user if the same strokes don’t produce the same results every time. (in the context of Max object creation though it makes sense).
I personally don’t think history is needed in the context of Magma. I agree with you that it would be confusing in Magma. Thanks again, going to give it a go tomorrow .
I had a chance to start using it today and really dig the implementation. I’ll be using this way to create nodes myself. It’s a really nice touch how you can type in for an example either # (ie. “12”) or #.# (ie “1.1”) and get an integer or float with specified value. You should let Max Underground know or put up a separate topic. I’m sure many artists will like to hear about this addition. I’m very grateful you implemented it. The xMesh loader manager has come in handy as well.