Author Topic: Decouple system from main camera  (Read 1525 times)

JSwigart

  • Newbie
  • *
  • Posts: 16
    • View Profile
Decouple system from main camera
« on: November 27, 2018, 02:03:33 AM »
allow registration of 'voxel observers' that allow discrete areas of voxel space to be built/maintained. authoritative servers will need this to keep the areas around players resident, and it has many other uses as well, such as for example registering a camera at a remote part of the world to render an area to texture for the surface of a teleporter, or security cameras displays, or other forms of previewing an area without actually going there. also in a game like minecraft, being able to keep certain areas resident enables persistent functioning of things like machines, AI, etc. many use cases(edited)
something like AddObserver(Camera cam, bool frustrumCull) - for something that frustrum culls, and AddObserver(Transform transform, float viewDistance) for non camera purposes.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 6642
    • View Profile
Re: Decouple system from main camera
« Reply #1 on: November 28, 2018, 09:35:07 PM »
Good idea, added to the roadmap.

JSwigart

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Decouple system from main camera
« Reply #2 on: November 30, 2018, 04:46:54 PM »
Theoretically when this feature is done, I hope the system would not have any camera dependencies at all, and instead it would be up to the user to implement an interface on a script that's attached to whatever they want.

I would like to ask that this interface provides 'per observer' control over the view radius of that observer, and whether the observer should utilize frustum culling. This probably means that the view distance stuff can be removed from the environment.

Cool Use cases
- Server can attach observers to all players with a large relevancy radius to ensure voxel data(collision, navigation, etc) is instantiated around the players for server side simulations
- The destination of a teleporter can have a short radius frustum limited observer attached to the destination of the teleporter, and render to texture a preview of the destination with a short fog radius or effect or whatever.
- A very important A.I. can have an observer attached to it that allows it to essentially travel long distance without necessarily having all that data loaded at once.
- A map UI could allow you to preview distant areas of the world that you aren't in, or a map script could crawl the world slowly to load and update a large map texture of the world that reflects changes over time.

JSwigart

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Decouple system from main camera
« Reply #3 on: November 30, 2018, 04:56:05 PM »
Also, related to this request

http://kronnect.me/taptapgo/index.php/topic,3381.0.html

It would be great if the option to build the visuals for a mesh were controllable at the observer level as well.

For instance, for non dedicated servers, they will need to build visuals for the area around their player, but don't need to for the areas around other observers that are outside their view radius