Instances to Mesh

Plugins linking to this thread: (hide)

Instances to MeshAuthor: Grahame Fuller
Here's a set of compounds for converting an instance particle cloud to a polygon mesh. You can transfer UVs, etc. It's designed to work when you use a group for the instance shapes. Note that if you are using a small number of shapes (small enough that you can reference each one directly), then Guillaume Laforge's compounds are probably faster. You can get them here.

Usage Notes: To use, put Convert Instances to Mesh in an ICE tree on an empty mesh. It works only with the »self« object. You also need to store the shape index on the point cloud and reference it in the compound's ppg. To transfer attributes, attach one of the Transfer compounds to the Execute port — there's one for each component type.

If you transfer the MaterialIDs, then you can use the Copy Materials checkbox. This works only if all objects in the group have identical Materials arrays. The transfer is based on finding locations on the group geometry, so it's best to move the instance masters apart if they overlap. It uses the 2013 version of »Build Array from Set« which supports topology-type attributes. To use it with Softimage v2012, you'll need to replace it with »Build Array from Per Point Data«.


local backup: Convert Instances to Mesh.2.0.xsicompound Convert Instances to Mesh.2.0.xsicompound Transfer Edge Attribute.xsicompound Transfer Polygon Attribute.xsicompound Transfer PolyNode Attribute.xsicompound Transfer Vertex Attribute.xsicompound

grahamef
Posts: 281
Joined: 23 Jun 2009, 21:01

Instances to Mesh

Post by grahamef » 02 Apr 2013, 18:22

Here's a set of compounds for converting an instance particle cloud to a polygon mesh. You can transfer UVs, etc. It's designed to work when you use a group for the instance shapes.

Note that if you are using a small number of shapes (small enough that you can reference each one directly), then Guillaume Laforge's compounds are probably faster. You can get them here: http://www.si-community.com/community/v ... t=1579****

Usage Notes

To use, put Convert Instances to Mesh in an ICE tree on an empty mesh. It works only with the “self” object. You also need to store the shape index on the point cloud and reference it in the compound’s ppg. To transfer attributes, attach one of the Transfer compounds to the Execute port – there’s one for each component type.

If you transfer the MaterialIDs, then you can use the Copy Materials checkbox. This works only if all objects in the group have identical Materials arrays.

The transfer is based on finding locations on the group geometry, so it’s best to move the instance masters apart if they overlap.

It uses the 2013 version of Build Array from Set which supports topology-type attributes. To use it with Softimage v2012, you’ll need to replace it with Build Array from Per Point Data.
Attachments
Instances to Mesh.zip
(12.67 KiB) Downloaded 1028 times

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Instances to Mesh

Post by Bullit » 03 Apr 2013, 07:58

Thanks.

User avatar
Tekano
Posts: 488
Joined: 09 Jun 2009, 14:49
Location: London, UK

Re: Instances to Mesh

Post by Tekano » 16 Apr 2013, 15:37

something wierd happens with this (in 2012) I have it working correctly but not if you set the particle age. basically after the first age is met then the polygon mesh instance objects randomly changes ID around. its simply setting the age limit on the pointcloud with instances breaks the geometry creation process after the first lot of age limits..!

wow :-s

** edit **

nevermind, the age limit was being set on emit rather than to an execute node. changing it from execute on emit to normal execute node fixed this. strange how this works normally but only when exporting to geometry it fails...
Gossip is what no one claims to like, but everybody enjoys.

grahamef
Posts: 281
Joined: 23 Jun 2009, 21:01

Re: Instances to Mesh

Post by grahamef » 16 Apr 2013, 18:35

Glad you got it sorted, Rob, but I agree that does sound weird. If you get a chance maybe you can post a scene and I can take a look.

User avatar
Maximus
Posts: 1104
Joined: 09 Jun 2009, 15:45

Re: Instances to Mesh

Post by Maximus » 18 Apr 2013, 15:16

I'm in need to use this technique but for some reason Its not working.
Trying to figure oout by myself but is a little daunting.

Since i'm not that skilled on ICE i cannot quite understand what I have to do here. I've created a simple scatter of some geometry on top of a torus.
Now i want to convert the instanced scattered pointcloud to mesh.

"To use, put Convert Instances to Mesh in an ICE tree on an empty mesh. It works only with the “self” object." What does it mean "it works only with "self" object"? What am i supposed to do?

"You also need to store the shape index on the point cloud and reference it in the compound’s ppg." How to do this?

Thanks for the help, and for sharing this compound.

grahamef
Posts: 281
Joined: 23 Jun 2009, 21:01

Re: Instances to Mesh

Post by grahamef » 18 Apr 2013, 19:09

Maximus wrote:I'm in need to use this technique but for some reason Its not working.
Trying to figure oout by myself but is a little daunting.

Since i'm not that skilled on ICE i cannot quite understand what I have to do here. I've created a simple scatter of some geometry on top of a torus.
Now i want to convert the instanced scattered pointcloud to mesh.

"To use, put Convert Instances to Mesh in an ICE tree on an empty mesh. It works only with the “self” object." What does it mean "it works only with "self" object"? What am i supposed to do?

"You also need to store the shape index on the point cloud and reference it in the compound’s ppg." How to do this?

Thanks for the help, and for sharing this compound.
I meant that you can only use this compound to set self.topology, it can't be modified to set otherobject.topology.

If you've only got one instance master object, then I suggest that you use Guillaume's compound from here: http://www.si-community.com/community/v ... t=1579****. My compound can still work but it's designed for a group of instance masters.

Anyway here are more explicit steps for using my compounds.

1. Modify your original particle emission so that the integer that controls the shape (e.g. whatever's plugged into the Index port of the Instance Shape node) gets saved as a custom attribute. I'm assuming a default name of Shape_ID but you can use anything you want. In your case if you've just got one shape then just set this attribute to 0.

2. Set up your instance masters to use ICE-based material assignments: assign them all the same Materials array, and set MaterialID (per object or per polygon) to control which material gets used where. Also, make sure that they all use texture projections with the same name -- rename some of them if necessary.

3. Now that everything's prepared, choose Get > Primitive > Poly Mesh > Empty.

4. Create an ICE tree and connect Convert Instances to Mesh to the root. Specify the point cloud and the instance master group. In your case you'll probably need to create a group if you are only using one object. Also, specify the attribute that you used to store the shape if it's not Shape_ID.

5. Plug the Transfer XXXX Attribute compounds into the compound's Execute ports to copy over the attributes that you want. For example, use Transfer Polygon Attribute to copy MaterialID from the masters and write it to MaterialID on the polymesh. You also probably want to use Transfer PolyNode Attribute to copy the texture projection to a custom attribute, and then make sure that the materials use that attribute for the projection (details for that last bit are at the bottom of this page: http://download.autodesk.com/global/doc ... d30e298209. Continue for any other attributes you want transferred, e.g., use Transfer Edge Attribute to copy EdgeIsHard, etc.

User avatar
Maximus
Posts: 1104
Joined: 09 Jun 2009, 15:45

Re: Instances to Mesh

Post by Maximus » 18 Apr 2013, 20:54

Thanks a lot for the detailed info :)

SpaceAce
Posts: 2
Joined: 06 Nov 2013, 17:16

Re: Instances to Mesh

Post by SpaceAce » 16 Apr 2014, 22:35

Making a custom attribute?

How does one go about doing that?

Sorry...not all that ICE savy...

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Instances to Mesh

Post by Bullit » 18 Apr 2014, 13:56

You need to do some research and tuts.

An example:

http://dwigfor.blogspot.pt/2010/12/sett ... butes.html

User avatar
SPJ
Posts: 63
Joined: 14 Jun 2014, 15:38
Contact:

Re: Instances to Mesh

Post by SPJ » 05 Apr 2016, 16:31

I've been trying to work with this compound the last couple of days and I'm having limited success. I know this has been sitting a couple of years now but maybe someone can assist? I've managed to get the merged mesh of the instance geometry, but not the textures for the individual master instances.

So far as I can tell everything is set up the way it needs to be. Several master instances with the same material array and individual material IDs applied in ICE, which successfully feed into the point cloud. It is rendering out random instances of the masters in the pointcloud. I just can't get the textures through to the merged mesh.

I've been getting an error when adding the Transfer Polygon Attribute and Transfer PolyNode Attribute to the Convert Instances to Mesh.

The error stems from the Get Data node immediately after the Get .PolygonLocationOnInstanceMaster inside both compounds. The error is "The point locator reference resolved to a geometry and is invalid". Frankly I'm stuck, and I can't work out how to fix this.

I'm using Softimage 2014 SP2.

I tried Guillaume Laforge's compound as well and got texture projections through to the merged mesh, but could only apply a single shader to all instanced geometry in the mesh. I'd rather figure this compound out as I may use this on a much larger pool of instance assets.

NNois
Posts: 754
Joined: 09 Jun 2009, 20:33

Re: Instances to Mesh

Post by NNois » 05 Apr 2016, 17:14

Hey,
IMO sadly you should give up with all of that...

... and take http://www.mootzoid.com/plugin/emtopolizer2 that's build-in

User avatar
Draise
Posts: 891
Joined: 09 Oct 2012, 20:48
Skype: ondraise
Location: Colombia

Re: Instances to Mesh

Post by Draise » 05 Apr 2016, 19:26

It's a dream.. I wish it was at App store prices... or free...

My currrency is 3 to 1 when it comes to Euros.. :-s

EDIT: Mootzoid definately deserves being paid for what he developed; just on a pure selfish side, I wish I could affort it. It's like a months rent and some to buy it for me.

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Instances to Mesh

Post by rray » 05 Apr 2016, 20:02

Could it be simply that you didn't pick the attribute yet that you want to transfer? (in the Transfer compound's property page)

These compounds worked fine for me except for transferring UVs in the areas around UV island's borders ( because there are several uv nodes on one point, the clostest location lookup often picks the wrong one ----
As a workaround, the lookup position would have to be moved a little away from the point in the right direction so it picks the right one. Finding that right direction is the tricky part)
softimage resources section updated Jan 5th 2024

User avatar
FXDude
Posts: 1129
Joined: 19 Jun 2012, 21:59

Re: Instances to Mesh

Post by FXDude » 05 Apr 2016, 21:03

You might have already stumbled upon some of these, but if it may be of help, these are from the SI list ;


Convert instance with UV and material to polygon mesh - how?
https://groups.google.com/forum/#!topic ... QJmtLc_gzo

Texturing Instances using UVs off underlying geometry
https://groups.google.com/forum/#!topic ... ACEIv7FVwY


And from http://www.rray.de :
ICE Tutorials - Author: Helge Mathee

A collection of ICE Demo scenes created by Helge Mathee for the 2009 Stuttgart FMX conference.

It includes the sample scenes for mt_strandNodes.

Scenes available are: Align Particle, Atomic Model, Camera Projection for Particles, Cob Web, Crowd: Procedural Crabs, Crowd: Two Wheelers, Filter Emission,

FMX Folding Cubes, FMX Growing Flower, FMX Retro Trail, FMX Swarm, Hair Dynamics: Basic Setup, Hair Dynamics: Turbulence, Hair Dynamics: Turbulence Collision, ICE Bezier Deform, ICE Curve Deformer, ICE IK Solver, ICE IK Solver Spider, ICE Roll Deform, Increment Rotation, Instancer Copy UVs, Instancer Kolosseum, Plants Growing on Surface, RBD Bricks Cloning, RBD Cereals PostSimStack, Rolling Gate, Squares Randomly following Footage, States: Bees, States: Tree, Strands Abstract Formula Shape, Tank Chain, Text Dissolve to Particles.

local backup: ice_tutorials_part1.zip (Note that the mt_strandNodes plugin which is part of this backup is not working with current versions of Softimage — use the one above)
(quite an impressive list of types of things from early on from Helge, maybe Canvas one day...)
Instances to Mesh - Instances to Mesh Author: Grahame Fuller

Here's a set of compounds for converting an instance particle cloud to a polygon mesh.

You can transfer UVs, etc.

It's designed to work when you use a group for the instance shapes.
Note that if you are using a small number of shapes
(small enough that you can reference each one directly),
then Guillaume Laforge's compounds are probably faster.
You can get them here.

Usage Notes: To use, put Convert Instances to Mesh in an ICE tree on an empty mesh. It works only with the »self« object.
You also need to store the shape index on the point cloud and reference it in the compound's ppg.
To transfer attributes, attach one of the Transfer compounds to the Execute port — there's one for each component type.

If you transfer the MaterialIDs, then you can use the Copy Materials checkbox.
This works only if all objects in the group have identical Materials arrays.

The transfer is based on finding locations on the group geometry, so it's best to move the instance masters apart if they overlap.

It uses the 2013 version of »Build Array from Set« which supports topology-type attributes.

local backup: Convert Instances to Mesh.2.0.xsicompound Convert Instances to Mesh.2.0.xsicompound Transfer Edge Attribute.xsicompound Transfer Polygon Attribute.xsicompound Transfer PolyNode Attribute.xsicompound Transfer Vertex Attribute.xsicompound

User avatar
SPJ
Posts: 63
Joined: 14 Jun 2014, 15:38
Contact:

Re: Instances to Mesh

Post by SPJ » 06 Apr 2016, 10:42

Thanks for all the feedback guys. I'm going to look at the point rray made firstly, as it could be as simple a fix as you suggest. If thats not where I'm going wrong I will expand to look at other methods suggested by FXdude (thanks for those).

I figured the best industry standard solution would be to get the excellent emtopolizer but this is for a personal project and I can't really go dropping a couple of €ton on this. If I can get a commercial job where mootzoid tools would be useful I'll be on it like Sonic!

User avatar
SPJ
Posts: 63
Joined: 14 Jun 2014, 15:38
Contact:

Re: Instances to Mesh

Post by SPJ » 06 Apr 2016, 12:44

OK yes, nice spot rray, I missed specifying the particular attribute...so stupid... I thought everything transferred wholesale by using the compound.

So I am trying to work out the correct way of transferring the texture projections. On the Transfer PolyNode Attribute I am not sure what to select as the source and write to options. Do I choose the Texture_Projection (Cubic) or Texture_Coordinates... and what is the correct item to choose for write to. I tried clicking a few options but the compound goes red and I encounter errors.

On a second point:
I've also noticed the MaterialID transfer is now working by choosing MaterialID on both attributes but I am getting attribute 0 on every surface. I'm still looking at this and I feel I might be able to solve this one. Thought I'd throw it out there too anyway as you have successfully worked with this rray.
Attachments
Screen grab of attribute options
Screen grab of attribute options

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests