How to render an continuously generated image on an 3D object?

100 Views Asked by At

For an art project I use Delphi 10.2. for a Firemonkey FMX Windows 10 desktop application.

I would like to use a continuously animated changing image as TTextureMaterialSource.Texture to be rendered on a TPlane in a TViewport3D.

The changing image is continuously generated: I have a TPanel containing several overlapping TImage. By setting the opacity of each TImage between 0 and 1 I can blend several images together. By individually animating the Opacity of each TImage with TFloatAnimation I get a constantly changing image. (This is working fine.)

How can I achieve that the animated content of the TPanel is rendered in 3D on the TPlane?

1

There are 1 best solutions below

1
SilverWarior On

During design time it is possible to assign TBitmapAnimation instead of regular bitmap as TextureMaterialSoruce.Texture using Add New TBitmapAnimation instead of Edit which allows you to load bitmap from file

Create New TBitmapAnimation

This newly added Bitmap Animation then has ability to chose two bitmap sources that you can easily fade between.

BitmapAnimation

And the same way as you added TBitmapAnimation as TextureMaterialSoruce.Texture you can add new TBitmapAnimation for StartValue and StopValue of your current Bitmap Animation.

This then allows you to nest multiple Animation within each other and thus in the end add ability to combine as many different images into one target texture.

Nested Bitmap Animations