AWS Thinkbox Discussion Forums

How to access Selection Channel?

Hello,

When I mesh geometry with some verts selected, I would think that you could take the corresponding Xmesh loader, throw an edit poly in sub-object mode with vertex selected, check use stack selection and the verts selected would again be selected on the loaded xmesh. This does not seem to work…but surely,if we’re ‘saving’ various channels, they must be accessible.

My question is: How do we access the saved selection channel after an object has been meshed and loaded into an xmesh loader? I would like to be able to move that selection up the stack to be affected by modifiers.

Thanks,
Bob Dyce

Does it work if you use an Edit Mesh modifier instead of an Edit Poly modifier?

It does not seem to work with a edit mesh.

Since Xmesh turns the mesh to triangles, effectively changing the topology, I could see where the selection might get lost.
That then begs the question - why save the selection information? I haven’t played around with it yet, but it’s possibly accessible through Genome.

B

Watch my video, it shows how Genome can access and modify it…
youtube.com/watch?v=BBNqinmSAKI

Thanks - very informative!
I added a ‘Turn to Mesh’ modifier and it does exactly what I was looking for.

Cheers,
Bob Dyce

Is it possible to assign different selections to different vertex channels?

Not sure I follow.
Can you give an example of what you are trying to achieve?
In general, you can always abuse a Mapping channel to store per-vertex info, and you have 99 of those, plus VertexColor.
You can then use either Genome or VolumeSelect with a Vertex Color Map to turn the Mapping into Selection again.

I have two objects one following the other and they are each making a selection. Using your technique I can get a nice trail. But what I would like to do is apply a push to one of the selections and a noise to the second selection if I could use that channel in a blend material by using a vertex color map that would be ideal.

I guess this is what I want to do but I wasn’t clear how to specify which channel to store to.

“Mapping channel to store per-vertex info, and you have 99 of those, plus VertexColor.
You can then use either Genome or VolumeSelect with a Vertex Color Map to turn the Mapping into Selection again”

Here is a simplified example:
GNM_MultiSelection_Max2010_v001.zip (17.1 KB)

I have a plane with two Genome modifiers set to Face Corners mode which gives you access to the Mapping channels.
In the one Genome, I calculate the distance to the surface of a Geosphere and if the value is negative, I set the output to 1.0, otherwise to a falloff between 1.0 and 0.0 at a specified distance. The one Genome writes to Mapping2, the other to Mapping3. You can even visualize the values of either one using the Object Properties > Vertex Channel Display set to Map Channel Color > 2 or 3.

At this point, you could animate your Geospheres and save to XMesh with Mapping2 and Mapping3 on the list of channels to save.
I did not use XMesh here, I just added Vol.Select modifiers reading channel 2 and channel 3 and converting the color values to Vertex Soft Selection again on the stack.

But you can do the same on the XMesh Loader - add a Vol.Select, set to Vertex level, add a Vertex Color Map and set to channel 2. On top, add some deformation modifier like Push. Then add a second Vol.Select, set to Vertex level, add the same Vertex Color Map and set the channel to 3 in the Vol.Select itself. On top, add a Noise modifier.

This way, each Mapping channel represents a separate selection channel!

You can also merge the separate selections into one by simply setting the second Vol.Select to Add mode. This way, the Push would be applied to Mapping2, and the Noise to both Mapping2 and Mapping3 “selection” channels…

Hope this helps.

Thanks! that helps immensely. Am I right in assuming you can only assign the selections to specific mapping channels through Genome only?

We used to have dedicated modifiers to copy channels around, including Selection To Mapping and Mapping To Selection back in the VFX days. That’s why we wrote Genome, to get rid of the need for individual plugins that perform these simple types of operations. AFAIK the only way to copy Selection to a Mapping channel dynamically is Genome, but I could be wrong. I could not see any alternative solution on Maxplugins.de, but I could have missed it.

With this method it dosen’t seem to save the selection cache to the particular channel. In the example you provided I thought each selection cache would be saved to mapping channel 2 and 3 respectively. But when I use the vol sel to access the channel it just shows the current selection and not the history. I thought there might be a way to turn the selection into a mapping using genome again. Is this happening because the selection cache is being stored in vertex selection rather than the mapping channel?

bump :blush:

You save each selection to a different Mapping channel, and each Vol.Select can restore a different selection from a different Mapping channel by setting the “Mapping Channel > Map” spinner in the Vol.Select to the respective channel. The channel settings of the actual Vertex Color Map assigned to the Vol.Select are ignored.
You don’t need Genome to set the selection back from the Mapping, although you could set up one. It is just more complicated than using Vol.Select.

I assume you did not set the Mapping Channel of Vol.Select correctly if you are not seeing the results. Explore my file and see how it is done.
If you save an XMesh with multiple Mapping Channels containing multiple selections, you can then add two or more Vol.Select modifiers to the XMesh Loader, pick the same Vertex Color Map, set each Vol.Select modifier to a different Mapping Channel, and you will be loading two or more different selections back from the XMesh sequence. If the higher Vol.Select is set to Add instead of Replace, you can even combine selections. Or you can Subtract the one from the other.
Any modifiers placed on the stack between the Vol.Select modifiers will be getting the selection coming from the Vol.Select lower on the stack. So you can apply a push based on one Mapping Channel / Vol.Select, then a Noise based on the next Vol.Select with a different Mapping Channel.

If you want a list of numbered steps to perform, I can gladly provide one. Or I could record a video tutorial, but today and tomorrow I have Stoke webinars, so I might not have the time.

Hi Thanks for the explanation. I will give it a go again. I was able to restore the different selections but not the selection history of each sphere i.e.the selection trail of each sphere. The selection history was saved to the xmesh but I couldnt isolate it per mapping channel.

Privacy | Site terms | Cookie preferences