Fancy Frustum

Hi,

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:

github.com/ovvostudio/TD-Fancy-Frustum

Here’s the description from my git:

[size=150]What is Fancy Frustum?[/size]

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!

[size=150]What can it do for you?:[/size]

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)

or

  • 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.

[size=150]That’s all?[/size]

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

[size=150]Is that it?[/size]

Well, almost.

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!

Shandor
Fancy_Frustum_v1_01.tox (25.6 KB)

Hey Shandor,

I get an error in the execute script for each geo when I’m looking at this:

Traceback (most recent call last): File "/project1/Frustum/item3/execute1", line 25, in create AttributeError: 'int' object has no attribute 'par'

We’ve made our share of these kinds of previs tools as well - I don’t see a camera in your scene, and I’m wondering how you use this tool. Do you use it by looking at the geometry viewer, or do you do another render pass from another camera to be able to visualize this from somewhere other than the builtin geo viewer?

One other note - what I’m seeing is that while I can transform my cameras, the frustum doesn’t update unless I cut / paste the tox. A toggle to refresh the previs, or using something like tdu.dependency so you have a constantly updating visualization would be a great feature add. :slight_smile:

Yeap, guys. Sorry for that. The initial commit had couple of errors.

I’ve corrected a lot of those in the new 1.01 version already here and uploaded on github too.

Matthew, you just need to drop a camera in your scene or drop Fancy_Frustum in the scene with camera.

It looks for any cameras in the scene and attaches all the necessary geos to them.

For some reason, sometimes when saving components from 099, in param execute it doesn’t save " * " to react on any changes. I guess it’s a bug.

Sorry again, please, redownload and drop in the scene with cameras or just add some cameras and play with colors and sync.

Thx

Could you elaborate or post a simplified example in the bugs forum?

Sure. I will reproduce it and will post it.

I also was wondering that perhaps there’s smth to be done with handling more easily the dynamic custom parameters. When I dynamically create and destroy them it’s never the same index, so there’s some tricky scripting to be done in order to work around it. I will try to post some examples to discuss it. I think my workaround is not very robust.