Jump to content

Search the Community

Showing results for tags 'ninput'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Lounge/General chat
    • Education
    • Jobs
    • Marketplace
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering
    • Compositing
    • Games
    • Tools (HDA's etc.)
  • Coders Corner
    • HDK : Houdini Development Kit
    • Scripting
    • Shaders
  • Art and Challenges
    • Finished Work
    • Work in Progress
    • VFX Challenge
    • Effects Challenge Archive
  • Systems and Other Applications
    • Other 3d Packages
    • Operating Systems
    • Hardware
    • Pipeline
  • od|force
    • Feedback, Suggestions, Bugs

Found 1 result

  1. Hello houdini-community! I'm trying to create an outline filter using vex. You can find the code below, I copied it from the SideFX-Forum. I put the code in a vfl file and compiled it to a hda-file using vcc. Then, I imported the HDA into a simple project, got a Render compositing node and wired its output into my custom outline-node. As a result I just get a completely black image. I've looked into the components of the matrix3 that ninput returns and they are always just 0, although my render-output has almost no black pixels. Is there anyone who has an idea what I might be missing? Any help is highly appreciated! Edit: I fogot to mention that I tried to get the same result using a Convolve Compositing Node with the same kernel as used in the code. That works. However, this is just an experiment for me I really want to know how to implement such a filter using VEX. cop2 outlines(float effect = 1) { matrix3 kernel; matrix3 pixels; vector4 col; float result; int i, x, y; col = 0.0; // this builds a kernel with -1/8 in all elements but the center, which is // +1 (an edge detect kernel, sums to 0); for sharpen, use effect+1 // for the center pixel kernel = 0; for(x=0; x<3; x++) for(y=0; y<3; y++) setcomp(kernel, -effect/8, x,y); setcomp(kernel, effect, 1,1); // iterate over all components in the current plane (PL) for(i=0; i<4; i++) { pixels = ninput(0, PL, 0, i, IX, IY, FR); // sum the results of the kernel x pixels result = 0; for(x=0; x<3; x++) for(y=0; y<3; y++) result += getcomp(pixels,x,y) * getcomp(kernel,x,y); setcomp(col, result, i); } assign(Cr, Cg, Cb, C4, col); }