Intersting Optimization with Filters

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Post Reply
User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Intersting Optimization with Filters

Post by gustavoeb » 09 Feb 2012, 07:45

Hi guys, I was messing around in ICE tring to build my own version of Helghe's Pixel Particles... Since I'm doing it all in ICE (as opposed to Custom ICE Nodes in C++), and since there is a fair bit of calculation involved it turned out to be very slow.

I therefore had to extensivly use Performance Timers (which are freaking awesome to have by the way) to find the bottlenecks... One of them was related to a bounding box calculation where I evaluated 4 different conditions (>x, <x, >y, <y) together with a AND node (first image).
I found out a much better way to do that is to filter out the data for every condition since it will only evaluate the remainder of the elements in that set. (seccond image). This is great for calculating bounding box, and I found it useful elswere in that ICETree also.

Cheers!
Attachments
Connecting conditions to AND node
Connecting conditions to AND node
andFilter.JPG (54.26 KiB) Viewed 1416 times
Filtering out each step, much better :)
Filtering out each step, much better :)
filterChain.JPG (49.84 KiB) Viewed 1416 times
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

danyargici
Posts: 56
Joined: 09 Nov 2009, 10:58

Re: Intersting Optimization with Filters

Post by danyargici » 09 Feb 2012, 09:57

Great tip! Thanks!

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Re: Intersting Optimization with Filters

Post by gustavoeb » 09 Feb 2012, 13:56

Moderator edit: To not needlessly confuse you all, gustavoeb is refering here to a post of mine, I had already deleted, before he posted his. As I found he was already in the process of posting the video I asked for, in another thread, I deleted that post... - HB

there was a old one already, also related to speed optimizations (yes this is really slow :p):
viewtopic.php?f=15&t=1954&p=15693#p15693

I've updated it with a little video of the compound.
will comment the compound a bit better and share it as soon as I have time for it :)
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: Intersting Optimization with Filters

Post by Chris_TC » 09 Feb 2012, 16:25

Very good tip, thank you!

Post Reply

Who is online

Users browsing this forum: No registered users and 69 guests