Skip to main content

3D Basic Solution

Summary

This solution represents a basic example that shows the fundamentals of how to compose a 3D scene. ThisIt includesdemonstrates aseveral 3D-object,key afeatures lightof and3 adimensional cameracompositing thatusing isCGI linkedStudio toScene aComposer. render-target.

Purpose

The solution showsincludes whichall elements that are necessary to render a basic 3D scene. It additionally contains a 2D scene, an animation and a state machine. The 3D object's appearance is enhanced using image mapping as well as bump mapping.

Description

This sample solution shows a 3D scene with a rotating cube in front of a 2D scene that acts as background.

    The 3D scene contains a 3D model with two textures. The 2D scene with the Candera logo is rendered in the background. The cameras of the 3D and 2D scene are configured so that the scenes are rendered correctly.
    An Animation rotates the 3D scene's cube around the y-axis. In the State Machine both scenes are activated and the animation is started.

    grafik.png

    Detailed Description

    3D Scene

    There is one 3Da3D scene in the solution.

    drawing-7-1676512119.png

    grafik.png

    ThisThe 3D scene consists of

    • a sphere (3D-model)
    apoint light source
    a camera a box (3D model) with a bump mapping appearance configured by two textures and a shader programm 

    grafik.png

    2D
    Scene

    There is a 2D scene in the solution that is rendered in the back and acts as a background. 

    grafik.png

    The 2D scene consists of 

      a 2D camera isa BitmapNode with a background image

      grafik.png

      Cameras and Render Target

      The cameras are linked to a created render-target which is necessary for rendering. The render-target is linked to a display.


      A correct configuration of the cameras' properties ensures that the 3d foreground scene is rendered over the 2d background scene without any visual side effects. Clearing the buffer and swapping is configured accordingly.

      grafik.png

      Animation

      An animation rotates the cube around the y-axis. The distance of the 2 key frames define the speed of this rotation.

      grafik.png

      State Machine

      A State Machine is configured to perform the following actions when entering the State:

        activate Scene 3D
        activate Scene 2D (as background) configure and play the animation in replay repeat mode

        grafik.png