This is my small component for frustum visualization. A lot of features there, but still very straight-forward.
Grab it from my git or from attachment:
Here's the description from my git:
What is Fancy Frustum?
I always wanted to create a robust and nice-looking frustum visualization component that doesn't get in the way. Having used d3, fly-eng and other software, you are getting used to trust your previz and to be able visually adjust those projectors/camera positions.
Because there are more & more projects involving multi-projector/camera setups, it would be nice to set something globally and treat it as a batch.
As they say, you're never better served than by your own self. Here it is then.
It is meant to be a very self-explanatory tool, but with some extra features. It is fancy after all. Think of it as a frustum on steroïds!
What can it do for you?:
The list of features and their combination is quite long, but I think everyone would find smth to adapt it to its own liking.
- it is universal in the sens that all the math is based on matrix and not trigonometry. It means it works with all type of frustums and projections, even your custom projections for asymetrical frustums. You will need to tweak the look for it though.
- works with all the cameras in the scene or selected cameras.
- you can set aspect ratio globally either by manual entry or by dragging a TOP (preferably RenderTOP)
- you can set aspect ratios per camera, in which case a new custom parameters page will appear letting you enter aspect ratio for each camera either manually or with a TOP
- by using wire only mode you can visualize frustum(s) without it getting too much in your way or you can simply adjust the opacity of the fill to your liking
- in order to make your work even smoother, fancy frustum is heavily color-coded in network editor and geometry viewer so you always know which camera does what!
- you can also preview the camera label directly in the geometry editor. it can be either a simple number or camera name
- and of course you can disable visualization globally. It still keeps all the parameters in place even in sync mode.
Actually, no. More advanced feature is sync mode, that's where it becomes almost unbearably fancy. It is especially useful for multi-projector setups with identical equipment.
- you can synchronize all the camera view settings with a master camera that you drag'n'drop in the master camera op field
- all transforms are still unique and untouched to all the cameras
- by changing just master cam view settings, you change it globally and dynamically for all the cameras
- the sync mode is also heavily color-coded in node viewer and geometry viewer:
- master node becomes RED
- slave nodes become GREEN(ish)
- animated color-coded icons are displayed in the geometry viewer as visual aid
Is that it?
To claim its vanity, the component icon will let you know when fancy frustum is at work or disabled with nice and smooth bw/color coding.
And did I say it is universal 088/099? Yes, the code is debugged so it works universally in 088 or 099 editions. At least, I did my best.
That's all folks!
Let's make it FANCY!