Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Dress does not fall linearly
#1
Dear Jose,

Again, thank you very much for your help. Gran sonrisa

Finally what we decided to do next:

1) We manually made a copy of the original Blueprint ("blueprintCopy").

2) We generated a temporary blueprint ("blendShapeTemporal"), based on the bakedMesh obtained from the mesh with the blensdhapes applied.

3) We only copy the attributes "positions" and "restPositions" from the blueprintTemporal to the blueprintCopy.
Code:
for (int i = 0; i < blueprintCopy.particleCount; ++i)
{
            blueprintCopy.positions[i] = blueprintTemporal.positions[i];
            blueprintCopy.restPositions[i] = blueprintTemporal.restPositions[i];
}

4) we assign the blueprintCopy to the cloth.

Code:
vestidoCloth.skinnedClothBlueprint = blueprintCopy;

This way we get a blueprint with the positions of the particles based on the mesh with the blendshapes applied, and keeping the other attributes according to the original blendshape.

With that we get the following result:

[Image: blueprint_nuevo_2.jpg]

[Image: blueprint_nuevo.jpg]



Regarding this, we have the following questions:

- Why does the dress not fall in a linear way from the border when the "skin radius" is greater than zero (following the location of the particles defined in the blueprint), but rather falls into the shape of the dress?

- How can we make the dress fall linearly downwards when the "skin radius" is greater than zero, preventing the dress from going inside?

- What is the correct way to copy a blendshape using the Instantiate() method? Could you please give us an example of its use?

- If we only want to change the location of the particles (according to the mesh with the blenshapes applied) and keep the rest of the attributes of the blueprint, is it correct to only copy the "positions" and "restPositions" attributes, or should we copy something else?
Thank you in advance for your help!
PD: Le enviamos por e-mail esta misma consulta en español. Desde ya le agradeceremos su ayuda, pues estamos entrampados con esto. Huh
Reply
#2
(25-08-2020, 07:09 AM)nexar Wrote: Dear Jose,

Again, thank you very much for your help. Gran sonrisa

Finally what we decided to do next:

1) We manually made a copy of the original Blueprint ("blueprintCopy").

2) We generated a temporary blueprint ("blendShapeTemporal"), based on the bakedMesh obtained from the mesh with the blensdhapes applied.

3) We only copy the attributes "positions" and "restPositions" from the blueprintTemporal to the blueprintCopy.
Code:
for (int i = 0; i < blueprintCopy.particleCount; ++i)
{
            blueprintCopy.positions[i] = blueprintTemporal.positions[i];
            blueprintCopy.restPositions[i] = blueprintTemporal.restPositions[i];
}

4) we assign the blueprintCopy to the cloth.

Code:
vestidoCloth.skinnedClothBlueprint = blueprintCopy;

This way we get a blueprint with the positions of the particles based on the mesh with the blendshapes applied, and keeping the other attributes according to the original blendshape.

With that we get the following result:

[Image: blueprint_nuevo_2.jpg]

[Image: blueprint_nuevo.jpg]



Regarding this, we have the following questions:

- Why does the dress not fall in a linear way from the border when the "skin radius" is greater than zero (following the location of the particles defined in the blueprint), but rather falls into the shape of the dress?

- How can we make the dress fall linearly downwards when the "skin radius" is greater than zero, preventing the dress from going inside?

- What is the correct way to copy a blendshape using the Instantiate() method? Could you please give us an example of its use?

- If we only want to change the location of the particles (according to the mesh with the blenshapes applied) and keep the rest of the attributes of the blueprint, is it correct to only copy the "positions" and "restPositions" attributes, or should we copy something else?
Thank you in advance for your help!
PD: Le enviamos por e-mail esta misma consulta en español. Desde ya le agradeceremos su ayuda, pues estamos entrampados con esto. Huh

1) 2)  As stated in the manual, simulation is performed in the solver's local space:http://obi.virtualmethodstudio.com/tutorials/obisolver.html This means that if your solver has non-zero rotation, gravity will not point downwards. Either ensure your solver has the intended orientation, or manually pass a custom gravity vector expressed in world space.

3) Blendshapes are not supported. If you meant how to copy a blueprint, Instantiate() is the way to go. This is a generic method in Unity that works with any objects, including scriptable objects such as blueprints.

4) If you want to create a copy of the blueprint, where only particle positions have changed, you need to copy particle positions and rest positions. However make sure that the mesh used for skinning also has its vertices in the same positions, otherwise skin constraints will constrain the particles back into the vicinity of the vertices during simulation, ignoring any initial positions you set.
Reply
#3
Sonrisa 
Thanks José for your help,

We finally understood that this problem was due to the fact that the particles at the bottom of the SkinnedCloth were trying to take the original position of the mesh without blendshapes.

We solved this problem by baking a new mesh from the original SkinnedMesh with the blueprints applied. And then we assigned this baked mesh as the input mesh for a new blueprint. And then we generated the new blueprint. After that we copy the particle groups.

Gran sonrisa 

Best regards!
Reply