AWS Thinkbox Discussion Forums

Jigsaw Manipulator Code?

Hi Thinkbox,

I’ve got a tool which I’m trying to piggy-back with the Jigsaw feature of Deadline… to put it bluntly I just want to make it easier to assign jigsaw regions to cameras without having to use the Submit-Max-To-Deadline window as it’s too scary for most people to use.

I have my values stored in an array…

myArray = #(regionA, regionB) etc… where regionA = #(true, 0.0, 0.0, 1.0, 1.0, 2, 2, “New Region”, true)

I’m trying to extract the region manipulator code so I can point it at myArray or another myArray2 for example, but there’s quite a lot that’s ingrained with the SubmitMaxToDeadline.ms UI.

Does by chance this manipulator code still exist in an external testing form?

Stay tuned, I will prepare something…

Here is a “simple” example. It contains two manipulators (one for the interactive region, one for all other regions) with new names and classIDs, and a basic UI showing how the data is changing and letting you add and delete regions, as well as change their values via spinners.

Note that I did not do the recalculations of the render resolution for the UI, I left the normalized screen space instead. But it would be trivial to do.

There are still some glitches from time to time in the latest versions of Nitrous. I might look into cleaning it up some more. But you should get a starting point for your needs…
DWMultiRegionManipulator.zip (7.43 KB)

Thanks Bobo this is absolutely perfect!

There seems to be one small issue with your example which I can’t work out why its broken.

If you run your code and then without selecting any region change the spinners for the tile X/Y the viewport changes but there is a ghosting underneath of the previous 2x2 grid. Is this simply a nitrous issue or an bug in the jigsaw code?

Fixed this
DwRegionsArraySelection = #(1)

and now it works.

On a separate note, what happens when region values are outside the bounds of 0 - 1.0? Does it matter?

I believe it does not matter as it would be clamped eventually, possibly as late as the tile assembler.
But you might want to clamp it before passing it to the renderer to be on the safer side.
I would have to test it, and I am really busy right now - if you can test render a region like that, it would be good to know… :wink:

Yeah it seems to work… it gets clamped before the render for both negative and > renderwidth/height. I know there were some bugs years ago where render regions went out of bounds made render times hang… good to know it does work. One less thing for me to sanity check!

Hi,

I’m playing around with this manipulator, but just wondered if you can get it to display just the region name in the listview (instead of all the (#(true, 0.140, 0.32, 0.25, 0.25, 4, 4, “Region 1”, false, #(), false), #(true, 0.573, 0.32, 0.25, 0.25, 4, 4, “Region 2”, false, #(), false)) business)

I’m shrinking the UI and don’t need to see all those values in realtime.

I’ve tried digging out where it tries to pull the data, but can’t seem to remove the values without breaking anything.

Cheers.
Capture.JPG

Original code:

fn updateListView = ( lbx_regions.items = for i in ::DWRegionsArray collect i as string lbx_regions.selection = ::DWRegionsArraySelection as bitarray updateSpinners() )

Modified code:

fn updateListView = ( lbx_regions.items = for i in ::DWRegionsArray collect i[8] as string lbx_regions.selection = ::DWRegionsArraySelection as bitarray updateSpinners() )

Perfect!

I have noticed that it moans about a missing scripted plugin on load if you save with the Region window open (which looking at the code, the helpers get removed from from the scene when you close the window).

Shouldn’t be a problem though as we usually don’t save the file when doing a region (and manually deleting the helpers and resaving the file clears them anyway)

Thanks again.

Privacy | Site terms | Cookie preferences