3ds Max Products:Multi-Tile UV Bake Tool/Manual and Unity Products:Amplify Occlusion/Manual: Difference between pages

From Amplify Creations Wiki
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
ampwiki>AmplifyWiki
 
Line 1: Line 1:
{| style="width: 920px; horizontal-align: left;"
|
== Installation ==
== Installation ==


====Automated installation with administrator rights====
1. Open the AmplifyOcclusion_Unity5.6+.unitypackage
 
2. After Unity loads it will display the “Importing package” window, select All and click Import
 
3. Amplify Occlusion should now be installed in your Unity project and it should have the following directory structure:


When installing the tool be sure to '''run 3dsMax as Administrator'''. On restricted machines you may get a few runtime errors, be sure to run as administrator if that is the case. If the problem persists please contact [mailto:[email protected] support via email.] This manual is a work in progress and subject to change.
:: YourProject\Assets\AmplifyOcclusion\
:: YourProject\Assets\AmplifyOcclusion\Plugins
:: YourProject\Assets\AmplifyOcclusion\Resources
:: YourProject\Assets\AmplifyOcclusion\Samples
:: YourProject\Assets\AmplifyOcclusion\Textures


1. With 3dsMax open, drag & drop the mzp package into your viewport, or execute the script directly from the “Maxscript/Run Script” option. Make sure your have Administrator permissions; the tool needs to alter the default RTT script.
== Workflow Overview ==


2. After the installation, run 3dsMax and customize your UI as you would with any other script. The Tool is located under “Multi-Tile UV Bake Tools”
http://wiki.amplify.pt/images/wp-content/uploads/2018/07/cam.jpg


<br>
1. Select and apply “Image Effects/Amplify Occlusion” to your main camera
http://wiki.amplify.pt/images/wp-content/uploads/2014/08/max1.jpg


<br>
2. Adjust the intensity and radius.
Alternatively, use the Main Menu Item.


http://wiki.amplify.pt/images/wp-content/uploads/2014/08/max2.jpg
3. Adjust the blur values until you are satisfied with the results.


====Manual installation without administrator rights====
== HD and Lightweight SRP ==


Use this method if you’re unable to run 3ds Max with administrator rights.
WARNING - SRP support is only available with Post Processing Stack V2. Unity 2019 integrated PP can't be supported until adequate means are provided by Unity, this affects all images effects not just ours.


1. Close 3ds Max and open ''Macro_BakeTextures.mcr'' (''Your_3dsMax_Folder/MacroScripts/'' or, if necessary, ''UI/MacroScripts/'').
1. Import the required dependencies via the Package Manager(Window\Package Manager, Advanced -> Show preview packages)
:: Render-Pipelines.Core
:: Render-Pipelines.High-Definition
:: Render-Pipelines.Lightweight


2. Add the following function around line 1660, before ''“on bRender pressed do if workingObjects.count != 0 do''".
2. Setup your project to use the intended SRP.


<syntaxhighlight lang="c">
3. Import the Amplify Occlusion package.
//Custom Function
  function myBakes objList =
    (
    print "myBakes Begin" 
    selectedObjects = objList
    print objList
    selection = objList
    OnObjectSelectionChange()
    print workingObjects
    BatchBake workingObjects
    print "myBakes End"
    )
</syntaxhighlight>


3. Save Macro_BakeTextures.mcr and open 3ds Max.
4. Import the Amplify Occlusion SRP package.
:: Assets/AmplifyOcclusion/Packages/PostProcessingSRP_XXX.unitypackage


4. You can now use the tool by simply dragging and dropping MultiTileUVBake.mse, or MultiTileUVBakeTrial.mse when using the trial version, into the viewport. Alternatively, you can place the script in your 3ds Max script folder and setup a Toolbar shortcut.
5. Add Amplify Occlusion to your Post Processing Stack profile.


== General Tool Info ==
Be sure to check the official Unity information on how to setup your Post Processing Stack.
This tool automates the manual and time consuming process of baking multiple tiles in 3dsMax. It takes the required bake information from the RTT Dialogue, UV Channels available and automatically offsets and renders the required tiles.
https://github.com/Unity-Technologies/PostProcessing/wiki


*The bake tool does not force you to select from a pre-made list of render elements or render engines. Work as you always did; after creating your scene simply add the appropriate render elements and projection settings using the Render To Texture Dialog. All Render Engines and file formats are supported, provided that they are supported by the default 3dsMax Render To Texture process.
== Ambient Occlusion Control ==
*When adding render elements, besides the type, the only crucial element is the file format used. Given that the bake tool not only overrides the exported texture name, but also allows you to override Texture/Padding Size and the UV Channel to use, you can save time by keeping the unaltered default values and instead use the tool to efficiently apply the required values to the baked objects. We strongly recommend that you simply input the name/format of the file and use the bake tool to define the remaining attributes.
*We recommend backing up your scene before using the bake tool, the “Create a Working Copy” option is currently disabled. The Tile texture output will overwrite any existing files/folders.
*Objects that don’t contain render elements should not be included in the bake, this may result in runtime errors on some Max versions.
*After the bake process, UV’s will be transferred and depending on the options used the Modifier Stack could be collapsed, always backup you scene or models.
*It’s a good rule of thumb to check for isolated or overlapping Vertices/Edges and reset transforms after completing a model. In the long run this will save you quite a lot of time from random crashes due to incorrect/corrupted transforms.
*The bake tool will only process Editable Polys.


== Tool Overview ==
Amplify Occlusion offers two occlusion methods, the Post Effect mode resembles standard SSAO and will apply the effect to all objects, the Deferred option preserves bright lit surfaces by injecting SSAO before the direct light stage. A debug option is also available for added scene tweaking and flexibility.


http://wiki.amplify.pt/images/wp-content/uploads/2018/07/method.jpg


{| style="width: 100%; horizontal-align: right;"
=== Occlusion Parameters ===
|
 
==== Info and Bake ====
http://wiki.amplify.pt/images/wp-content/uploads/2018/07/occparam.jpg
 
'''Sample Count'''<br/>
 
*Higher values will provide the best results at the cost of reduced performance. The default Medium value should suffice for most projects.
 
'''Per Pixel Normals'''<br/>
 
*The Default Camera value is recommended for the Post Effect method, Gbuffer/Octa Encoded available for the Deferred.
 
'''Intensity'''<br/>
 
*Defines the intensity of the occlusion effect.
 
'''Tint'''<br/>
 
*Defines the color of tint of the occlusion effect.
 
'''Radius'''<br/>
 
*Defines the radius, or spread, of the occlusion effect, the blur amount is usually adjusted in relation to the spread size.
 
'''Power Exponent'''<br/>
 
*Defines the power exponent value of the occlusion effect, it allows you to easily exaggerate or reduce the overall strength.
 
'''Bias'''<br/>


*This area displays information regarding the number of objects and tiles to bake.
*Occlusion bias, this value will directly influence which areas of your scene will display the effect.
*The Bake button initiates the Render To Texture Procedure and, at the moment, it cannot be canceled.


==== Bake Options ====
'''Thickness'''<br/>


*UV Tile Type: MARI UDIM (limited to 10 horizontal tiles), Mudbox (Index 1) and Zbrush (Index 0), xX_yY no tile limitations.
*Occlusion thickness heuristic, which allows for tweaking thin occluders such as vegetation.
*UV Channel: The channel containing the UV’s to be used in the bake process. By Default it gets its value from the RTT dialog; Channel overrides the value in all selected objects.
*Disabling the RTT FB Window will not automatically disable Vray’s, or similar FB’s. When rendering production tiles, always disable custom FB windows in order to reduce memory usage during the process.
*Standard Tile Check: When Toggled, this fast check function will assume that all UV tiles have been properly set manually. When unchecked, the function will check the entire UV collection, cluster by cluster, in order to determine the tiles to render; this option is slower when compared to the previous ones.


==== Output Options ====
'''Downsample'''<br/>


*The tiles will be renamed automatically: Render Element Name + Object Name + Tile Coordinates + File Format; special characters will be removed from the original object name. For organization sake, we recommend keeping the options below toggled.
*The downsample value option provides a quick and efficient way to improve overall performance.


*Baked Maps: Output Folder for the baked maps, any existing files will be overwritten.
== Distance Fade ==
*Bake Element Folder: Creates a sub-folder for each render element type.
*Object Name Folder: Creates a folder for each baked object.


==== Extra Options ====
http://wiki.amplify.pt/images/wp-content/uploads/2018/07/fade.jpg


*Texture Padding: RTT Default or override all selected objects.
The Distance Fade option provides a flexible method of fading the Intensity, Radius and Power Exponent.
*Texture Size: RTT Default or override all selected objects.


==== Post-Bake Options (EXPERIMENTAL) ====
'''Fade Start'''


*This post-bake option will copy the UV’s used in the baking process into another UV channel. e.g. Use channel 2 for the bake and copy the resulting UV’s into channel 1, making the object ready to be exported to another package.
*Starting point value for the fade effect.


*Transfer UV Channel: From – The channel used in the bake process, To – destination channel.
'''Fade Length'''
*Clear Source Channel: Removes the channel used in the bake; this will avoid having unnecessary channels in your exported model.
*Collapse Modifier Stack: Clears the modifier stack, the transfer process adds UV Channel Modifiers.


==== Pre-Bake Options (EXPERIMENTAL) ====
*The length of the fade effect, you can think of it as a feather effect.


*The Auto Tiles option will automatically Unwrap, Pack and set the amount of tiles required for the selected pixel density.
'''Fade Intensity'''


*UV Channel: The channel containing the UV’s to be used in the bake process; by Default it gets its value from the RTT dialog; UV Channel overrides the value.
*The Intensity value to fade to. Keep in mind that you will be fading from the value set in the [[Unity_Products:Amplify_Occlusion/Manual#Occlusion_Parameters |Occlusion Parameters]] to the value set here.
*Target Pixel Density: Per-Meter or Kilometer, relative to the approximate surface area in relation to the Render Texture Size set above.
*Pack Only: No automatic flatten, it assumes pre-made UV’s.
*Pack with UV Packer: Requires the UV Packer plugin by 3d-io.
*Rotate, Rescale and Fill holes with Clusters, overrides the equivalent Unwrap UVW parameters for all baked objects
*No Reduction: Debug only, it prevents UV’s from being reduced if the object surface area is insufficient to occupy more than one tile, in relation to pixel density and output texture size.
|http://wiki.amplify.pt/images/wp-content/uploads/2014/08/bake1.png
|}


== Usage Instructions ==
'''Fade Tint'''


==== General Rendering Technical Considerations ====
*The Tint value to fade to.


*The following applies to Single and Multi-Tile Bakes, with or without using the bake tool: When using GI engines in the Render To Texture process, such as Vray or FinalRender, avoid using camera based lighting calculations like lightcache or simple irradiance maps.
'''Fade Radius'''


*As you’ve probably noticed, a Standard Render and a Render To Texture Render will often show slightly different results. This is mainly caused by the misuse of certain camera based GI techniques. Since such techniques require, in simplistic terms, “a point of origin and destination in 3d space” in order to properly calculate the GI, sort of speak; given the computing method the Render To Texture Engine uses, the use of Brute Force or Properly Pre-Cached Irradiance is recommended.
*The Radius value to fade to, also from the value set in the [[Unity_Products:Amplify_Occlusion/Manual#Occlusion_Parameters |Occlusion Parameters]].


==== Method 1 – Manual UV Tiles ====
'''Fade Power Exponent'''


1. Manually setup your UV Tiles using a new/empty UV channel; this will be your UV Channel used in the bake.
*The Power Exponent value to fade to.


2. Using the Render To Texture Dialog add your render elements and projection options, if any.
'''Fade Thickness'''


3. In the Bake Tool Dialog, select your bake UV Channel; the channel created in step 1.
*The Thickness value to fade to.


4. Select the Tile Type.
== Bilateral Blur Control ==


5. This step introduces some optional settings.
http://wiki.amplify.pt/images/wp-content/uploads/2016/04/blur.jpg


5.1. Set the output folder and check the Object Folder & Element Sub-Folder Options if necessary.
Amplify Occlusion uses bilateral blur to eliminate dithering artifacts, several options are available for added control.


5.2. Set the Texture and Padding override size, if required.
'''Blur Radius'''


6. Select the objects to bake, Hit the Bake Button, sit back and enjoy the automated process.
*The blur radius of the blur effect applied.


==== Method 2 – Automatic UV Tiles (EXPERIMENTAL) ====
'''Blur Passes'''


1. Using the Render To Texture Dialog add your render elements and projection options if any.
*Defines the number of passes used for the effect, higher values are more performance intensive.


3. In the Bake Tool Dialog, select your bake UV Channel; any empty channel available.
'''Blur Sharpness'''


4. Toggle the Auto Tiles in the pre-bake options.
*Provides control over the occlusion blur sharpness, higher values sharpen the blur effect.


5. Set the desired pixel density per square meter or kilometer.
== Temporal Filter ==


6. Adjust the bake UV Channel if required, the value in this section is linked to the UV Channel value in the Bake Options above.
Amplify Occlusion uses temporal filtering to smooth the occlusion effect through the accumulation of occlusion calculations over time, improving the quality of the effect with a slight performance trade-off and possible ghosting.


7. Setup the UV Flatten and Packing options or use the default settings. The options displayed in this section correspond to the standard options provided by the Unwrap Modifier.
'''Filter Blending'''
*Controls the overall accumulation decay by defining the contribution weight of either recent occlusion calculations to reduce ghosting at the expense of quality ( 0 ), or older calculations to increase quality at the expense of possible ghosting ( 1 ).


8. Select the objects to Bake, Hit the Bake and enjoy the automated process.
'''Filter Response'''
*Controls the amount of calculations that are discarded based on the motion of the scene and objects, in which 0 discards the least, improving the quality at the expense of possible ghosting effects, and 1 discards the most, lowering the quality but becoming less susceptible to ghosting.


==== Mixed Method – Automatic Tiles Without Flattening the UV’s ====
== Technical Considerations ==


*Pre-Bake options can be mixed with the manual mode. e.g. Manually setup your UV’s and toggle the Pack Only option. Instead of flattening the UV’s, the tool will simply pack them accordingly to the target Pixel Density, without altering your original UV groups.
=== Mobile Devices ===


==== Post-Bake Options ====
Amplify Occlusion requires Metal or OpengGL ES 3.0 or higher.


*The automated Post-Bake option for UV transfer can and should be used with both methods.
Be sure that the Auto Graphics API is not enabled in order to avoid using older OpenGL ES versions on Android devices.


|}
[[Category:Manual]]
[[Category:Manual]]

Revision as of 13:08, 16 May 2019

Installation

1. Open the AmplifyOcclusion_Unity5.6+.unitypackage

2. After Unity loads it will display the “Importing package” window, select All and click Import

3. Amplify Occlusion should now be installed in your Unity project and it should have the following directory structure:

YourProject\Assets\AmplifyOcclusion\
YourProject\Assets\AmplifyOcclusion\Plugins
YourProject\Assets\AmplifyOcclusion\Resources
YourProject\Assets\AmplifyOcclusion\Samples
YourProject\Assets\AmplifyOcclusion\Textures

Workflow Overview

cam.jpg

1. Select and apply “Image Effects/Amplify Occlusion” to your main camera

2. Adjust the intensity and radius.

3. Adjust the blur values until you are satisfied with the results.

HD and Lightweight SRP

WARNING - SRP support is only available with Post Processing Stack V2. Unity 2019 integrated PP can't be supported until adequate means are provided by Unity, this affects all images effects not just ours.

1. Import the required dependencies via the Package Manager(Window\Package Manager, Advanced -> Show preview packages)

Render-Pipelines.Core
Render-Pipelines.High-Definition
Render-Pipelines.Lightweight

2. Setup your project to use the intended SRP.

3. Import the Amplify Occlusion package.

4. Import the Amplify Occlusion SRP package.

Assets/AmplifyOcclusion/Packages/PostProcessingSRP_XXX.unitypackage

5. Add Amplify Occlusion to your Post Processing Stack profile.

Be sure to check the official Unity information on how to setup your Post Processing Stack. https://github.com/Unity-Technologies/PostProcessing/wiki

Ambient Occlusion Control

Amplify Occlusion offers two occlusion methods, the Post Effect mode resembles standard SSAO and will apply the effect to all objects, the Deferred option preserves bright lit surfaces by injecting SSAO before the direct light stage. A debug option is also available for added scene tweaking and flexibility.

method.jpg

Occlusion Parameters

occparam.jpg

Sample Count

  • Higher values will provide the best results at the cost of reduced performance. The default Medium value should suffice for most projects.

Per Pixel Normals

  • The Default Camera value is recommended for the Post Effect method, Gbuffer/Octa Encoded available for the Deferred.

Intensity

  • Defines the intensity of the occlusion effect.

Tint

  • Defines the color of tint of the occlusion effect.

Radius

  • Defines the radius, or spread, of the occlusion effect, the blur amount is usually adjusted in relation to the spread size.

Power Exponent

  • Defines the power exponent value of the occlusion effect, it allows you to easily exaggerate or reduce the overall strength.

Bias

  • Occlusion bias, this value will directly influence which areas of your scene will display the effect.

Thickness

  • Occlusion thickness heuristic, which allows for tweaking thin occluders such as vegetation.

Downsample

  • The downsample value option provides a quick and efficient way to improve overall performance.

Distance Fade

fade.jpg

The Distance Fade option provides a flexible method of fading the Intensity, Radius and Power Exponent.

Fade Start

  • Starting point value for the fade effect.

Fade Length

  • The length of the fade effect, you can think of it as a feather effect.

Fade Intensity

  • The Intensity value to fade to. Keep in mind that you will be fading from the value set in the Occlusion Parameters to the value set here.

Fade Tint

  • The Tint value to fade to.

Fade Radius

Fade Power Exponent

  • The Power Exponent value to fade to.

Fade Thickness

  • The Thickness value to fade to.

Bilateral Blur Control

blur.jpg

Amplify Occlusion uses bilateral blur to eliminate dithering artifacts, several options are available for added control.

Blur Radius

  • The blur radius of the blur effect applied.

Blur Passes

  • Defines the number of passes used for the effect, higher values are more performance intensive.

Blur Sharpness

  • Provides control over the occlusion blur sharpness, higher values sharpen the blur effect.

Temporal Filter

Amplify Occlusion uses temporal filtering to smooth the occlusion effect through the accumulation of occlusion calculations over time, improving the quality of the effect with a slight performance trade-off and possible ghosting.

Filter Blending

  • Controls the overall accumulation decay by defining the contribution weight of either recent occlusion calculations to reduce ghosting at the expense of quality ( 0 ), or older calculations to increase quality at the expense of possible ghosting ( 1 ).

Filter Response

  • Controls the amount of calculations that are discarded based on the motion of the scene and objects, in which 0 discards the least, improving the quality at the expense of possible ghosting effects, and 1 discards the most, lowering the quality but becoming less susceptible to ghosting.

Technical Considerations

Mobile Devices

Amplify Occlusion requires Metal or OpengGL ES 3.0 or higher.

Be sure that the Auto Graphics API is not enabled in order to avoid using older OpenGL ES versions on Android devices.