Skip to content

New extension: Environment Map #1691

Open
@Eldarduil

Description

@Eldarduil

Description

Provides two ways to create environment map. (Cube Map and Equirectangular Map)

It applies the image texture to the threejs environment map. and It has also option to apply same texture to the gdevelop scene background. On this one it override the gdevelop render. Because on default gdevelop's only option for background is color picker, we can't put images to the scene backgrounds. So that makes the game freeze at the beginning till the images load for the background.

For the Equirectangular image method: Because threejs scene is Y up the background and environment map created is not suitable for Z up games.
Unless gdevelop start to use threejs version 162 and above. 162 is the first time environment map and background rotations implemented. When Gdevelop migrates to newer threejs version I will update this extension to provide easy way to rotate environment map to Z up.

For the cube map: images can be edited externally to get the desired orientation.

Also when Gdevelop adds a .hdr file support this extension can be updated for that too.

How to use the extension

Why do you need this?
3D models with reflective surfaces (metalness/roughness) will reflect this Environment Map.
Your scene will be illuminated realisticly with this Environment Map.
Good for creating static Skyboxes that covers entire 360° Scene background.

How to use this?
Cube Map: Use tools like https://matheowis.github.io/HDRI-to-CubeMap/ to create a CubeMap from HDRI images.
Equirectangular Map: Use HDRI preview images from sites like https://polyhaven.com/
Make sure to choose "Keep Model Material" in 3D model's object properties

Limitations
This is not for realtime reflections, your reflections are gonna be static image.
Gdevelop doesn't have .hdr file format support, Only image formats (png, jpg etc.) can be used.
In Gdevelop Threejs scene is Y up oriented. For your Z up game, Cube Map textures needs to be setup manually for desired result.

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?

Community (Unreviewed)

Example file

Environment Map Example.zip

Extension file

EnvironmentMap.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions