Jump to content
Rikrok

COP network as texture reading surface attributes

Recommended Posts

I'm trying to get scrolling text across various primitives. That in itself was ok, using the shader to reference the cop node op:/obj/geo1/cop2net1/font1

My problem is getting the text to say different things based on a primitive's attribute. In the font node I'm reading a text file, and I want to be able to control which line it reads. I have a primitive attribute ($LINE), but putting that in doesn't work. I also tried..

prim("../../randomnode",$PR,"line",0)

which crashes Houdini (works if I replace $PR with a specific primitive number, but of course that's useless).

So eventually I gave up and created multiple font nodes each manually set to read a different line (far from ideal as they'll need to be hundreds) with the idea that in the material I can read the line attribute and append that number to op:/obj/geo1/cop2net1/font

Doing that within the material VEX builder doesn't work (mantra: Unable to load texture 'op:/obj/geo1/cop2net1/font1')

Promoting the texture and putting this in doesn't work either

op:/obj/geo1/cop2net1/font`prim("../../randomnode",$PR,"line",0)`

Please help!

Share this post


Link to post
Share on other sites

I had a similar problem the other day, I wanted to vary COP parameters with stamping from a copy SOP. I ended up using it to drive VOP attributes inside the shader directly instead. I 'd like to hear from someone who actually made SOP generated attributes work in COPS. There's also this thread that could help you:

ression-from-cop-to-sop/page__hl__+cops%20+stamp#entry95909

  • Like 1

Share this post


Link to post
Share on other sites

I had a similar problem the other day, I wanted to vary COP parameters with stamping from a copy SOP. I ended up using it to drive VOP attributes inside the shader directly instead. I 'd like to hear from someone who actually made SOP generated attributes work in COPS. There's also this thread that could help you:

http://forums.odforc...15510-stamp-expression-from-cop-to-sop/page__hl__+cops%20+stamp#entry95909

I had the exact problem before with stamping in COPs too.

Share this post


Link to post
Share on other sites

Damn.

So I've resigned myself to having the COPs write out loads of images, the problem is this will need to be done frequently with lots of nodes. To save clicking render 100 times every time the text needs to change I had the idea to merge all the font nodes and then write to exr using layers to store the planes. It works in that I can see all the different text in their own layers in Nuke, but is it possible to access exr layers in a shader?

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

×