Jump to content

Sampling COP node at specific time from SOP


Recommended Posts

Hi all, I've been trying to sample a COP node inside a COP SOP manager to create point attributes.

 

I can do this at the current time no problems, but is there a way to specify sampling a COP at time N?

 

I know you can't directly feed $F into the VEX colormap function but I thought there might be a way around this:

 

  1. I added a For loop SOP
  2. Added my attribWrangle node in the for loop
  3. Added a TimeShift node after the attribWrangle

This works fine for general stuff, I can set attributes in my VEX according to $F and it works as expected with the Time Shift.

 

BUT

 

As soon as I try and use the colormap function Houdini either dies or I get an unhelpful compile error.

 

I know Houdini can do this, I'm also using the Trace SOP which has an option to use a COP node with a supplied frame value and this works perfectly in a SOP For loop.

 

I also tried the AttribfromMap SOP but this is just a VOP SOP network which fails the same way as my VEX.

 

Are there any HDK SOP nodes out there that can sample pixels from a COP node into point attributes?

 

TNKS!

 

G

Link to comment
Share on other sites

THANKYOU!

 

I've been getting a lot of crashes trying to get this to work and read some posts saying it wasn't possible.  I think the crashes were to do with the "Missing Frames" parm on my file COP node since I'm overriding an image and giving a frame range, seems to work on "Use Closest Frame"

 

Well It's all working in a simple test, we'll see tomorrow if it works for realziez.

 

TNKS!

 

G

Sample_COP_Test5.hipnc

Link to comment
Share on other sites

Hey dude, yup I've read some threads here that COPs need some love.  I've also experienced wierdness when writing complex VEX with logic either giving garbage results or soft hanging on a certain bucket.  I'm planning on writing some kind of COPs logic that auto caches my graphs out to images and then pulls those to return to the SOP which may help things instead of evaling the graph per point(?).

 

G

  • Like 1
Link to comment
Share on other sites

When reading COPs back to SOPs once it works, but when I read back and forth in successive iterations, I get hangs generally. I also mentioned here for example COPs have a GPU acceleration option but when using it, Noise related COPs generate rings/artifacts.

 

SESI promotes their COPs but not allocating resources to advance it. Otherwise Mark would easily bring it to the 22nd century (yes future :))

 

OOn3sbt.png

Edited by magneto
Link to comment
Share on other sites

Nope giving up, it does "work" but way to unstable when I try to do any real processing in the COPs (generating normal maps from height maps).  I'm also using a custom image importer which may not be thread safe for all I know.

Link to comment
Share on other sites

I've found a stable workaround for sourcing complex COP graphs in SOPs.  For some reason the Trace SOP seems to be able to reference COP nodes without any threading issues at $F.  I'll post a demo hip when I've got some time.  I suspect this isn't a limitation of Houdini at large, more a VEX colormap problem.

  • Like 1
Link to comment
Share on other sites

OK here's what I have working, it's kinda hacky but been using it for a week or so and seems solid with heavy VEX COP work.  You'll still need to disable threading on composites but that's fine with me as Houdini Engine is limited to a single thread anyway.
 

So I have some COP logic to cache each frame out to disk (and read the disk image if it exists).  The Trace SOP forces the COP to eval when I want it to at frame $F.  The attribWrangle SOP then reads each  image off disk at frame $F.  I've also had this working in loops and and is solid.  You get the added bonus of faster cook times once the COPs have been cached and all this works in Houdini Engine.

 

Hope this helps someone out at some point and please let me know if there's better ways of doing anything in this HIp file.

 

 

TNKS!

 

G

COPToGeo4.hipnc

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...