PrintOut from Print VOP

   2051   4   0
User Avatar
Member
2048 posts
Joined: 9月 2015
Offline
Hello, I've been trying to get a better understanding of what is going on through in material networks by using the print vop to output values.

I've found using the print function in vex to be very easy in getting data to analyize, but within this material network I'm having a hard time understanding what I am seeing.

In my attached file I have a print vop outputting surface position ( P ).

My source geometry is a grid which has only 16 points, 9 primitives and 36 vertices.

In this case I would assume P (surface position) is related to the 9 primitives and that I would only see a printout of 9 different values.

However, when I go do a render the console goes into a very long printout phase. I know when you print out to console it slows things down. So the final render takes a long time to finish.

But, there is so many values of P being printed out that I am confused as to what these values refer too.

I was guessing that it is something like I get a printout for each ‘render pass’ and that there might be alot of render passes - however many that might be.

And that all is happening is maybe the x number of P values are just repeating themselves in the printout for each pass.

But I couldn't see any repeating patterns.

Any insight that might help me understand the material network and the data within it better is appreicated.

Thanks

Attachments:
Print VOP values.hiplc (159.8 KB)

User Avatar
Member
24 posts
Joined: 7月 2014
Offline
Hello,

You have the print inside a material VOP. That doesn't iterate over geometry points but over (I think) all the render pixels/samples where this material is visible.
User Avatar
Member
2048 posts
Joined: 9月 2015
Offline
Yeah…I wasn't actually interested in getting geometry data.

I'm just interested in trying to glean information from the various individual vops of a network.

But I had/have not context what the outputs relate too.

I had only connected the print to the incoming P value as I thought it would create a situation where I might be able make more sense of what I see being put out to the console.

But what your saying makes semse as to what it is.

I will test this by reducing my camera resolution to a very low setting and see if this reduces the amount of output.

Maybe I will try a 10x10 and if I see 100 lines being output, it's likely as you say related to a per pixel context.

Thank you for your feedback.
User Avatar
Member
2048 posts
Joined: 9月 2015
Offline
Does affect output although not in a way that suggests direct pixel per line output.

Set camera resolution to 10 x 10 and get 31 lines of output for any node printed.
User Avatar
Member
7863 posts
Joined: 9月 2011
Offline
Surface shading doesn't know anything about the geometry on which it is evaluated. A grid with 9 points and 4 primitives does not have 9 ‘P’ values. Mantra is a ray-tracer, each pixel sample represents a ray fired into the scene. If it hits something, the point of intersection of the ray and the primitive surface are used to interpolate point and vertex attributes that are passed to your shader. If no intersection occurs, then the shader is not run; hence no print-out. Each value for ‘P’ represents the position the ray intersected your geometry, in camera space. If you have a 640x480 render with 3x3 pixel samples, and your shaded geometry intersects 33% of screen rays, your shader will be evaluated 912,384 times (for primary rays.)
  • Quick Links