FAQ FAQ      Search Search      Memberlist Memberlist      Usergroups Usergroups      Register Register      Profile Profile      Check private messages Check private messages      Log in Log in     

unique selection of primitives

 
Post new topic   Reply to topic    Houdini Forum Index -> Houdini Indie and Apprentice
View previous topic :: View next topic  
Author Message
vigneshkaushik
Lurker


Joined: 06 Sep 2010
Posts: 10
Location: singapore

singapore.gif
PostPosted: Sat Feb 18, 2012 8:02 am GMT    Post subject: unique selection of primitives Reply with quote

hi,

attached is the .hip file. it contains a node called GENOTYPE. this node selects 64 primitives from a pool of 1000 primitives. however, im unable to find a solution to make it a unique selction for all the 64 primitives. for eg. all the 64 prim must take unique positions within the pool of 1000 and must not overlap. how to do this??

Pls help me with this problem!! thanks a tonne!

cheers
vignesh kaushik



programrelationship.hipnc
 Description:

Download
 Filename:  programrelationship.hipnc
 Filesize:  85.87 KB
 Downloaded:  49 Time(s)


_________________
Cheers
ViSiKa
Back to top
View user's profile Send private message Send e-mail
tamte
Houdini Guru


Joined: 16 Jul 2007
Posts: 1498
Location: New York

slovakia.gif
PostPosted: Sat Feb 18, 2012 9:10 am GMT    Post subject: Reply with quote

is that selection purely random?
for now you have 64 parameters which you can set up individually so it's up to user to fill in unique numbers

but if you want just unique 64 random values out of 1000 you can look at this altered file, there is also seed parameter on orange node to get different 64 unique prims



programrelationship_rand.hipnc
 Description:

Download
 Filename:  programrelationship_rand.hipnc
 Filesize:  88.77 KB
 Downloaded:  47 Time(s)


_________________
Tomas Slancik
VFX Artist
Method Studios
Back to top
View user's profile Send private message
vigneshkaushik
Lurker


Joined: 06 Sep 2010
Posts: 10
Location: singapore

singapore.gif
PostPosted: Sat Feb 18, 2012 9:41 am GMT    Post subject: Reply with quote

thanks a lot for your input. however, this is not exactly random. it starts with a random population which the user defines. but then the algorithm will change the value, evaluate it, then again change value and evaluate it in an evolutionary process, until it satisfies my evaluation criteria. so it is imperative that i dun end up with a random selection everytime, then i wud not be anywhr close to the solution.

Hence when the algorithm alters the GENOTYPE node, there shouldnt be any overlapping selection. all the 64 genes must have unique number. is thr a way for the GENOTYPE node to check itself for its unique gene_no??

thanks a bunch!

_________________
Cheers
ViSiKa
Back to top
View user's profile Send private message Send e-mail
asnowcappedromance
Houdini Expert


Joined: 15 Jul 2009
Posts: 489
Location: Vancouver

canada.gif
PostPosted: Sat Feb 18, 2012 3:45 pm GMT    Post subject: Reply with quote

I'm not exactly sure what you're after,
but you could evaluate those gene numbers in a Python script to see if they're unique or not. I'd create an empty list and do a simple if statement, i.e. if i not in list(): to append 64 random values in order to fill it. You could also create another argument to only append primitives that are not within a certain distance of the primitives that are already in the list, in order to avoid overlapping faces.

regards,

Manu

_________________
http://vimeo.com/user2522760
Manuel Tausch
Senior FX TD - Rhythm & Hues Vancouver
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Houdini Forum Index -> Houdini Indie and Apprentice All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


phpBB component v1.2.4 RC3 by Adam van Dongen. Based on phpBB © 2001, 2002 phpBB Group