ICE delete neighbouring particles

310 views
Skip to first unread message

Chris Marshall

unread,
Mar 13, 2012, 12:08:44 PM3/13/12
to soft...@listproc.autodesk.com
Hello list,
I have an ice cloud with many pairs of particles very close to each other. How can I delete just 1 of each of those pairs? What I'm finding is if I test the distance to neighbours and delete if they're closer than x amount, both particles get deleted, but I want to retain 1 of them.
Thanks
Chris




patrick nethercoat

unread,
Mar 13, 2012, 12:17:55 PM3/13/12
to soft...@listproc.autodesk.com
first thought (probs a better way?) put both IDs in an array > get array min or max > if == ID, delete point?

Rob Chapman

unread,
Mar 13, 2012, 12:18:53 PM3/13/12
to soft...@listproc.autodesk.com
Hi Chris,

heres how I do it, originally butchered someone elses compound, don't even know whose it was originally but this works ok





On 13 March 2012 16:08, Chris Marshall <chrisma...@gmail.com> wrote:
delete_overlapping.jpg

Chris Marshall

unread,
Mar 13, 2012, 12:45:43 PM3/13/12
to soft...@listproc.autodesk.com
hmm, yeah just trying to figure that out.
--

Chris Marshall
Mint Motion Limited
029 2002 5762
07730 533 115


Chris Marshall

unread,
Mar 13, 2012, 12:46:29 PM3/13/12
to soft...@listproc.autodesk.com
OK that's great. Will give it a go.
Thanks!!

patrick nethercoat

unread,
Mar 13, 2012, 12:51:14 PM3/13/12
to soft...@listproc.autodesk.com
sorry for the rushed version, here's a grab:

On 13 March 2012 16:17, patrick nethercoat <pat...@brandtanim.co.uk> wrote:
delete_neighbour.jpg

patrick nethercoat

unread,
Mar 13, 2012, 12:57:14 PM3/13/12
to soft...@listproc.autodesk.com
we don't even need the array, do we?

Grahame Fuller

unread,
Mar 13, 2012, 1:16:04 PM3/13/12
to soft...@listproc.autodesk.com
No, not if you only ever deal with 2 points at a time. However, be aware that by deleting based on ID, you can get cases where point 1 is close to 2, which is close to 3, which is close to 4, etc., and you end up deleting everything except the last point. Although in practice that might not occur enough to be a problem.

gray

From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of patrick nethercoat
Sent: Tuesday, March 13, 2012 12:57 PM
To: soft...@listproc.autodesk.com
Subject: Re: ICE delete neighbouring particles

we don't even need the array, do we?

On 13 March 2012 16:51, patrick nethercoat <pat...@brandtanim.co.uk<mailto:pat...@brandtanim.co.uk>> wrote:
sorry for the rushed version, here's a grab:

On 13 March 2012 16:17, patrick nethercoat <pat...@brandtanim.co.uk<mailto:pat...@brandtanim.co.uk>> wrote:
first thought (probs a better way?) put both IDs in an array > get array min or max > if == ID, delete point?

winmail.dat

Grahame Fuller

unread,
Mar 13, 2012, 1:25:07 PM3/13/12
to soft...@listproc.autodesk.com
Thinking about it a bit, one way you could try to deal with that issue if it occurs is to use Test Random Probability with a True Raitio of 0.5 to decide whether you delete the higher or lower ID. Then if you find bare patches, modify the Seed until you get OK results.

gray

winmail.dat

Chris Marshall

unread,
Mar 14, 2012, 8:39:53 AM3/14/12
to soft...@listproc.autodesk.com
That worked great!
Thanks!


On 13 March 2012 16:18, Rob Chapman <tekan...@gmail.com> wrote:

Byungchul Kang

unread,
Mar 14, 2012, 10:04:41 PM3/14/12
to soft...@listproc.autodesk.com

Hello

This is another way to delete particles overlaped.

I think, It is faster than using Sort Array. Also It's simply.

 

Cheers

Kang

 


------ Original Message ------

Date: Wednesday, Mar 14, 2012 01:09:54 AM
From: Chris Marshall <chrisma...@gmail.com>
To: <soft...@listproc.autodesk.com>
Subject: ICE delete neighbouring particles


Hello list,
I have an ice cloud with many pairs of particles very close to each other. How can I delete just 1 of each of those pairs? What I'm finding is if I test the distance to neighbours and delete if they're closer than x amount, both particles get deleted, but I want to retain 1 of them.
Thanks
Chris





VFX Technical Artist  
@ MBC CG Team [http://imbc.com]
Byungchul  Kang      | 




[NATE] 네이트메일 어플리케이션 출시! 실시간 메일알림, 메일 통합관리 기능 제공 [다운로드]

rsz_SNAG-0003.jpg

Rob Chapman

unread,
Mar 15, 2012, 6:18:39 AM3/15/12
to soft...@listproc.autodesk.com

Thanks will test it out if its faster it stays :)

Message has been deleted

Rob Chapman

unread,
Mar 15, 2012, 1:15:14 PM3/15/12
to soft...@listproc.autodesk.com
Kang,

Congrats yours wins, Im working on lots of particles coming off dots on a texturemap , the total end result is about 5k overlapping particles

the one I posted All threads=273 ms , Top Thread  41ms
Kang's way        All Thread = 251 ms , Top Thread   39 ms

Nice one! and yes it is simpler to understand.

Cheers

Rob 
Reply all
Reply to author
Forward
0 new messages