Cop ramp question

   5384   3   0
User Avatar
Member
313 posts
Joined: July 2005
Offline
I am a CG student. I tried to input a ramp from Cop into my texture vop
opimg/img1/ramp1

the node turned yellow and said “cannot have channels which depend on time”.

I tried to import the ramp (from Cop) to both vex shader and rman shader but both nodes turned yellow. does not work!

Does anyone know why? pls help
User Avatar
Member
4140 posts
Joined: July 2005
Offline
There's a fundamental concept you might be missing: when you're working on shaders in VOPs, what you are essentially doing is writing a program, which will need to be compiled, and then called at render time. You can't integrate all the other aspects of Houdini(like animated channels, cop outputs, etc.) directly into the source code because when it comes time to (internally) write out the code for compilation…what does it put for those elements? It needs to be immutable stuff like float and colour inputs, as opposed to pointers to things that can easily animate. Now, once compiled, you can make a SHOP(which is an instance of the compiled shader), and *that* can have references to anything you want…since it's evaluated at render time. Hopefully that's not too obscure. It's like Slim(if you've ever used it) - it sort of lives “alone” in it's own world. You need to put the hooks in your shader to accept that input for evaluation at render time.

So, without knowing exactly what you're doing, here's a guess at how you could approach your challenge: MMB over the Texture Map input of your Texture Map VOP, select Parameter. This will dynamically add a tmap field to any SHOP instances of this shader. Once you've assigned the VEX shader to an object, it's SHOP will have a paramter that you can reference. You can put your op: reference in there, and it works fine. It's worth pointing out that referencing images directly from COPs into shaders might give you aliasing issues, since what you really want is a rat image, which maps the best. Fine for exploring/testing though.

IMHO this is confusing mostly because of the great job they did integrating VEX networks into Houdini. They could have made a standalone program like Slim and there'd never be a misunderstanding. However, there's obvious advantages to having it integrated - for instance you can make real time changes to a VEX network, and it will compile, update down the line through the SHOPs or internal OPs, and you get instant satisfaction without having to manually save, compile, and render.

Cheers,

J.C.
John Coldrick
User Avatar
Member
313 posts
Joined: July 2005
Offline
thanks!! JColdrick!
Thank you for explaining it to me! I just followed the following link to put “opimg/img1/ramp1 ” with the Vex shader. it works but the node still got yellow.
http://odforce.net/wiki/index.php/FrequentlyAskedQuestions [odforce.net]

The main reason why I want to import cop's ramp is I do not find a very controlable ramp vop within the vex shader. (slim is good! I am learning slim as well! Its ramp node gives you so many options, such as , s ramp, t ramp, circular ramp……..)

Well, I should ask, what is the best way to make a ramp in Vex builder?Because there is not much control from “rainbow”vop and no colour adjustment for “ramp” in vex builder. How can I make slim's ramp in Houdini's vexbuilder?
User Avatar
Member
4140 posts
Joined: July 2005
Offline
Yes, I've never been clear on that particular entry over at the wiki - it does appear to be incorrect, or what they may have meant was to do that in the SHOP, as I mentioned. Not sure. I do know that the shaderball actually shows up correct in the VOP editor - it's the render that fails, as you probably know.

Agreed, the ramp VOP leaves something to be desired. There was an ASAD Ramp VOP(called vpRamp) written by Carlos Lemus at his website [visualparadigms.com], but I've noticed it was down for a bit and he's in the process of rebuilding. Perhaps if someone, even Carlos, could point to a copy of that asset…if not, you could try contacting him at that location. It was free and fairly full-featured, as I recall.

Cheers,

J.C.
John Coldrick
  • Quick Links