##########
REDsdk 4.1
##########

Welcome to REDsdk 4.1. This version is a minor update to REDsdk 4.0. It has been released just in a 2 month timeframe after REDsdk 4.0, to deliver some small but significant changes and improvements over REDsdk 4.0.

This 4.1 version should be very easy to integrate as almost no changes have occurred since REDsdk 4.0. Nearly all changes are additive.


API Changes
===========

For those that directly want to jump into the details, see all API changes here: :doc:`/additional_resources/bk_rn/bk_rn_api_changes/bk_rn_redsdk_41_api_changes`.


.. toctree::
    :maxdepth: 1
    :hidden:

    /additional_resources/bk_rn/bk_rn_api_changes/bk_rn_redsdk_41_api_changes.rst

Overview of Changes
===================

Key items in REDsdk 4.1 are:
    * Windows 10 support: The ``RED::IGraphicDevice`` method properly detects applications running on Windows 10, and can be used to issue driver recommendations.
    * New .FBX, .OBJ, .DAE file importers: This key delivery lets you easily import data into REDsdk.
    * Realistic material merged into REDsdk: The realistic material is now part of REDsdk for all photo-realistic rendering needs.
    * New unbiased path tracing feedback modes: This is a new image calculation method using REDsdk.
    * Documentation update and new tutorials: See below the list of changes!
    * REDOdaDevice migrated to Teigha 4.01: We did migrate the REDODaDevice source code to the latest Teigha version.


Windows 10 Support
==================

Windows 10 support has been added in REDsdk 4.1. This means that the ``RED::IGraphicDevice::GetOperatingSystem`` call will return ``RED::OS_WIN_TEN_32`` or ``RED::OS_WIN_TEN_64`` if the application is running on Windows 10 32 bits or Windows 10 64 bits.

Consequently, the ``RED::IGraphicDevice`` system has two entry slots for driver recommendations on Windows 10. However, due to the extremely intrusive of the Windows 10 update system, all default driver recommendations (``RED::GPUID::_driver_win_ten_32`` and ``RED::GPUID::_driver_win_ten_64``) are set to ``RED_HW_OS_PROPRIETARY_DRIVER``, indicating that this is the responsibility of Windows 10 to choose the graphic driver.

.. note:: 
        
        This behavior may be changed and specific driver revisions can be chosen using the :doc:`/book/subjects/bk_ba/bk_ba_hp/bk_ba_reddriversbaseeditor`. But before doing so, Windows updates have to be disabled, otherwise, any driver version change may not last for long...


.FBX .OBJ and .DAE File Importers
=================================


REDsdk add an auxiliary module that can be used from the ``RED::IOTools`` class. This is the REDFbx.dll. If present in the application binary folder, this DLL can be used to load .FBX, .DAE, .OBJ and .DXF files into REDsdk. The behavior is similar to loading .red files, and the ``RED::IDataManager`` stores, using contexts, the contents loaded from each file.

See the ``RED::IOTools`` class for details on importing files.

.. note:: 
    
    The REDFbx.dll requires Microsoft Visual Studio 2010 redistribuables on the used computer system.


No More realistic.red!
======================

REDsdk 4.1 does not deliver any 'realistic.red' file anymore. The realistic material can be directly created using ``RED::IMaterial::SetupRealisticMaterial``. This method, which is similar to the ``RED::IMaterial::SetupGenericMaterial`` method also creates the ``RED::IMaterialController`` of the realistic material (which has not been modified since REDsdk 4.0).


New Unbiased Path-Tracing Rendering Mode
========================================

A new feedback mode has been added to REDsdk based on path-tracing. It is turned on when calling ``RED::IWindow::FrameTracing`` by using ``RED::FTF_PATH_TRACING`` as the feedback mode. Current support of the path-tracing feature is limited to rendering with realistic materials only (caustics are not supported either).

Documentation Update and New Tutorials
======================================

The documentation has been completed. All "work in progress" pages have been completed. A small book dedicated to rendering techniques for large assemblies has been delivered (see :doc:`/book/subjects/bk_renderinglargeassemblies`). The documentation of the REDOdaDevice (:doc:`/book/subjects/bk_id/bk_id_dwg_import_using_teigha`) is now accessible.

Some new tutorials:
    * :doc:`/tutorials/workflows/wf_realtime/wf_picking`: Simple picking with a front and back lighting solution to visualize hidden picked geometries.
    * :doc:`/tutorials/workflows/wf_realtime/wf_picking_using_a_lasso`: This is a newer version of the former REDsdk 3.5 lasso picking tutorial. Covers rectangle and lasso picking.
    * :doc:`/tutorials/workflows/wf_realtime/wf_anchoring_viewpoints_in_a_window`: This very simple tutorials details how viewpoints can be anchored into a window for various needs.
    * :doc:`/tutorials/workflows/wf_realtime/wf_integration_into_an_existing_opengl_application`: This is a cross platform example of an OpenGL integration in a configuration where the application already owns a running OpenGL implementation, and OpenGL contexts.
    * :doc:`/tutorials/workflows/wf_realtime/wf_rendering_any_line_thickness_using_quads`: Illustrates the usage of textured quads for the rendering of thick lines.
    * :doc:`/tutorials/workflows/wf_rendering/wf_path_tracing`: Demonstrates the usage of path-tracing as a new feedback mode for REDsdk.


REDOdaDevice Migrated to Teigha 4.01
====================================

The REDOdaDevice source code has been migrated on the latest available version of Teigha to date. Note that this new setup does not embed Teigha anymore. The setup will require you to indicate where Teigha files are to be found. The documentation has been updated. See all details here: :doc:`/book/subjects/bk_id/bk_id_dwg_import_using_teigha`.

