a s3 d s o ftw ar e3dglobal.ux3d.io/demos/as-3d_software_documentation.pdf · 2019. 10. 23. · a...

23
AS3D Software for Version: 1.7 Alpha Last Update: 10/17/2019 Contact: [email protected]

Upload: others

Post on 29-Jan-2021

0 views

Category:

Documents


0 download

TRANSCRIPT

  •     

        

    AS3D Software  

    for 

     

      

      

       

    Version:  1.7 Alpha 

     Last Update: 10/17/2019 

     Contact: [email protected] 

      

        

     

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Table of Contents  General Information 3 

    Autostereoscopic Configuration Files 3 

    Autostereoscopic glTF Sample Viewer 4 

    Using the Sample Viewer 4 

    Autostereoscopic Plugin 5 

    Unity 5 

    Version 5 

    Getting Started 6 

    Adjusting the Focus Point 7 

    Guide to the User Interface 8 

    Starting the build 9 

    Unreal Engine 10 

    Version 10 

    Getting Started 11 

    Adjusting the Focus Point 13 

    Guide to the User Interface 14 

    Technical Art Guide 15 

    3D Scene 15 

    Focus Point 16 

    Camera 16 

    Text 17 

    2D 17 

    Testing 18 

    Visual Guide 18 

    Asset Guide 20 

    General 20 

    Best Practices 20 

    References 22 

       

    1  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    General Information 

    Autostereoscopic Configuration Files The individual AS3D [AS3D] monitor settings are stored in JSON [JSON] files. All plugins and tools depend on these configuration files. The configuration files are updated and extended on a regular basis. The plugins are shipped with the current version of these configuration files. For the latest version, please download the collection of all configuration files.  Link: http://3dglobal.ux3d.io/demos/Configs.zip   

    2  

    http://3dglobal.ux3d.io/demos/Configs.zip

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Autostereoscopic glTF Sample Viewer 

    Initializing the AS3D Algorithm The autostereoscopic glTF Sample Viewer uses the same parameters as the Unity and Unreal plugins. To apply the configuration parameters of the your AS3D monitor, traverse the ui “glTF => Autostereo” and select the code corresponding to your display from the “Config” dropdown. Alternatively, drag and drop the configuration .json file corresponding to the monitor you are using onto the Sample Viewer window to apply the autostereoscopic output parameters. 

    Manually Controlling AS3D Parameters Jojo Effect - activates a mode with a slighter 3D effect, but the viewer will not experience the “jump” between the lowest and highest numbered views Eye separation - adjusts the inter-camera distances and the strength of the 3D effect Focus Distance - use this to control which (part of an) object is displayed in focus 

    Developer Settings The following settings have already been set implicitly in “Initializing the AS3D Algorithm” and should only need to be adjusted by experts for experimental reasons. BGR Display - set true for subpixel order “BGR” instead of standard “RGB” Invert Viewport - vertically inverts the viewport. Needed for some lense grids Right To Left - arranges the cameras starting from the other side Lenticular Slope - X divided by Y equals the slope of the lense grid Render Views - the number of camera views to render View Shift (Offset) - offsets the views displayed by a number of 0 to Render-Views-count 

    3  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

      Link: http://3dglobal.ux3d.io/   

    4  

    http://3dglobal.ux3d.io/

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Autostereoscopic Plugin 

    Unity This Unity [UNITY3D] plugin provides autostereoscopic [AUTOSTEREOSCOPY] functionality to your Unity project. 

    Version This plugin was developed and tested in Unity 2018.3.14f1. Other Unity versions may be compatible as well, but have not been tested yet. 

    Licence This plugin is only intended for testing and not for production use. This plugin is not licenced for commercial use. Content created using the plugin is subject to the original author’s license. 

    Link http://3dglobal.ux3d.io/demos/AS3D_Unity_Plugin.zip  

       

    5  

    http://3dglobal.ux3d.io/demos/AS3D_Unity_Plugin.zip

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Getting Started Import the plugin into an existing Unity project through the editor UI.  

      The plugin is imported to the folder /Assets/Resources/AS3D. The editor now shows a new menu item labeled “AS3D” in the top menu bar.  

      Press the “Initialize” button to add a prefab GameObject to the currently open scene, labeled “AS3D_CAMERA_HOST_OBJECT”. This object is vital to add autostereoscopic functionality to your project and there are several ways to do it.  

    1. If you are using only one camera in your project, add the AutoStereoCamera.cs script from the folder /Assets/Resources/AS3D as a component to that camera. 

    2. Alternatively drag your camera into the “User Defined Main Camera” field in the inspector of the AS3D_CAMERA_HOST_OBJECT.  

      

    6  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    3. Alternatively the plugin will automatically search for the camera at runtime by registering which camera is about to render.  

    4. To also include non-rendering cameras in the search set the option “Take Camera From Scene”. Set the field “Tag” to the tag of the desired camera. Optionally press “Ignore Tag” to search for any camera at all, regardless of its tag. 

     When running the build application, the AutoStereoCamera.cs script will automatically search for any known autostereoscopic displays connected and will configure its settings accordingly.  Optionally, full control of the autostereoscopic parameters is available, click the button in the top menu bar labeled “AS3D” and choose “Create UI”. This adds a user interface prefab to your scene.  

    Adjusting the Focus Point The Focus Point is best adjusted using the AS3D_FOCUS_GIZMO which can be added to any scene. This is done by clicking “Create Focus Point” under the “AS3D” menu tab. This will add a GameObject labeled “AS3D_FOCUS_GIZMO” to your scene that is visualized by this sprite:  

     AS3D_FOCUS_GIZMO in the Unity viewport 

     Now you have two options:  

    1. Attach the AS3D_FOCUS_GIZMO as a child to the main camera of your scene in the desired focus distance. The focus distance will stay at a fixed position using this method.  

    2. Attach the AS3D_FOCUS_GIZMO as a child to a GameObject. The autostereoscopic focus plane will dynamically follow the position of the gizmo in the scene. This method allows animating the focus point of your scene at runtime. Notice that the focus point will always stay at the location of the gizmo, so make sure that a child AS3D_FOCUS_GIZMO is positioned at x/y/z = 0/0/0 inside the parent’s hierarchy to let the parent object be displayed sharply. 

     Additionally, the focus point can be changed manually through the user interface and the assigned buttons for setting the focus length. However, if an AS3D_FOCUS_GIZMO object is present in the scene, these features are disabled. Switching between manual control and the AS3D_FOCUS_GIZMO is done through the user interface or by pressing the “Tab” key. 

    7  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Guide to the User Interface The user interface allows for direct manipulation of all relevant parameters for autostereoscopic rendering. However, for known autostereoscopic displays the automatic screen detection should have already made all necessary configurations. Additionally, convenient button-control exists for some parameters. There are two options to use it: 

    1. Using the config-codes which are marked on each AS3D monitor. To activate this option, simultaneously press “F1” and “F3”. Dropdown menu - Select and apply default or previously saved settings. Eye Separation [0..0.07] - Set the viewer’s eye separation in meters. Button control: [+ pos1 / home, - ende / end] Use Focus Gizmo - Set true to use the AS3D_FOCUS_GIZMO, set false to manually adjust the focus length Button control: [Tab] Use Jojo - Set true to use the Jojo-effect, set false to distribute the views linearly Button control: [J] Focus Length {0..15] - Define the distance of the focus point for all autostereoscopic render cameras in world coordinates. Button control: [+ einfg / insert, - entf / delete] Resolution Slider [1..8] - Scale down the rendered resolution of all autostereoscopic render cameras by this value to gain performance. Button control: [+ bild auf / page up, - bild ab / page down]  

    2. Using this option to manipulate all parameters or for creating own setting-files by pressing “F2” and “F4” simultaneously. BGR Display - Set true if the subpixels of your display are arranged in bgr fashion, contrary to rgb. Invert Viewport - Set this according to your display’s hardware. Right To Left - Deactivate to invert camera positions in the scene. Render Views [1..8] - Set this to the number of views that your display supports. View Shift [0..7] - Defines the render view of the first viewport subpixel. Lenticular Slope - Set the slope fraction of the lense film. Save Button and Filename Input Field - Save the above settings under the input filename as a .json file.  

    8  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Starting the build The Unity application created with the plugin detects the display’s device ID and automatically loads the corresponding configuration for autostereoscopic output. If an unknown prototype is connected, the new device IDs can be added to the plugin in the next plugin version.  When starting the Unity application, only change the selected output display:  

      The Unity application features shortcuts to tune 3D-autostereo parameters:  Eye Separation [0..0.07] - Set the viewer’s eye separation in meters. Button control: [+ pos1 / home, - ende / end] Focus Length {0.1..200] - Define the distance of the focus point for all autostereoscopic render cameras in world coordinates. Button control: [+ einfg / insert, - entf / delete] 

       

    9  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Unreal Engine This Unreal Engine [UE4] plugin provides autostereoscopic [AUTOSTEREOSCOPY] functionality to your Unreal Engine project. 

    Version This plugin was developed and tested in Unreal Engine 4.21.2. Other Unreal Engine versions may be compatible as well, but have not been tested yet. 

    Licence This plugin is only intended for testing and not for production use. This plugin is not licenced for commercial use. Content created using the plugin is subject to the original author’s license. 

    Link http://3dglobal.ux3d.io/demos/AS3D_Unreal_Plugin.zip 

    Unsupported features In its current state, this plugin does not support post processing effects.    

    10  

    http://3dglobal.ux3d.io/demos/AS3D_Unity_Plugin.zip

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Getting Started 1. If you already have an Unreal Project skip to step 2. Otherwise start the Epic Launcher, 

    launch the engine and follow the dialog to create a new Unreal project. 2. Navigate your file browser to the project folder. If not already present, create a “Plugins” 

    folder in the Unreal Engine project. Copy the unpacked AS3D plugin into this folder. 3. Reopen your project and open the Plugin Browser (Edit > Plugins). 

     Check that the “AutostereoPlugin” shows up in the list of installed plugins under “Rendering” and that it is enabled. 

      

    11  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    4. Open the Project Settings (Edit > Project Settings…). 

     Navigate to “Maps & Modes” > “Default Modes”. If you do not already have a custom one, create a new GameMode by clicking the “+” next to “Default GameMode”. This enables you to change the settings under “Selected GameMode”. There, set “Player Controller Class” to “AutostereoPlayerController”. This is the player controller class used in the AS3D plugin. If you need to use your own Player Controller class, then make sure to subclass it from the “AutostereoPlayerController”.

     5. Press play in the editor. A “3D Global” logo should appear in the bottom left corner of the 

    screen. Press F1 + F3 to open the AS3D UI. In the dropdown menu, choose the configuration code that corresponds to your autostereoscopic display. Now your monitor should display autostereoscopic content. 

       

    12  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Adjusting the Focus Point The Focus Point is best adjusted using the AS3D_FOCUS_GIZMO which can be added to any scene from the content browser. This will add an Actor labeled “AS3D_FOCUS_GIZMO” to your scene that is visualized by this sprite:  

     AS3D_FOCUS_GIZMO in the Unreal viewport 

     Now you have two options:  

    3. Attach the AS3D_FOCUS_GIZMO as a child to the player character of your scene in the desired focus distance. The focus distance will stay at a fixed position using this method.  

    4. Attach the AS3D_FOCUS_GIZMO as a child to another Actor. The autostereoscopic focus plane will dynamically follow the position of the gizmo in the scene. This method allows animating the focus point of your scene at runtime. Notice that the focus point will always stay at the location of the gizmo, so make sure that a child AS3D_FOCUS_GIZMO is positioned at x/y/z = 0/0/0 inside the parent’s hierarchy to let the parent object be displayed sharply. 

     Additionally, the focus point can be changed manually through the user interface and the assigned buttons for setting the focus length. However, if an AS3D_FOCUS_GIZMO object is present in the scene, these features are disabled. Switching between manual control and the AS3D_FOCUS_GIZMO is done through the user interface or by pressing the “Tab” key.  

       

    13  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Guide to the User Interface The user interface allows for direct manipulation of all relevant parameters for autostereoscopic rendering. However, for known autostereoscopic displays the automatic screen detection should have already made all necessary configurations. Additionally, convenient button-control exists for some parameters. There are two options to use it: 

    1. Using the config-codes which are marked on each AS3D monitor. To activate this option, simultaneously press “F1” and “F3”. Dropdown menu - Select and apply default or previously saved settings. Eye Separation [0..0.07] - Set the viewer’s eye separation in meters. Button control: [+ pos1 / home, - ende / end] Use Focus Gizmo - Set true to use the Focus Gizmo, set false to manually adjust the focus length Button control: [Tab] Use Jojo - Set true to use the Jojo-Effect, set false to distribute the views linearly Button control: [J] Focus Length {0.1..200] - Define the distance of the focus point for all autostereoscopic render cameras in world coordinates. Button control: [+ einfg / insert, - entf / delete] Resolution Slider [1..8] - Scale down the rendered resolution of all autostereoscopic render cameras by this value to gain performance. Button control: [+ bild auf / page up, - bild ab / page down]  

    2. Using this option to manipulate all parameters or for creating own setting-files by pressing “F2” and “F4” simultaneously. BGR Display - Set true if the subpixels of your display are arranged in bgr fashion, contrary to rgb. Invert Viewport - Set this according to your display’s hardware. Right To Left - Deactivate to invert camera positions in the scene. Render Views [1..8] - Set this to the number of views that your display supports. View Shift [0..7] - Defines the render view of the first viewport subpixel. Lenticular Slope - Set the slope fraction of the lense film. Save Button and Filename Input Field - Save the above settings under the input filename as a .json file. 

        

    14  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Technical Art Guide Utilizing an autostereoscopic display comprises a couple of momentous indications for an application. In order to properly choose an according architecture, it is mandatory to understand the fundamentals of this technique. The following points should be considered when planning to setup a scene for a 3D display. 

    3D Scene In the first instance, most of the parallax specification is extracted directly from the actual scene space, making it the inviolable architectural center and birthplace of the stereo effect. This includes the following implications.  Autostereoscopic 3D is based on the eye separation of a human being. Therefore, it is irrevocable to stay in these given dimensions, unit sizes in particular. In Unity, 1 unit translates to 1 meter while in UE4, 1 unit translates to 1 centimeter. Ensure all your assets are using this certain scale. This is not only important to ensure correct physics, but is mandatory to create a correct look for the stereoscopic effect. Using e.g. a significantly larger scale will automatically decrease the three dimensionality drastically. This is also relevant for the object distances. Scaling down an object to make it look further away will not result in the same visuals than actually moving it away. This is especially relevant for e.g. distant planes and background images. Several common tricks typical especially for level design in context of games provide high risk of adulterating the visuals on an AS3D display. Make sure to always have in mind to preserve a plausible 3D space in your scene to control the stereoscopic effect.  

     

       

    15  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Focus Point To correctly create the autostereoscopic 3D effect on a large scale display, a specific point of focus is required. Therefore, the AS3D_FOCUS_GIZMO is used. It always needs to be specified. For additional information about the setup, see ‘Adjusting the Focus Point’. It basically describes the center of the users view, including not only it’s planar position on the display, but also the respective depth. Objects that are placed behind the focus point in the scene (positive parallax) appear to be in the distance and too far to be focused, while objects placed in front of the focus point (negative parallax) will appear to be in the front and appear too close to be focussed. 

     To properly lead the viewer’s focus through your scene, the gameobject or actor holding this component should receive special treatment. One option is to have it attached to a fixed object or have it be a child of the camera in a steady distance. This will always focus the some spot in the 3D scene, which could make sense when e.g. having a player character running around in a game. However, especially when changing to another camera cut, e.g. during an animation or when showing a cutscene, the focus point might need to be adjusted. To ensure maximum flexibility, the focus point object should be included in scripting or animating.  

    Camera The multiangle interpretation needed for the autostereoscopic visualization on the display can only be produced by cameras explicitly set up for AS3D and only supports one camera at a time. In Unity by standard, this is the MainCamera. For Unreal this is the regular player camera. All other cameras in the scene will be rendered as a 2D plane on parallax 0, which appears to be the center depth of the display. This has strong implications for multi camera setups like e.g. for split-screen games. 

    16  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    However, it is possible to switch between autostereoscopic cameras at runtime by reassigning the “User Defined Main Camera” in the “Init Camera” component or by switching the target camera tag. 

     

      

    Text The stereoscopic effect allows for displaying text in the environment. However, smaller text or text placed further away from the camera can be hard to read on an autostereoscopic display. Larger distances from the focus point cause heavier ghosting effects. It is recommended to avoid relevant text in small scales or in the distance wherever possible, since the readability can’t be ensured. Interface layers with e.g. HUD elements should not be rendered with the autostereoscopic camera, but on a 2D plane instead. 

    2D 2D scenes can also easily be displayed in stereo, even supporting an orthographic camera. However, a few guidelines need to be considered in this case to receive an autostereoscopic result.  Even 2D elements are only planes in a 3D environment. However, usually 2D application do not use actual depth and the parallax is often rather faked with e.g. different scroll speeds. In this case though, the depth information needs to be set up and the 2D scene has to be translated into the 3D space. Otherwise the stereoscopic effect will not show.  

    17  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

      Another tricky thing about 2D is the sizes. While Unity still works in meters, 2D canvases are usually set up pixel-perfect in the engine resulting in a 1 unit = 1 pixel setup. However, this makes them way too large for the calculated eye separation, resulting in not seeing any stereoscopic effect on the display. If you want to have the 3D effect, make sure to adjust your assets and camera setup accordingly.  The last thing about 2D scenes would be UI scenes. Due to the stereo technique, scenes build with UGUI or UMG/Slate can only be displayed planar at one specific depth layer. UI canvas will always batch sprite and text content into one layered mesh with internal sorting order, but no actual depth information. In Unity there could be a work around that includes multiple canvases for small edge cases, but on application scale, this would be too heavy on the drawcall performance. 

    Testing The most crucial thing for a good autostereoscopic effect is simple and plain testing. Actually seeing the scene running on the stereo display can give the most valuable impressions on how the results work in this setup. It will help verifying the setup as well as pinpointing possible issues. Device testing is especially important during the early stages of development to get a quick impression about the first visual benchmarks of the scene.  

    Visual Guide In order to create a harmonic, pleasing autostereoscopic effect, you should take the following visual guidelines into account.  

    1. A 3D Display is a window Think of the 3D display as a window. Things that should come out through the windows must fit completely inside it. The red bordered cube would not be seen in front of the monitor like this in reality.  If you try to move something out of the window and it touches the border, the object should stay where it is! Effectively the object will be cut of by the monitor borders.  

    18  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Moving an object towards a viewer and passing the screen border will tear of the immersion of the viewer.  Example: 

      

    2. Slow it down Make sure that things that have high parallax are not moving too fast. Especially if they have negative parallax.  

    3. Interposition Check the order of Objects added to a stereo scene in post production. Objects that are in front of others should hide them.   

    4. Interference Sometimes there might be structures that repeat themselves in a certain frequency, like the bars on a jail. A problem might occur if this frequency matches the parallax separation. This can lead to artifacts.  

    5. Camera changes Avoid events changing the camera settings too often. An animated scene can be exhausting to the eye due to frequent cuts to scenes with different focus and parallax values.  

    6. Negative Parallax Avoid using too much negative parallax on longer sequences and make sure these objects are placed in the center of the screen. Viewers will actually find positive parallax (behind the screen) more comfortable.  

    7. Contrast Avoid high contrast on scenes with high parallax. One of the main problems here is due to the LCD technology. Neighboring pixels will tend to light up a bit causing ghosting effects which will destroy the parallax effect. 

    19  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    Asset Guide 

    General Regardless of working with an autostereoscopic scene, make sure your 3D assets fulfill the common good practices of 3D modeling and texturing. Keep in mind that in Unity 1 unit is 1 meter and the y axis is up while in UE4 1 unit is 1 centimeter and the z axis is up. 

    Best Practices 1. Subpixel 

    Try to avoid assets with very small borders, cutout transparencies or noisy normal maps. This can produce ghosting, especially when parts of the texture are displayed smaller than 1 pixel. This also applies to assets that are placed in the distance. The usage of smaller textures, mipmaps and tileable textures help to counterbalance this effect.  

    2. Shaders View dependent materials are usually problematic. Reflection and refraction come to mind. These are problematic because a small change in the viewing angle can cause a major difference in the observable pixel, increasing the error of a wrongly picked subpixel.  

    3. Colors As for colors, most colors are working totally fine with the autostereoscopic effect. Also usual color contrasts can even be utilized to underline the stereoscopic effect of the scene, just like it would on regular displays. However, white can cause artifacts when different subpixels for each eye are observed. Red, blue and green are the safest colors in this regard. It is also possible to set assets with complementary colors beside each other. This will not lead to any ghosting.  Still, this use of color will be exhausting for the eye. A color palette with colors not saturated and a contrast in brightness will be more pleasing for the eye. 

      

    20  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

       

    21  

  •   3D Global GmbH Augustusburger Straße 133 09514 Pockau-Lengefeld, Germany  

    References [3DGLOBAL] https://3d-global.eu/ [AS3D] https://3d-global.eu/ [AUTOSTEREOSCOPY] https://en.wikipedia.org/wiki/Autostereoscopy [GLTF] https://www.khronos.org/gltf/ [JSON] https://www.json.org/ [UNITY3D] https://unity3d.com/ [UX3D] http://www.ux3d.io/  

    22  

    https://3d-global.eu/https://3d-global.eu/https://en.wikipedia.org/wiki/Autostereoscopyhttps://www.khronos.org/gltf/https://www.json.org/https://unity3d.com/http://www.ux3d.io/