3D Render Picking

Again, this is great stuff. Almost everything is …

Some questions/thoughts/feedback:
In the attached file, the renderPick seems to output coordinates as if the object was centered at the origin. Just pick in “/panel” and look at the red handle in a geoViewer. Tried the different spaces, but couldn’t get it to behave as I want. Any ideas?

Also, when using a panel it’s not possible to interactively adjust/orbit the current camera right in the panel, so painting on an object becomes difficult. So I wonder if this great new picking will also be integrated into the geo viewport?

How is the pick size working? Does the CHOP return the average of the attributes inside the region? Any idea how to visualize the picksize in the panel?

Any plans on supporting custom attributes in the renderpick CHOP?

Is there any way to get the (a list of) point/prim number(s) of the point(s)/prim(s) within the current pick location/region?

Shouldn’t the pickable flag also work for panel based picking? Do we need a separate flag for this?

And finally, how would I put values back into SOP context? For example, when building a simple brush tool which shall deform the surface? Any example maybe?

Attribute Transfer/… could nicely play together with this :wink:
Cheers,
Achim
pick.3.toe (4.28 KB)

Lot’s of good points.

Agreed, we should use the Component’s pick flag for this as well. I can imagine many cases where you’d only want to pick a few key pieces of geometry, not the rest of the scene. ie. a particle system flowing in front…

Or give the geo COMP a panel tab, so we can have different “selectability” for LMB MMB and RMB. Some of the other panel tab parameters might be adapted as well, like “display” doubling the “display flag”, “enable” controlling the main selectability…
By having this selectability in a parameter instead of a flag, we could use expressions to create different select behaviors based on some conditions.

And what I previously forgot, having support for mouse over would be very powerful as well (e.g. visual feedback on rollover indicating whether a geo is selectable, displaying help in a status bar, …)

You’re likely looking for the values in World Space (positions after being transformed by the COMPs that hold the SOP). I’ll be adding that feature soon.

It searches in a circular fashion out from the center of the pick, and returns the first object it encounters.

Yep, I plan on supporting custom attributes.

Not currently no, I think once I support custom attributes this will be do-able by creating a custom attribute that contains whatever info you are interested in.

We are also thinking about having a ‘pick mask’ parameter in the Render Pick CHOP, that was work much like the Geometry parameter in the Render TOP, you would list all of the geos that you wanted to pick on (this would be a subset of the geos listed in the Geometry parameter of the Render TOP. How does this sound to you?

We haven’t looked into this yet.

That would work. Hopefully creating a custom attribute will become easier as well (without a CHOP detour)

So it’s just used to pick an object even if you click slightly outside. It does not, for example, interpolate the point colors of all the point’s inside the pick region, right?

Sounds good, especially if you could enhance the ^syntax a little (/foo/* ^/foo/_bar).

Right, it doesn’t do any interpolation. It’s just to give you a little more margin for error when trying to pick objects, if you want. Useful if you are trying to pick really small objects in particular.

I don’t agree there should be a pickable flag, since one flag isn’t enough. An object may be part of several renders in several views in one frame, where it is pickable in one view but not others. So you control this by making a Render Pass TOP with the same camera and whose geometry scope contains the objects that you want pickable.

I’ll be doing exactly this in a gallery project that I’m updating soon.

In the same way, I don’t agree there should be a pick mask in the Render TOP. The pick is a separate render anyway. Just make it a separate Render Pass TOP. Let’s not jump into this if only optimization is an issue. I think you can do what we need with what’s there now.

On the rollover thing, and I guess the MMB and RMB thing, we could get all that functionality with a new parameter like we have in the Text DAT - the Panel Value that it’s using to initiate the pick. Like the rollover, mselect etc panel values. So you would have several Render Pick CHOPs that would do different things based on different panel values. One for hiliting an object that you roll over by displaying a bounding box and name. One for acting upon a MMB click etc.

Where I want to head with this is toward making a good replacement for our ageing SOP and Geometry viewer using this technology.

So the workflow IF you need some objects pickable and some not is to separate them into two Renderpass TOPs, one with the objects not to be picked, the other with the objects you want to pick. The Render Pick CHOP points to the latter. Sounds fine for now.

Ok we’ll leave it like that for now.

By the way, you can turn off the Render parameter in the Render/Render Pass TOP (on the advanced page) to avoid doing a normal colored render, your picking will still work. That will avoid extra unneeded rendering.

works great, especially with render = off
panel value in renderpick sounds good as well.

OK, thanks. When the point number is available this interpolation can easily be done in a little component.