Video with a small bulge/curve in decentraland

175 Views Asked by At

I made a simple billboard in blender with a curve in it. I'd like to now how I can add a video to it with the same curve. The video needs to be loaded separately in dcl. I can now modify the video with Typescript (Threejs or babylonjs). Is there a simple way to curve that video/image?

1

There are 1 best solutions below

0
On
  1. Curved screens are made by creating a parent Entity, and placing multiple planes inside of it, each with the same video Texture applied to each plane.

  2. You will then have to offset and rotate each plane so that it gets its curved shape. (Toughest part)

  3. You will then have to apply a unique UV map to each plane so that each strip of the video only shows the correct part of the video. https://github.com/pmacom/dcldash/blob/818b3627751e491173cbeef5ea436fbe69d1c1e4/src/utils/Uvs.ts#L3 contains a helper function for generating the proper UVs for each plane. You can probably just copy it directly into your project. Usage is as follows:

    planeshapes.forEach((planeshape: PlaneShape, index: number) => { planeShape.uvs = Dash_UV_Curved_Video(planeshapes.length-1, index) })

Hopefully this helps