replacing particles instances by high res versions at render

Discussions about SOFTIMAGEs© Interactive Creative Environment©
seb4d
Posts: 21
Joined: 22 Oct 2012, 10:37

replacing particles instances by high res versions at render

Post by seb4d » 08 Nov 2012, 15:26

High,
long title :)

What I am doing is simulating a lot of particles colliding with each other in a same pointcloud. I have high detailed meshes instanced and I use Exact Shape collisions. Problem is it's too slow, so I made low res versions of the meshes, which works well. Now I need to replace those low res meshes by high res ones for render.
I don't know how I can do that, any idea ?

User avatar
SamHowell
Posts: 364
Joined: 09 Jun 2009, 12:09
Location: Birmingham

Re: replacing particles instances by high res versions at render

Post by SamHowell » 08 Nov 2012, 16:05

Cache your simulation and create a new Pointcloud with that cache loaded into it. Create a new ICE tree and set your cache simulation to use the high res instance you originally had witha set instance node or something similar.

face
Posts: 57
Joined: 10 Jan 2010, 11:28

Re: replacing particles instances by high res versions at render

Post by face » 08 Nov 2012, 16:38

Cache the simulation and load it back in a empty pointcloud. Then you can set the instance shape with what you want...

face

seb4d
Posts: 21
Joined: 22 Oct 2012, 10:37

Re: replacing particles instances by high res versions at render

Post by seb4d » 09 Nov 2012, 09:29

Thanks for replies guys.
I'm afraid this is not as easy as that. The problem is I use several different meshes in my pointcloud (different types of cereals) and I need to control exactly where each cereal is emitted from. So I made an emitter for each one in my scene. Everything is in the same pointcloud so that they can collide.

So I can't apply an instance shape in a new pointcloud with the cached simulation. It won't be the same.
Is it possible to store some kind of custom data in the cache, so that I can use it later to identify which particle use which cereal mesh ?

face
Posts: 57
Joined: 10 Jan 2010, 11:28

Re: replacing particles instances by high res versions at render

Post by face » 09 Nov 2012, 10:19

You can create an empty pointcloud where you read in the positions from the lowres cloud to add new points.
Create also a custom data in you lowres cloud where you write in the shape id.
In the new cloud, use a closest location on the lowres cloud to find the data you need to drive the things you need, like orientation, size, color and your custom shape id.
This shape id can be used to select the shape you want. I would prefer a select case.
You can also drive a instance group, but the highres group can have a different order so that the select case is the better choice.

In the example, i have used the shape id to drive the color of the particles.

face
You do not have the required permissions to view the files attached to this post.

seb4d
Posts: 21
Joined: 22 Oct 2012, 10:37

Re: replacing particles instances by high res versions at render

Post by seb4d » 09 Nov 2012, 16:09

yeah !
Setting a custom data and using Select Case works like a charm, thank you so much for your help !