Jump to content
Nico

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

Share this post


Link to post
Share on other sites

I had the same issue recently and I'd also like to know why this doesn't work. Anyone?

Edited by Sifis

Share this post


Link to post
Share on other sites

I had the same problem too. From what I know stamping doesn't work in COP context.

Share this post


Link to post
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 `details(SOPnode, attrib)` as text and then shifted UVs per grid to get only portion of the texture.

Edited by bloomendale

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

I had the same problem too. From what I know stamping doesn't work in COP context.

Hmm, I wonder why. That's a good request for the H13 wishlist.

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
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!!!

Share this post


Link to post
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??

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×