Home Technical Talk

3DS Max viewport limit box?

Mr Whippy
polycounter lvl 7
Offline / Send Message
Mr Whippy polycounter lvl 7
Hi,

I've got one large mesh and it's fairly flat (a terrain), and I need to go around it and do some work bringing edges together (vertical axis) but since the height is best assessed from a side view and all the other terrain is in the way that is hard to do.

So you are left hiding faces you are not working with, but that is a pain.

So is there any way in Max to limit what is drawn, perhaps with a helper box, and you just move that around and it culls the scene objects to those within the box?


I guess I could maxscript this with hide faces based off a reference volume that I move around but just wanted to check if anything like this existed already.
I'm in Max 2010 here so not sure if newer versions have this but if they do I can't use them unfortunately.


Many thanks for any help/advice!

Dave

Replies

  • Mark Dygert
    Options
    Offline / Send Message
    I can think of one thing off the top of my head that might work...

    Configure your stack so it looks like this:
    DeleteMesh (this will cull the selection)
    Vol. Select (Set to face and inverted, move and scale the gizmo to set the selection to be culled)
    Mesh Select (this stops the edit poly selection from traveling up the stack)
    Edit Poly (make your edits here)

    Go back up to the Vol. Select, gizmo to move the "visible area" around, go back down to edit poly to make your changes.
    Delete the "Vol Select" and "Delete Mesh" modifiers when you're all done.
    Be careful when collapsing, use "collapse to" under Mesh Select if you have to collapse.
  • Mr Whippy
    Options
    Offline / Send Message
    Mr Whippy polycounter lvl 7
    Hi Mark,

    Wow that is a smart work flow for achieving the desired effect.

    I'll have a play and see where I get. Given that stack it might even be quite trivial to maxscript something using that method.


    I'll let you know how I get on!

    Thanks

    Dave
  • Octo
    Options
    Offline / Send Message
    Octo polycounter lvl 17
    You could go into the viewport config and activate viewport clipping..then you get a slider in the viewport so you can clip near/far objects.
  • Mark Dygert
    Options
    Offline / Send Message
    A ProBoolean might also work, it might be a tiny bit faster if you run into viewport slowness issues.

    A ProBoolean might be preferable too because it will cut the faces and remove them cleanly based on the bounds of the box, instead of hiding just what is fully inside, if you have some big polygons in the scene and a tiny bit is hanging outside the box it won't delete, it might be better if its cut and removed with a boolean?

    There are also some "OBJECT" culling scripts floating around for cameras on scriptspot.com, They aren't hard to write either. But it won't help that much if its a single mesh object. Particle View has a camera culling operator for particles, I'm not sure if it can be rigged up to cull faces on a mesh...

    Hopefully that gets you working and doesn't chug your viewport.

    A script would be a cool idea, getting to the Vol. Select gizmo is a bit of a pain, especially if you applied it to a selection of objects.
  • Mr Whippy
    Options
    Offline / Send Message
    Mr Whippy polycounter lvl 7
    Well I've not really managed to get very far with a script yet. Sometimes you just need to get on with a task and trudge through.

    The stack system works ok but as soon as you go to the bottom editable poly to do work on the mesh the stack is obviously set to the base object.
    If you turn toggle end result on that works, but then when you select a sub-object the cage appears (from the sub-div rollout)

    If you turn the cage off then the vert points (red dots) disappear which is a bit of an annoying feature... but it clears the other geometry out of the way enough so that loss of clarity doesn't impact too badly.
    Once the stack is pinned though I can just work through this quite nicely now without too much mesh showing.


    I did briefly try pro-boolean but it didn't appear to work at all (my base mesh isn't tidy enough for a boolean to operate elegantly it seems)


    I think a script method working via the stack approach would be nice. It'd be perfect if the cage could be turned off but vert points remain but that is another matter.

    However given the simplicity of setting it up when you know how a script may seem a bit excessive for now.



    Thanks for you help Mark!

    Dave
  • Mark Dygert
    Options
    Offline / Send Message
    Humm yea the cage thing would get annoying. Maybe insert an edit poly just above the base object, that way show end result would be toggled on and you wouldn't have the annoying cage issue?

    It might be helpful to have your edits in an edit poly modifier that way you can get rid of it and go back to the original untouched object the way it was?
  • Eric Chadwick
    Options
    Offline / Send Message
    Did you try Viewport Clipping as Octo suggested?
  • Mr Whippy
    Options
    Offline / Send Message
    Mr Whippy polycounter lvl 7
    Hi Eric,

    Yeah I gave that a go. I did write a post about it but yesterday the storms managed to cut out the power (and give me a zap via my Logitech G25 pedals which are now in need of a fuse I think!) right in the middle of my reply :D


    Basically my scene is about 10km x 10km but I'm working on 50m chunks of road at a time so using the viewport clipping planes was really tough.

    The box method was many times faster in the end. I've set up a dummy system with attached grid, ortho camera, other limit boxes etc now so I just drag/rotate the dummy around and get a nice ortho view of the bits I want to focus on as I work around the road path and verges.


    All considered this appears to be the sweet spot of cheapness vs speed for now.

    Given I have about 18km of road (or about 36km of verge line) to author in from laser scan data then I need a fast process.


    Thanks

    Dave
  • Eric Chadwick
    Options
    Offline / Send Message
    Yay for the modifier stack!
Sign In or Register to comment.