Trim/crop exported depth map

Hello guys,

I am trying to export a tillable dethmap, using:

1-showzbuffer
2- viewcapturetofile

When I export, the image is not trimmed, so it won’t tile properly.

How can I make sure that image is trimmed/cropped?
I could do that in Photoshop, but want to create an automated approach.

thanks

You should position the view such that the pattern can be directly tiled, i.e. zoom in.

HI Nathan, thanks for jumping in. Sorry, Im totally newbie in Rhino (started using it today).

What you mean by “zoom in the position the view”? Zoom on canvas like bellow?

But this will be even worse, as zoom control is not precise and I will never get proper trimming

In the very least you should use 4-view and make the top-view exatcly the same aspect ratio as your patterns. Looks like prefect square what you want.
Create your patterns around world origo so that their centers are exactly there. You can use -_ViewportProperties, then select Size to give an exact vp size (say 800x800 - note I got a 1600x1600 vp with that, maybe a bug…) After that, assuming your top view was already properly centered you can then just zoom in until the pattern is properly set in the vp.

Here a quick and result of that:

ShowZBuffer gives then

1 Like

I would draw a polygon boundary, in this case a square, and run _ZoomSelected, so you don’t have to manually adjust the zoom.

Also, if you SetZoomExtentsBorder to one and the viewport has exactly the right proportion (square, I guess) then zooming will completely fill the viewport.

-Pascal

1 Like