Jump to content

Scatter without selfpenetration


Maciej

Recommended Posts

Hi everyone. My first post.

I`m sorry. I cant post Hip file. (NDA reasons)

I have scene, where I need to copy to points exact amount of pigs (varies between 8-20 - weighted distribution)

Everything is ok, but now I need to rid off self penetrations.

Is there an elegant solution to this problem? (Maybe VEX magic - loop through objects, then move a bit)

I tried following methods so far: 

1. Set pscale by Volum Spheres: It`s legit method, but it works best in 3D. I think it`s little bit overkill.

2. Houdini Simon`s method of subtraction. Its slow (I`ve found HDA which does the same, but in VEX - link: https://mcworldkit.gumroad.com/l/CollisionsRemoval)

I don't have full control how many pigs will be removed though.

 

Thank you for all your help

 

Graph.JPG

Packed.JPG

Unpacked.JPG

Link to comment
Share on other sites

Yes..Well I kinda found a solution.

link.

https://www.youtube.com/watch?v=G5K-0wqEJsU&ab_channel=Entagma

Work like charm, but in order to prevent pigs from rolling and tipping , I had to make bases "warhammer style".

Also I had to turn off RTX features, bc I dont have RTX card.

https://www.sidefx.com/docs/houdini/news/19/vellum.html
Shape match constraints require the latest driver for NVIDIA Ampere series cards. This is version 456.38 on Windows [www.nvidia.com] and version 450.80.02 on Linux [www.nvidia.com].

If you don’t update your driver, you can alternatively set the following environment variable to disable this feature: HOUDINI_OCL_FEATURE_DISABLE=CL_DEVICE_DEVICE_ENQUEUE_SUPPORT. For more information, see environment variables. [www.sidefx.com]

image.thumb.png.50216d9b2101306cb3b763b3db624223.png

The problem is, that it is now simulation based and I was askes to make a sequence of 10K frames in Alembic.

Is there any way to make a script (aka. "action" in photoshop) reset simulation, wait 20 frames, write alebic, change seed, repeat... ?

Link to comment
Share on other sites

On 20/05/2022 at 11:07 PM, konstantin magnus said:

The UV layout node can do this for meshes, eg. from top.

pack.jpg.23c0d17bb292def66e1f43b27ec5862a.jpg

pack_2D.hip

I wish we could have some option to control the orientation of each asset in the UVlayout, so it will try as much as possible to maintain the initial orientation and also output the matrix transformation with pscale of each piece @konstantin magnus .

noIntersectPackByUVlayout.hip

Link to comment
Share on other sites

On 2022/5/13 at 5:19 PM, Maciej said:

Hi everyone. My first post.

I`m sorry. I cant post Hip file. (NDA reasons)

I have scene, where I need to copy to points exact amount of pigs (varies between 8-20 - weighted distribution)

Everything is ok, but now I need to rid off self penetrations.

Is there an elegant solution to this problem? (Maybe VEX magic - loop through objects, then move a bit)

I tried following methods so far: 

if you don't mind using bullet dyn,you can try this way

scatter_without_intersection_od.hip

 

Edited by Benyee
Link to comment
Share on other sites

Hey :) Thanks !

Yes i know this solution too.  But in my case, i m not sure i want to run over 4000 bullets sim  :)

I found how to help by using a pre scatter with wanted orientation, and layout after. Abd also rotating the island of the main direction to follow to further help while also compensating with ratio by few basic math, it's a bit hacky but do the job.

Can't pretend it has the elegance of a @konstantin magnus's solution, but as soon is result is good , fast and consistent , im okay :)

Edited by vinyvince
Link to comment
Share on other sites

thanks, and that's interesting,firstly, you guys' approaches are nice and impressive:D.
the point is,for some particular situations we should select some particular ways to solve the problems,
handily and efficiently. as a matter of fact, it's handy to handle 4000 points(with constraints) with bullet solver,even more.
but how to handle 4000(eat out around 55gb ram?) or 8000 unpacked uv islands and geometries whitout crash risk, that could be unavoidable.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...