AWS Thinkbox Discussion Forums

Frost - Geometry Planes / Mat IDs

I have a Krakatoa PRT volume that is scattering points into a geometries volume, then I am using Frost to place planes at each point. I need to randomize the Mat IDs of the frost planes from ID 1 to 16.
Does anyone know how I might do this?

We have been using a script that randomized the Mat ID, but it would be cool if I could do it in Frost and keep everything live / procedural.

Thanks,
Bob Dyce

Of course you can do this. The real question is why isn’t it obvious to you that you can do it (looks like we have failed documenting this well) :blush:
thinkboxsoftware.com/frost-r … t_Material
thinkboxsoftware.com/frost-g … hing-mode/

You have several options:

Case A: Using Geometry>Plane built-in primitive of Frost and MtlIndex Channel
In this case, the Plane shape does not have its own random MtlIndex, so you must provide it via Magma in the Particle source.
For example,
*Create a Teapot, a PRT Surface from it with 100 particles.
*Pick the PRT Surface in a new Frost.
*Set Frost to Geometry>Planes.
*Switch the Orientation to Look At Target Object and pick your Camera to look at.
*Select the PRT Surface and add a Magma modifier.
*Set the Magma Output to MtlIndex.
*Connect InputChannel Index into it.
*Insert a Modulo operator and enter 4 in the second socket.
*Assign a Multi-Sub Material to Frost with any number of Sub-Materials.
*Select Frost, expand the Material rollout and set the mode to ID from MtlIndex Channel.
RESULT: Each particle will have a cycling ID between 0 and 3, and the Frost Planes will have the Sub-Material associated with that ID (MtlIndex is 0-based internally, so a value of 0 picks the Sub-Material 1).

Case B: Using Geometry>Custom with external Plane meshes and MtlIndex Channel
*You can repeat the above steps, and your Planes will still appear in the colors set in the Magma.

Case C: Using Geometry>Custom with external Plane meshes and Mesh Face Material IDs
*Assign a Material Modifier to each Plane (or other mesh) picked as Custom Geometry in Frost.
*Set the IDs to 1, 2, 3, 4… on each individual mesh.
*Switch Frost Material mode to “ID from Geometry”.
RESULT: The incoming IDs of the meshes will be retained, and the Multi-Sub Material we created in the Case A will still appear correctly according to these IDs. You can of course assign IDs per face in each mesh, and they will be respected verbatim without any adjustments.

Case D: Using Geometry>Custom with external Plane meshes and ID by Shape Index
A variation of the above approach with less set up involved.
If you want to just pick N meshes without adding Material IDs to each one, you can simply let Frost use the Shape Order (the order of the Custom Geometry on the list) to assign the ID. Thus, the mesh on the top of the list will get the first Sub-Material, the second mesh will get the second and so on.
Just switch Material mode to “From Shape Number”

Case E: Using Geometry>Custom with external Plane meshes and Mesh Materials
*Assign a unique single Material to each Plane picked as a Custom Geometry in Frost. You don’t have to assign Face Material IDs unless your materials actually require it (if they are Multi-Sub Materials).
*Switch the Material rollout to Material From Geometry
*Click “Create Material” button
RESULT: A new Multi-Sub Material will be generated and assigned to Frost, containing the individual Planes’ materials into one set, with the IDs of the shapes matching the order on the Custom Geometry list. This way, you can pick arbitrary geometry with one or more sub-materials, and all of them will be preserved in a compacted Multi-Material, while also managing the Face Material IDs of the meshes correctly to keep the expected distribution.

Hope this helps.

Thank you! Case A is perfect what what I am trying to do.

Believe it or not, this was my first time touching the magma mod…since I mess around in Genome quite a bit, it’s a familiar space. Having played with Genome a bunch,I’m just now realizing the power of the Krakatoa tools for materials (I thought it was just for rendering dust :open_mouth: …it is so much more!)

I’ve build a genome flow that transfers vertex colors from the PRT volume to the scattered frost planes, and I was in the process of build a Genome that assigns random IDs per element.
Maybe this would be another option to add to your list…It feels like using the Magma mod to assign Mat Ids to the PRT volume points and then snagging that data in Frost is probably faster/lighter/simpler.

Can a Magma mod transfer vertex color data from the PRT volume points onto the vertices of the scattered Frost planes? OR is Genome a better use for this task?

As always - you rock. Thank you so much for always coming through with detailed answers!

Thanks,
Bob Dyce

PRT Volume and Frost will do this automagically!

*Create a Plane with 10x10 segments
*Add a VertexColors modifier and paint on the Plane (like sign your name or make a Smiley face with different colors)
*Make a PRT Volume from the Plane - you will see that each particle already shows the Vertex Color!
*Make a Frost from the PRT Volume, then right-click Frost, Object Properties, Vertex Channel Display ON > Vertes Color > Shaded.
RESULT: Your blob mesh will be “painted like the wings of butterfly” (to quote QUEEN’s The Show Must Go On)

*Switch to Geometry meshing mode - your Planes will be painted in the colors of the PRT Volume taken from the original mesh!

Now for the surprise! It works even without a PRT Volume!
*Remove the PRT Volume from Frost
*Pick the Plane you painted on
RESULT: Your Frost will STILL get the vertex colors from the Plane vertices!

To render, you obviously need a Vertex Color Map in your Material.

And yes, Krakatoa MX and specifically the Magma Modifier are a HUGE booster of Frost’s capabilities.

You would use Genome to steal the vertex colors only if you want each plane to have different colors at every vertex. If one color is enough for you, just use the automatic propagation of Vertex Colors through our toolset.

It slices, it dices, it makes toast! :slight_smile:

For our usage (fluffy clouds) we are getting better results from genome because it blends the vertex colors on the from multiple points onto the frost instanced planes based on proximity.
But it’s pretty cool to learn all of the stuff you can do with frost and PRT data. I was only seeing a small percentage of the full functionality!

Thanks again,
Bob Dyce

Privacy | Site terms | Cookie preferences