CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
[CriMana] Alpha movie / additive blending movie

Description of the sample

Overview

cri4u_samples_crimana_adv01_additive.png

This sample demonstrates how to use movies with alpha channel or additive blending.
In particular, there are three demonstrations.
  1. Movie with alpha channel: the "STAGE 1, START" caption is displayed on the center of the upper part of the screen
  2. Movie with additive blending: the "LEVEL UP" caption is displayed on the right in the lower part of the screen
  3. Opaque movie: the "LEVEL UP" caption is displayed on the left in the lower part of the screen
    All three demonstrations are automatically run by the CriManaMovieController component. No other script controls them.

Scene information


Middleware CRI Sofdec (CRI Mana)
Sample Advanced samples
Location /CRIWARE/SDK/unity/samples/UnityProject/Assets/Scenes/crimana/advanced/
Scene file Scene_01_AlphaAndAdditive.unity


Description of the program

This sample demonstrates an alpha movie and an additive blending movie.


What is a movie with an alpha channel?

This is a movie file that includes an alpha value (transparency information) for each pixel.
It is used to make some parts of a movie partially or totally transparent, such as the background of a character or some colored glass.
This sample program uses such a movie to show the "STAGE 1, START!" caption.

cri4u_samples_crimana_adv01_view_alpha.png

What is a movie using additive blending?

A movie file using additive blending does not have any alpha values in itself. Color information of the movie is added to the background when it is rendered.
Therefore, the movie file itself is an opaque movie with a black background.
This sample program uses additive blending to show the "LEVEL UP" caption.

cri4u_samples_crimana_adv01_view_add.png

Attention
An additive blending movie is different from an alpha plus movie.

[Movies] objects

This sample's three demo movies are displayed three plate polygons fixed in front of the camera.
These objects are children of the "Movies" object.

Playing a movie with an alpha channel

For the "STAGE 1, START!" demo, a normal alpha movie is used.
In the "Alpha" object, you can specify the name of the movie file to play by the CriManaMovieController component as well as the playback options.
If an alpha movie file is specified, alpha blending is enabled when the movie is rendered.

cri4u_samples_crimana_adv01_component.png

  • Movie Path: Name of a movie file. Place the movie file in the StreamingAssets folder.
  • Play On Start: Select this option to start the movie when the object is created.
  • Additive Mode: If you select this option for an alpha movie, the process for an alpha plus movie is performed, resulting in a different look.

Playing a movie using additive blending

A movie with additive blending is used for the "LEVEL UP" caption at the bottom-right part of the screen.
In the "NoneAlpha / Additive " object, you can set the name of the movie file to be played by the CriManaMovieController component, as well as the playback options.
When a movie file with no alpha values is specified, a normal shader is used.
To enable additive blending, select the "Additive Mode" option of the CriManaMovieController component.

Playing a normal movie

A normal movie is used for the "LEVEL UP" caption in the bottom-left part of the screen.
In the "NoneAlpha / NoneAdditive" you can set the name of the movie file to be played by the CriManaMovieController component as well as the playback options.
It is placed so that it is easy to compare it with a movie using additive blending.