tomhanks Posted May 28, 2010 Share Posted May 28, 2010 I am trying to get attribute strings to my copies but I just find out that theres no way to stamp strings in copy sop, correct me if I am wrong but if so, is there a way around it to make it work? Thanks Quote Link to comment Share on other sites More sharing options...
SpencerL Posted May 28, 2010 Share Posted May 28, 2010 I am trying to get attribute strings to my copies but I just find out that theres no way to stamp strings in copy sop, correct me if I am wrong but if so, is there a way around it to make it work? Thanks you can use stamps() for strings and stamp() for float/ints Quote Link to comment Share on other sites More sharing options...
anim Posted May 28, 2010 Share Posted May 28, 2010 (edited) if you are stamping strings, you have to use stamps() expression EDIT: a little slower this time Edited May 28, 2010 by anim Quote Link to comment Share on other sites More sharing options...
tomhanks Posted May 28, 2010 Author Share Posted May 28, 2010 I tried that but it returns floats to me. Also looked on other threads it seems that i doesn`t returns strings, I am just looking for some other way for it to work. My link Any Ideas? Quote Link to comment Share on other sites More sharing options...
anim Posted May 28, 2010 Share Posted May 28, 2010 Copy SOP's stamp variables seem to be only floats, but that's not stopping you from using copystamping and strings, since you'll get different number per copy, you can use it to generate different string per copy or choose from database of strings or whatever just say what you are trying to do, so we can help you Quote Link to comment Share on other sites More sharing options...
tomhanks Posted May 28, 2010 Author Share Posted May 28, 2010 Ok, thanks. I have a crowd of geometries with different textures per character, through my point attributes I got to assign to each one the names of directories that each one will search its textures, since my directories names and files are all strings, so far no problem, when I tried to access this through the stamp technique which I use on the material override for file texture I got stuck, because I want to use something like this: C:\temp\`stamps("../copy1","gender","")`\`stamps("../copy1","skinColor","")`.`stamps("../copy1","shirtColor","")`.jpg And it doesn't work, like I said it returns numbers instead of strings. But now I'll have to rename all to be able to achieve this, even visually it's more difficult to debug. If you have any ideas I would really appreciate, I just hope I could be clear about my problem. Anyway thanks. Quote Link to comment Share on other sites More sharing options...
anim Posted May 29, 2010 Share Posted May 29, 2010 you can generate your replacement strings as string attributes directly on points you are copying onto the name of the attribute depends on parameter on your material you want to override for example for Basic Surface material from palette it would be "baseColorMap" then just check Use Template Point Attributes on Copy SOP/Attribute Tab and put this attribute in To Point/Set parameter, or leave * in there the attribute will be then transfered to the copied geometry you can then promote it to primitive if you want to this approach is usually{/always} faster than copystamping Quote Link to comment Share on other sites More sharing options...
tomhanks Posted May 29, 2010 Author Share Posted May 29, 2010 Hummmm!!! I´ll really try that. Thank you very much! I´ll post what I´ve got later. Quote Link to comment Share on other sites More sharing options...
anim Posted May 29, 2010 Share Posted May 29, 2010 but if that is not exactly what you want and you for example want to stamp Font SOP's Text Parameter so you can see different text per copy based on string attribute of template points you can do this enable Copy Stamping create simple variable: pt | $PT then in Text Prameter of copied Font SOP you can write `points(opinputpath("../copy1",1), stamp("../copy1", "pt", 0), "gender")` it will extract string point attribute "gender" from template point based on stamped value of the "pt" variable 1 Quote Link to comment Share on other sites More sharing options...
tomhanks Posted May 30, 2010 Author Share Posted May 30, 2010 Thanks for the tip. Quote Link to comment Share on other sites More sharing options...
pclaes Posted June 1, 2010 Share Posted June 1, 2010 there is always the strcat() expression too for concatenating strings. I like `` better though. The string on the template points is best imo. 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.