Jump to content
Sign in to follow this  
mook

Render viewport polygons only

Recommended Posts

Perhaps a bit of a beginner question here. I set up a scene with a ton of visibility nodes keyframed throughout to hide and expose certain polygons as the animation progresses. Stupidly didn't consider that this only affects the viewport visibility and does not make the polygons invisible at render time. Now that I am ready to render the scene I am desperately trying to find a way to get all the correct polygons to be hidden in the render. Any possible solutions for getting only the viewport polygons to render? 

Many many thanks in advance

Share this post


Link to post
Share on other sites

You can create a scalar volume based on a camera frustrum using a Volume SOP, then use a Group SOP to group points using that volume. Then either blast those points, or promote the point group to a primitive group and blast those.

camera_frustrum_volume.hip

Edited by toadstorm

Share this post


Link to post
Share on other sites

I think the OP meant everything is in full cam view...just that some portion of the geo is hidden by Vis...ie. half the torus is hidden but the whole geo is inside the frustum.

Vis.jpg

Share this post


Link to post
Share on other sites

here's  a workaround, the Switch uses:

if(10<$F && $F<20,1,0)

meaning, if frame is between 10 and 20, use the delete (hide)...else use orig geo

(I did try the Delete by expression but couldn't quite get it to work...ie. it deletes the whole thing instead of my group...anyway, the switch works)

DeleteSwitch.hipnc

Share this post


Link to post
Share on other sites

here's a smarter solution, it takes your existing keyframes on the Vis and uses that directly

just:

01) copy param (the Action on the vis)

02) paste Relative Ref into the Switch

DeleteSwitch2.hipnc

Share this post


Link to post
Share on other sites

got it, this is the easiest and least effort by far...

add a Delete (prims I assume) after the Vis, in the group simply enter:

_3d_hidden_primitives

No effort with existing Vis keys whatsoever...just ALT+drag out a new Delete and add it after each Vis...

DeleteVis.jpg

Edited by Noobini

Share this post


Link to post
Share on other sites

All great solutions, seems like the last one takes care of it just fine. Group by camera is an awesome tip as well! Thank you both!

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
Sign in to follow this  

×