Is it possible to shrink the size of the active 3d viewport and arrange permanent HUD/GUI elements around that? This is like how all the Balder's Gate, Wizardry, Wasteland, Dungeon Keeper, etc. did it.

Alternately, is it possible to have ORK just take up a portion of the screen instead of the whole screen?
  • Also, FWIW I tried various setting in ORK like negative GUI/screen padding, shrinking the default size of the game screen, etc and had no luck.

    Seems like a render texture might be able to do this and I'll look into that.

    If there's a better way to do this in or outside of ORK, I'm all ears.
  • Why would you need to shrink it? If you cover it up with permanently on-screen non-transparent GUI elements won't that accomplish the same thing? You can change the camera FOV to make the remaining of the window have the field of view that you want.
  • The game screen is handled by the Viewport Rect of the camera in the scene - so that's not really ORK related and you'd need to set that up in your scene's camera.
    ORK's UI doesn't care for the camera's viewport and will display the same way regardless of that setting.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @Juryiel - take a look at this image from The Bard's Tale for an extreme example

    image

    Essentially I may be blocking 50% of the screen and ORK will think all of it is visible; depending on the controller camera your character runs under the GUI, and you're paying the costs of 3d rendering for all of that space that is covered as well.
  • You can look at using two cameras for something like that, one set to fullscreen that has all your UI elements on it (and with a higher depth number so it draws on top), and the second set to render the 3d scene with a modified Viewport Rect as Gil points out. For your example, you'd want to change the W and H numbers to something around .5, and the y coordinate to .5 as well (which will place the 3d scene in the top right of your game, with a bunch of extra nothing space all around it.

    One camera might work as well, but I think we've always used two for something like this. Don't know, might just be force of habit. You'd have to try it.
    My little chunk of the internet: http://artemic.com
  • Thanks! I'm working on it--should be interesting...
  • Yeah for my method to work you have to keep the viewable area in the center of the screen (so that the camera FOV doesn't distort one side more than the other as it would if you put it on the side). You would also have to use a form of dynamic occlusion culling so that you are not rendering things that are covered by the UI. There is an asset in the asset store which will do this for you. It works by sending out raycasts from the camrea position. Any object not hit by one will not be rendered. You can set the FOV of the raycast to be smaller than the camera FOV so that they only cover the range that is visible in the viewport.

    Though, it sounds like the 2 camera method might be better anyway :)
  • ORK's UI doesn't really need a 2nd camera - it'll use the whole screen, regardless of the viewport rect of the camera (at least in my tests) :D
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Good to know, yay for smart UI!
    My little chunk of the internet: http://artemic.com
Sign In or Register to comment.