Jump to content

Stamp expression from COP to SOP?


Recommended Posts

Hi all,

I have asked the same question on sidefx forum .... but no one respond to it....

I have a copy SOP with a stamp attribute.

And I have a COP network with a font. I want to make a stamp expression on this font node.

I used this expression with back tick: `stamp("../../../obj/sphere_object1/copy1", "POSX",0)`

I used this COP output as Color Map for my material!

But the stamp expression passes only the "0" to the material!?!?

What is wrong with my expression?

Thanks

Nico

StampToCOP.hipnc

Link to comment
Share on other sites

  • 2 weeks later...

I'm very new to Houdini but i think it's impossible cause you're creating one plane with Font COP and try to loop (stamp is a kind of loop, right?) through all your primitives to get their attribs.

I'd better create detail string attrib == list of all your prim attribs as strings (Python) - something like "1.212 2.4656 32.355 5.643" and then create plane with Font COP with `details(SOPnode, attrib)` as text and then shifted UVs per grid to get only portion of the texture.

Edited by bloomendale
Link to comment
Share on other sites

I'm very new to Houdini but i think it's impossible cause you're creating one plane with Font COP and try to loop (stamp is a kind of loop, right?) through all your primitives to get their attribs.

I'd better create detail string attrib == list of all your prim attribs as strings (Python) - something like "1.212 2.4656 32.355 5.643" and then create plane with Font COP with `detail(SOPnode, attrib, 0)` as text and then shifted UVs per grid to get only portion of the texture.

Sounds possible but a lot trickier than a simple stamp. Could you make a hip for us to examine?

Link to comment
Share on other sites

I think the worst problem here is that the shader has an op:/ path for the image, and that image is supposed to change per primitive.

When the shader is run inside mantra, it no longer has knowledge of the processing inside Houdini. So, even if the stamping worked, you wouldn't be able to render it.

You would need to have many individual texture map images.

If you put the COP net inside a foreach loop and trace the results, the stamping does work. A crude example attached.

StampToCOPe.hipnc

Link to comment
Share on other sites

I think the worst problem here is that the shader has an op:/ path for the image, and that image is supposed to change per primitive.

When the shader is run inside mantra, it no longer has knowledge of the processing inside Houdini. So, even if the stamping worked, you wouldn't be able to render it.

You would need to have many individual texture map images.

Thanks eetu for the hip. This proves that the stamp actually works inside cops but we can't have the varying attribute (the texture in this case) in a shader. So I guess the only option here is to render many individual texture maps from cops and then reference them in the shader with a stamp, right?

Link to comment
Share on other sites

Thank you eetu for your effort ....

There are always ways around to solve a problem .... you need only creative problem solver like you - eetu :-)

Thank you!!!

..mm... if you don't need your text as a texture on planes (what you initially tried to do) then why not using simple Font SOP??

Link to comment
Share on other sites

@bloomendale: You are right ... I didin't looked right at the scene from eetu ..... I thought he solved the problem with the foreach node ....

I want to use a texture on planes!

Edited by Nico
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...