Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Can I attach particeattachment in script?
#8
(13-09-2024, 09:00 AM)gahyun11 Wrote: 1. How can I see generated obi skinned blueprint's groups through unity editor inspector?
I know I can just click "Edit"Button in the generated obi skinned blueprint inspector

They're right there under "Particle groups". You can click "select" on any of them to select/visualize the particles that are part of that group. You can also select a group and click "Set" to replace the group with the currency selected particles. Here's an example where I created 2 groups:

[Image: O2J3ipS.png]

(13-09-2024, 09:00 AM)gahyun11 Wrote: But if I click "edit" button I see nothing like a screenshot below. I just generated this blueprint and see nothing in screen. It happens occasionally, I still dont know reason.  I clicked "Done" button after I generated bluepriint in blueprint generating scene(I don't know if this is right term but)

Make sure your exported cloth mesh is not extremely small. Seen this issue before with users that export their meshes with a huge scale transform value (100 or 1000) but the actual mesh data is tiny, barely visible unless the scale transform is applied. See this video on the subject:

https://www.youtube.com/watch?v=5j7k_tJUSJc


(13-09-2024, 09:00 AM)gahyun11 Wrote: 2. Neither they or I never created any particle groups in all obi skinned cloth's obiskinned blueprint assets, but some of the cloth blueprint have no particle group or 1 particle group with name "all" randomly. Is this normal? Or is this something mistake that we made while using obi?

Cloth particle groups are not automatically created. Maybe you clicked the "+" sign in the list of particle groups by mistake?

(13-09-2024, 09:00 AM)gahyun11 Wrote: 3. while generating obi blueprint, we need to scale stretch scale and stretch compliance to expand and shrink cloth during runtime, but while this process, cloth should be fixed on waistline(for example). And I understood that, to fix cloth on body, we need to use particle attachment on obi skinned cloth and pin constraint on body, at the same time there has to be a particle group in cloth.

You just need the attachment, and a particle group to specify which particles in the cloth are attached. In your case, the ones around the waist. So you must select the waist particles, and create a particle group out of them.

However since you're using skinned cloth, why not just set the skin radius for those particles to zero, instead of attaching them? this will force them to follow the body's skeletal animation with no room for movement.

(13-09-2024, 09:00 AM)gahyun11 Wrote: I wish our team can set particle group for every cloth asset that we have, but we are running out of time, so we need to figure out where the "waist line" particles are in obi skinned cloth blueprint and how to group them as particle group through the script during the runtime. I could get each particle position of obi skinned cloth blueprint through script using "skinnedClothBlueprint.positions", and stuck to figure out which particles of blueprint are top row paticles or not(please check the screenshot below) so we can set them as a particle group through the blueprint. It looks like every row of particles has same amount particles in obi skinned blueprint after generating blueprint following cloth mesh's triangles. Is there any way to figure out top row particles when obi generates blueprint of skinned cloth? 

You can just pick the particles with a position.Y value largest than the rest, or larger than a specific threshold. Then you can create the group programmatically, using the indices of these particles.

kind regards
Reply


Messages In This Thread
RE: Can I attach particeattachment in script? - by josemendez - 13-09-2024, 12:31 PM