GDevelop-extensions icon indicating copy to clipboard operation
GDevelop-extensions copied to clipboard

New extension: Environment Map

Open Eldarduil opened this issue 7 months ago • 1 comments

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

  • [x] I've followed all of the best practices.
  • [x] I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • [x] 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

Eldarduil avatar May 30 '25 11:05 Eldarduil

👋 Hey Eldarduil, thanks for your submission! Unfortunately, all submitted extensions have to meet some minimal quality standard - the extension best practices - and our system has found that your extension does not fully comply 😔. You can find all of those rules on the GDevelop wiki.

The following issues have been found by the system concerning the respect of those best practices by your extension:

  ⟶ ❌ [Dots in sentences]: Field 'shortDescription' of the extension description misses a dot at the end of the sentence!
  ⟶ ❌ [Dots in sentences]: Field 'description' of the function 'createEquirectangularMap' misses a dot at the end of the sentence!
  ⟶ ❌ [PascalCase for internals names]: Internal name 'createCubeMap' should begin with an uppercase letter (CreateCubeMap)!
  ⟶ ❌ [PascalCase for internals names]: Internal name 'createEquirectangularMap' should begin with an uppercase letter (CreateEquirectangularMap)!

Please update your original submission post with a new zip file containing your extensions updated to follow those guidelines 🙏

github-actions[bot] avatar May 30 '25 11:05 github-actions[bot]