Jump to content

Stamp strings on a copy sop


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...