MegaGrab


MegaGrab allows you to grab up-scaled and anti aliased screenshots. If you need to do real prints of your game for posters or banners, or need to grab an even more anti aliased image then MegaGrab will do that. You say how many times you want the grab to be bigger than the actual rendered size and how many extra levels of anti aliasing you require and MegaGrab will render, upscale and anti alias the camera to a file and you can optionally add DOF to the grab. This grab is not limited by the 3d card in anyway it uses a different system to allow grabs of massive size limited only by the memory of the computer so if you have a 16GB machine you could easily grab a 25ft wide banner shot printed at 300 Dpi. Note this will not work with Orthographic cameras, and will not grab GUI, and some post image effects can add artefacts.

A new feature that will allow jpg grabs to be uploaded to the internet has been added, a simple php script is in the readme file which you can upload to your server, you then use the url for that in the inspector of MegaGrab and check the Upload Grab box and files will be uploaded for you. You will need to change the php script a little so files will be located where you want them etc but it is very simple.

MegaGrab now also has support for grabbing sequences of images to sequential files, so you can use the high quality anti aliasing of the grab system to generate high quality videos. You can define the framerate at which the sequences are grabbed and the length of capture and when you press the grab key MegaGrab will do the rest, then you just need to use your favourite software to turn the sequence into a HD video even 4K videos are possible with no quality loss.

To use the system just add the MegaGrab component to your game camera, or you can add it to any other object in the scene and then us the Src Camera param to select the camera to use. Then when you play your scene you just need to press the capture key you define to save a grab.

Info

If you buy MegaFiers then you get lite version of MegaGrab included

Mega Grab

MegaGrab Param Description

Src Camera

If this is left empty then it will use the camera the MegaGrab component is attached to, else the camera selected here will be used for the grab.

Grab Key

You can assign any key you want to be the MegaGrab key.

Res Upscale

How many times to multiply the resolution by for grabbing, this is used only if Calc Size is not set otherwise this will show the calculated value.

Calc From Size

Set to calc the grab size from size and Dpi values.

Dpi

Desired Dpi value for grab.

Width

Width of the grab in inches.

Output Format

TGA or JPG. If you get memory errors with JPG swap to TGA.

Quality

For jpg format the quality value for the final saved image as a percentage 100 is best quality 0 is very low.

Upload Grabs

If jpg format then you can upload the file instead of saving it locally

Url

The url to the php code below on your server

Sequence Grab

Check this box to grab a sequence of frames as opposed to a single grab.

Cancel Key

If during the sequence grab you want to stop the process press the key selected it.

Frame Rate

The framerate the game will be run at during the sequence grabbing.

Grab Time

How long in seconds the end sequence should be.

Number of Grabs

Read Only. Will show how many grabs will be taken to create the final image.

Estimated Time

Read Only. Rough guess as to how long grab will take in seconds.

Grab Size

Width and height of the final image

Use Coroutine

Use this option if the grab is not working correctly on Unity 4.0 will force the grab to happen last in the pipeline.

Blur

Pixel oversampling. Use to slightly blur the AA samples if you still notice artefacts.

AASamples

Number of anti aliasing samples to take, this can be any number but this will increase the length of time the grab will take, values around 8 to 16 will usually work well enough.

Filter Mode

Usually best to leave on ForceEnable this will force bitmap filtering on all the textures so you get more detail in the final grab.

Use Jitter

Use random jitter for AA sampling. Mega Grab will use a grid array for sampling but this can lead to artifacts on noisy images to try setting this for a random array

Save Name

Name appended to all grab files.

Format

Format for date and time string to added after name above.

Environment Var

You can set Environment labels such as USERPROFILE to set the path of the save.

Path

Path to write the files, will be added to any Enviro paths set above.

Use DOF

Option for depth of field to your grab.

Focal Distance

How far in front of the camera to focus. There is included a DOFCamera.cs script, attach to your camera and a line will show the focus point.

Total Segments

How many samples around the sample radius to take, the more the better the end result.

Sample Radius

Radius of the DOF sample ring, the larger the more DOF there will be.

Version History

Version 1.28
    Grab paths now work correctly if using relative paths.
    Path correctly handles leading and trailing ‘\’
Version 1.27
    Added option to not include the Date and Time etc info in the sequence grab file names.
Version 1.26
    Added DoScreenGrab() method to MegaGrab which can be called from GUI methods etc to do a grab instead of using a Key Press.
    Added CancelSeqGrab() method to MegaGrab which can be called to cancel a seq grab instead of using a key press.
Version 1.25
    Fully Unity 5 compatible
Version 1.24
    Added support for doing alpha grabs when using TGA format.
Version 1.23
    Sequence Grab now uses the format string
    Sequence grab frame number now has leading zeros for easier sorting
Version 1.22
    Grab size label in inspector will now show correct size based on game view size.
Version 1.21
    Two warnings removed from code.
Version 1.19
    Forced garbage collection at end of Grab to help memory use on multiple grabs
    Inspector now updates the grab size and estimated time on param changes.
    System default is not to use Co Routine so in line with Unity 4.x use
Version 1.18
    Added an option to allow you to grab sequences which can then be made into a video with offline software.
    Added custom inspector for MegaGrab to make it a bit tidier.
Version 1.17
    Changed near and far camera values to nearClipPlane and farClipPlane
Version 1.15
    Fixed multiple Application. error.
    Fixed #ifdef used instead of #if error.
Version 1.14
    Added support to upload jpg grabs to the internet
Version 1.13
    Added a use coroutine option for the grab so it will work with Unity 4
Version 1.12
    Code tidy
Version 1.11
    Removed warnings that crept into the last release.
    Added a before and after picture example.
Version 1.10
    Added Jpg output format. Quality value is in range of 0 to 100.
Version 1.09
    Added option for Environment variables for path, ie USERPROFILE
    Gives a warning if no camera set and no main camera in the scene.
    Changed class BlendTable to MGBlendTable to resolve a conflict in some peoples projects.
    Fixed a bug where it was grabbing black if non DOF mode used.
    Grab size now not dependent on video memory so can grab bigger images.
    Output changed to TGA
    Added DOF (early test)
    Added autocalc of grab values
    Added values to show size of grab
    Added estimate of grab time
    Added Dpi and width values so can set spec of grab