itriix Posted April 21, 2009 Share Posted April 21, 2009 hi all, i'm quite frustrated. i've literally spent days trying to delete one stupid thing. i cannot get it to work. i can locate what i need. store the numbers i need into a variable. and no matter how i try to do it, i can't delete the pattern. example: i have the variable CLASS. i've located CLASS = 0 and CLASS = 2 as being what i need inputted into my DELETE SOP PATTERN... if i have a delete sop set to primitive, and in the PATTERN i TYPE: 0 2... it deletes the correct primitives. but any kind of reference to my "variable" to input the 0 and 2 into the PATTERN, will not work. any help would be appreciated! Quote Link to comment Share on other sites More sharing options...
michael Posted April 21, 2009 Share Posted April 21, 2009 try deleting by expression from the help: Filter Expression (When Operation is Quote Link to comment Share on other sites More sharing options...
itriix Posted April 21, 2009 Author Share Posted April 21, 2009 (edited) hi michael, thanks for the response. i've tried that as well but still no go.... i'm really confused why nothing is working. it seems like it should be so simple. essentially what i'm doing is making procedural electricity. the way i did it, used three lines, the first two lines, have carves that animate back and forth... however, when the carve FIRST U and SECOND U both = 1, i get a problem.... anyways, i then have my third line, which is the electricity, and it's made from originally only two points, where each end point is connected to the 0 point of each of my RAIL CURVES respectively. then i do a copy sop, and make random copies of this electricity on many random sets of 2 curves. so after my copy sop, i noticed the problem electricity SHOOT to the origin, therefore i know there is a point in that group that is at TX TY and TZ = 0... so i tried to set up a group that locates THOSE points. WHICH I DID, and i put them into a group called FZERO... also, after the copy sop i used a connectivity node, set to variable CLASS, to know which points are part of which primitive group. THEN, i branch off to a dead end, where i have a delete sop, which deletes everything but the problem points, so that i can isolate those specific points, CLASS attribute. in my example i found that there were two problem points, one with CLASS == 0, and one with class == 2... so then, i go back to my main WORKFLOW, *not the dead end delete that i just used to find the problem points classes*, and i create a new attribute called DIE. this attribute consists of: fzero is just a node above the attribute, which consists of all of the points. and delte27 is the random, dead end branch, where i isolate the two points, so that i can see their class.... so then i use this expression: i set the DIE variable to 1 if it's class matches one of the delete27 points classes, and 0 if not. if (point("../fzero", $PT, "class", 0) == point("../delete27", $PT, "class", 0), 1, 0) after that i set down my delete sop, set to points, and in the expression i have $DIE == 1 but it won't delete the right thing. but all i do know is that, i've located the THE EXACT pattern that i need. 0 and 2 in this example, and i can put those values into the PATTERN i'd be good to go. if i type 0 2 into pattern it deletes exactly what i want. but i need it to be procedural and based off of what the problem points classes are set to Edited April 21, 2009 by itriix Quote Link to comment Share on other sites More sharing options...
michael Posted April 21, 2009 Share Posted April 21, 2009 hhhrrmmm... an example file might help... and not to derail your work but you might want to look into the l-system SOP, there is a lightning preset that might help... Quote Link to comment Share on other sites More sharing options...
itriix Posted April 21, 2009 Author Share Posted April 21, 2009 i just got it to work! and i'm completely confused why this way worked and all my other ways did not work. right now i'm in super crunch time, so cannot really chat, but i will post my fixes later tonight, because i'd love to discuss WHY this worked and my other methods did not work. i'll discuss in more detail what i did and post an example. thanks for being there to respond though! just that in itself means a lot, J Quote Link to comment Share on other sites More sharing options...
itriix Posted April 22, 2009 Author Share Posted April 22, 2009 (edited) Hi Michael, I've attached a cleaned up, simplified version of what i've been working with. my project uses a running girl model, that i'm creating the trails from and causing the electricity to travel on. i tried the best to clean it up but i left some of my "dead ends", so that maybe you could see where my misunderstandings are... i changed the running girl model to just a simple sphere... anyways to repoint out the problem, i could not get particular things to delete when i wanted them to. i tried many methods, such as, grouping, and creating attributes, then deleting, or even just trying to delete with expressions, patterns.... everything i could think of. and it's very strange to me that most everything i tried didn't work until this final *fairly simple* method that i used. anyways, the way i got it to work was just a different approach of nodes... namely, if you look at my "ELEC 2" network, there is a connectivity -- fzero -- attribcreate_prob --- attribcreate_die -- delete_prob -- delete before anim.... essentially, i found the problem points, and put them into group fzero, then created an attribute, which was called PROB and was assigned $CLASS... I then made another attribute called DIE, which was set to 1 if the PT's Class equaled the PROB Var it was set to 1, otherwise 0... i then used a delete sop to delete anything with a DIE == 1... The thing is, this was very dirty, i was pretty much out of guesses... because it could be cleaner, i think i should be able to stop the problem before it even gets to the copy... example. deleting the actual curves that carved to a value of FIRST U and SECOND U = 1... anyways, this will be for starters. i hope more people will join in to help me understand better methods to approach. and just to start - i'd love to know, why i couldn't get this approach to work based on patterns. example, procedurally, i could verify that i needed pattern 0 and 2 to be deleted. however, i couldn't get this into the pattern to work... im thinking maybe because it was more than one number, so i figured somehow i needed to put this into a string list... but wasn't aware of how i could do that also... another thing i'd really like to know is, i already had the GROUPS, and i already knew that particular groups contained particular problem points, and therefore the whole group needed to be deleted. i feel there was probably a way to delete based on WHAT group the point was from. but couldn't get that to work.... another thing i'd like to know, which is more related to the way i was doing my electricity... if you ever have a chance, i'd like to know if you see my approach as being "wrong"... i know it's not perfect, but it was my attempt. i made three kinds of lightning... but to be honest, i still wasn't able to get it "exactly" how i wanted. but for now, i need to step back from this and move on with the rest of my project. the "delete" problem really set me back a lot of time actually! haha and btw, please the colors, look, feel, is all just for testing... i hadn't even gotten into my look yet... my project entails mixing, energy, lightning, electricity, fluids, smoke... i have many different tests. this was just the electricity Thanks for your time, and all of the support as well Jonathan itriix_wire_and_elec.hip wire_trail_tk03.mov wiret_trail_tk04.mov Edited April 22, 2009 by itriix Quote Link to comment Share on other sites More sharing options...
stevenong Posted April 22, 2009 Share Posted April 22, 2009 Erm... I inserted a Delete SOP between point11 Point SOP & resample19 Resample SOP (the last two black SOPs), turn off Number, go to the Bounding Volume tab, Enable that & no more lines sitting at the origin. Is that what you're looking for? Cheers! steven Quote Link to comment Share on other sites More sharing options...
itriix Posted April 23, 2009 Author Share Posted April 23, 2009 (edited) yeah that's way easier! I think i just got lost in all the nodes! Thanks!!!! Jonathan Edited April 23, 2009 by itriix Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.