AWS Thinkbox Discussion Forums

Setting Particle Visibility

hello

I was eagerly watching the videos about using magma in krakatoa MX and, in the video called “KMX Webinar - The Magma Flow Show - Chapter 2 - Setting Particle Visibility”, you were using Kraktoa delete and
parameter called soft selection.

might you please point out, where are they in MY version?
or how can we achieve the same effect?

and where is selection channel in krakatoa My , I couldn’t find it?

(a suggestion maybe … it might be good to renew the MX magma tutorials for MY too to reflect the capabilities of krakatoa MY. (the industry leading particle renderer deserves this right? :wink: )

and sorry I forgot to ask about, Object query …

in MY version under Object tab there is Element Query which with a geometry input looks like the MX version, but It doesn’t pick cameras as an Object…

The Bad News is Selection channel and Krakatoa Delete are not in the initial Magma release in KMY v2.3.
The Good News is both are on the ToDo list for v2.4.

The workaround using the current version would be to set the Density to 0 instead. A Density channel of 0.0 does not remove the particle completely (it still gets loaded in memory, so it does not reduce memory usage), but it makes it invisible to the renderer, so visually the effect is the same.

Obviously, the Soft-Selection option in Krakatoa Delete (which uses a probability based on the ID channel and the Selection channel’s value) is harder to achieve, but it wouldn’t be impossible.

Thanks for the feedback!
I agree we have to write more KMY-specific tutorials. We will probably have a Webinar for Magma in KMY too.

good new … fantastic… :slight_smile:
you know, I’m super excited about krakatoa for maya …

a strange thing happens when I check Enable playback graph in PRTLoader…
the viewport goes away!!!
I mean, there is no grid… and even opening a new scene doesn’t help!

thank you in advance

Neither does the KMX version of ElementQuery support Cameras as input.
“Element” in 3ds Max lingo is the name of interconnected faces sharing vertices within a mesh object. We used the same terminology in Maya, and obviously ElementQuery expects a Geometry input, not just any scene object.
Since the InputGeometry node can have multiple objects, the second input socket of ElementQuery defines which of them to use. It is a valid output of IntersectRay for example, so if you are shooting at 10+ objects, the ObjIndex will contain the index of the object that was hit, if any. By default is is 0, so if your InputGeometry contain only one object, the ElementQuery will apply to it automatically.
The third input is the ElementIndex, also defaulting to 0. If the mesh contains a single element, that would be enough info.
ElementQuery gives you some basic information about the mesh - the area of the Element, the Volume and the Center Of Mass (Centroid). Non-mesh objects like a Camera do not have such properties for obvious reasons.

In KMX, we have a PropertyQuery node which expects an InputObject. We decided not to implement this node for now, since Maya makes it rather easy to pipe in any property of any scene object using an InputValue and an Expression for its value (see the intro Magma tutorial for an example of reading the radius if a sphere into the flow). This wasn’t as easy in Max, so we needed to add extra nodes to allow the querying of properties. But eventually we might add these to Maya for consistency.

Hope this helps.

This is interesting, I haven’t seen or heard of this before.
What happens if you change the Playback Graph value to something else than 0.0? Is it possible that the data for frame 0 is bad in some way? I tested here by setting the Playback Graph value to -1 (which did not exist on disk), but it caused no problems.

As you probably know, once you check Enable Playback Graph, you need to keyframe the Playback Graph value to provide the time input for retiming purposes, otherwise your particles will not be animated and show the frame listed on the Playback Graph field. It defaults (incorrectly, IMHO) to 0 (because 0 is the first frame in Max), it should have been 1 in Maya. So if your frame 0000 does not exist, or contains infinite/indeterminate values for some reason, it could be an explanation. What kind of data are you loading? PRTs you saved? BIN files? Do they load ok if you try to move to frame 0 with Playback Graph disabled?

that is a serious problem here!!!

when I check Enable Playback Graph … the grid … the view port goes away and shows nothing…
I put it the playback graph to 0 … 10 … 87 … whatever values I put in there, nothing changes…I change the timeline, nothing! … like an empty scene with nothing… even when I create a primitive sphere, It doesn’t show!!
and it is more strange, opening a new scene stays mute like before… until I relaunch Maya, which everything goes back to normal!

and … “particles counts” ,“in view port” is -1 unless I change the viewport load mode to “load using render Mode” which again, nothing in the view port as before but the number shows something!

I’m loading .bin file… but It doesn’t matter if I use .prt file which I have from real flow…

maya 2014 sp3, windows 8.1 64bit.

and please tell me about the property query and why I can’t pick a camera as object to query its view angle to use it with vector dot like you said in the tutorials?
someday maybe, krakatoa Mx and My features would be the same hopefully?
thank you

sorry I missed the part for property query… now I understand…
I’ve read the tutorial about connection via Mel… and for this case I don’t how to connect camera angle to input value… just to produce the same effects like Mx.

This really sounds like the files are corrupted. A count of -1 normally means the file was not written completely (if it is a PRT). I am not sure what it means for BIN files. Any chance you could upload a file to take a look?

I have no experience with Maya’s viewports doing what you are describing, but the same happens in Max when the particle file contains a value that has invalid position (considered infinity or -infinity) - the viewport tries to draw that and gets confused.

It is not normal though, and most probably a problem with the content of the BIN file. Does it load correctly in RealFlow if you start a new scene and try to load it back there?

Even with a PropertyQuery you wouldn’t be able to. While Max has a dedicated FOV property, Maya does not expose its camera angle as a property, only the focal length is exposed. The camera angle is in the UI, but as far as I know is not directly accessible as a parameter. In other words, you would have to read the focal lenght and perform some calculations to figure out the FOV out if that based on the aperture width value. For example
*Create an InputValue node.
*Right-click the value field and select “Create New Expression…”
*Enter the expression

PRTMagma1.InputValue_0_Property2_fValue_Float = rad_to_deg(2 * atan((perspShape.horizontalFilmAperture*25.4) / (perspShape.focalLength * 2)))
This is assuming the InputValue node has ID 0 and you are connecting to the persp camera’s shape. You can change the variables as needed.

I think we should add a dedicated Magma node that, given a camera object, calculates the FOV from the available data.

Hope this helps.

thank you very much

yes It loads perfectly as .bin or .prt files into the new scene…
I should mention that first 22 frames has no particles originally ( does it make difference , I mean the file should have at least a few particles at frame 1 ?) and view port particles shows 0 , and after that everything is as it is.
prt 60 frames.rar (5.04 MB)
bin 60 frames.rar (4.95 MB)

Here is what I could see so far:
*Started new Maya scene
*Created a PRT Loader
*Picked the PRT sequence
*Set Viewport Settings > Percentage of Render to 100.0
RESULT: All particles show up as expected

*Set the Percentage back to 10.0
*Switched the Viewport Load Modes through all options
RESULT: There is obvious discrepancy on frame 38, especially visible in Every Nth and Every Nth By Id, but otherwise no viewport problems.
The discontinuity is caused by two simulations layered on top of each other - frames 1 to 37 were saved on September 3rd, while the rest up to frame 60 are from August 25th. Obviously the particle order and particle ID channel are different, and especially in Every Nth By Id, the continuity of the percentage reduction is based on the particle Ids. So that jump is to be expected. It is visible even with 100%.

The “In Viewport” count showing -1 in “Every Nth by Id” when Percentage is less than 100 looks like a bug to me, will log it.

I tested all display modes including large and small dots, Velocities and Normals without problems. Tangents show nothing because there is no such channel in the sequence.

So now I will need more info from you. Either an exact set of steps how to reproduce the problem including every single setting that might affect the scene, or the actual Maya file that shows the problem.

I am running Maya 2014 release build on Windows 7 so this is the main difference between my install and yours.

I also loaded in Krakatoa MX and could not see any issues with the files there either.

thank you

o.k I’ll look at again, and I’ll send you the exact file which causes problem…

I’ve changed my windows a few days ago and fresh maya installation with Krakatoa…
I wonder is this for window 8.1 ?!! how can It be?

Don’t do anything, it looks like I was able to reproduce it.
Will pass it on to the developers, smells like a bug.

Privacy | Site terms | Cookie preferences