Particle2Polygon.js

Hi Hiroto,

This script isn't working for me in C3Dv8.0

I'm trying to get a particle array (that has been dropped for a hardbody simulation) to polygons with materials.
I get this error >>
1712085913965.png


Is there any chance you can update it?
Can anyone confirm please?
Also does anyone know another way to get a particle array to polygons with materials.

Thanks in advance!
-- Shift Studio.

Edit: Apparently I've been had this problem in the past (2014). The solution is in this thread >> https://www.cheetah3d.com/forum/index.php?threads/10917/
Still, if the script were fixed that would be even better!
 
Last edited:
I think you need one Particle Array per material.

You don't need a script to convert Particles to Polygons,
just use the command under the Tools menu.

Then switch the Material from the Array to the converted Polygons.
 
I think you need one Particle Array per material.

You don't need a script to convert Particles to Polygons,
just use the command under the Tools menu.

Then switch the Material from the Array to the converted Polygons.

Thanks ZooHead, yes, I was thinking that could be a solution. It's a little more work and ensuring good randomness would be more difficult too.
I used the method described by @Rene66 here >> https://www.cheetah3d.com/forum/index.php?threads/10917/post-92225
That does use the Particle -> Polygon tool. A (working) script could achieve this with less effort though.

-- Shift Studio.
 
If you drag the material to the Particle->Polygon object Cheetah3D will maintain the Shade selections.
How do you generate the Particles in first place?
 
If you drag the material to the Particle->Polygon object Cheetah3D will maintain the Shade selections.
How do you generate the Particles in first place?
Hi Frank, thanks for your response!

The particles are simple sphere-like meshes. They were placed as children in a particle array. Then dropped using Rigid Body dynamics.
I had assigned the materials without specifying a 'shade selection' slot likely by dragging and dropping in Object Mode. When done like that, result of 'Particle->Polygon' no longer has multiple materials.

When materials were (later) assigned a shade selection using polygon selection slots, the result of 'Particle->Polygon' tool still has the slots available to re-assign the material.

Now I now, but will probably forget before the next time I need to do this.

-- Shift Studio.
 
Do the "sphere-like" object has UVs per default? I ask because the Polyhedra objects don't have. Not sure if that's somehow involved.
 
@Frank.
I've attached a .jas file for review.
You'll see there is a 3x3x3 array that I made 'editable'. It has 3 child particles, each with it's own material.
1712705436971.png


When you call Particle->Polygon, there are no materials assigned and no shade selections available either.
Can you confirm that?

This can be fixed by using Shade Selection slots when assigning materials. <- This is what I didn't remember to do.

Thanks, Shift Studio.
 

Attachments

  • Particle to Polygon.jas.zip
    49.9 KB · Views: 8
It´s not working, because you have 3 different materials assigned to Shade Selection: 0 each.
The way it will work: Select first object in the Particle stack and explicit choose Shade Selection no 1 - then select every polygon and drag the material No1 to it - make object invisible. Select second object - choose Shade Selection no 2 - select every polygon and drag material 2 onto it - make invisible - etc - when done turn visibility back on - Call Tools->Particle->Particle->Polygon - turn Particle stack invisible.
Drag first material to Particle Array in Object browser - click on Material tag and choose Shade Selection: 1
Drag second material to Particle Array in Object browser - click on Material tag and choose Shade Selection: 2
Drag third material to Particle Array in Object browser - click on Material tag and choose Shade Selection: 3 - done.
ShadeSelection.jpg
 

Attachments

  • Particle to Polygon4U.jas.zip
    312.7 KB · Views: 7
It´s not working, because you have 3 different materials assigned to Shade Selection: 0 each.
The way it will work: Select first object in the Particle stack and explicit choose Shade Selection no 1 - then select every polygon and drag the material No1 to it - make object invisible. Select second object - choose Shade Selection no 2 - select every polygon and drag material 2 onto it - make invisible - etc - when done turn visibility back on - Call Tools->Particle->Particle->Polygon - turn Particle stack invisible.
Drag first material to Particle Array in Object browser - click on Material tag and choose Shade Selection: 1
Drag second material to Particle Array in Object browser - click on Material tag and choose Shade Selection: 2
Drag third material to Particle Array in Object browser - click on Material tag and choose Shade Selection: 3 - done.
View attachment 39871

Thank you Frank. That's very close to what I did end up doing. It's great that you took the time for this in-depth post so it's easier for the next person or if I ever forget!

-- Shift Studio.
 
Back
Top