Skip to content

Improve lighting in more examples#12021

Merged
alice-i-cecile merged 13 commits intobevyengine:mainfrom
BD103:light-demos
Feb 26, 2024
Merged

Improve lighting in more examples#12021
alice-i-cecile merged 13 commits intobevyengine:mainfrom
BD103:light-demos

Conversation

@BD103
Copy link
Copy Markdown
Member

@BD103 BD103 commented Feb 21, 2024

Objective

Solution

  • Increase lighting in skybox, spotlight, animated_transform, and gltf_skinned_mesh.
  • Improve spotlight example.
    • Make ground plane move with cubes, so they don't phase into each other.
    • Batch spawn cubes.
    • Add controls text.
    • Change controls to allow rotating around spotlights.

Showcase

Skybox

Before:

image

After:

image

Spotlight

Before:

image

After:

image

Animated Transform

Before:

image

After:

image

gLTF Skinned Mesh

Before:

image

After:

image

Changelog

  • Increased lighting in skybox, spotlight, animated_transform, and gltf_skinned_mesh examples.
  • Improved usability of spotlight example.

There's one other place where I want to use `spawn_batch`, but it uses children entities which makes it more difficult. For now I've added a comment.
Make ground plane move with the cubes, so the cubes don't seemingly phase through the floor. Additionally optimize movement code to only calculate translation once.
@BD103 BD103 added A-Rendering Drawing game state to the screen C-Examples An addition or correction to our examples labels Feb 21, 2024
Also remove a leftover todo comment.
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Feb 26, 2024
@alice-i-cecile
Copy link
Copy Markdown
Member

@BD103 this conflicted with your other PR. can you resolve merge conflicts please?

@BD103
Copy link
Copy Markdown
Member Author

BD103 commented Feb 26, 2024

Conflicts resolved! The typos CI job is failing for unrelated reasons, so that can be ignored.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 26, 2024
Merged via the queue into bevyengine:main with commit b96193e Feb 26, 2024
@BD103 BD103 deleted the light-demos branch February 26, 2024 18:07
msvbg pushed a commit to msvbg/bevy that referenced this pull request Feb 26, 2024
# Objective

- bevyengine#11868 changed the lighting system, forcing lights to increase their
intensity. The PR fixed most examples, but missed a few. These I later
caught in bevyengine/bevy-website#1023.
- Related: bevyengine#11982, bevyengine#11981.
- While there, I noticed that the spotlight example could use a few easy
improvements.

## Solution

- Increase lighting in `skybox`, `spotlight`, `animated_transform`, and
`gltf_skinned_mesh`.
- Improve spotlight example.
- Make ground plane move with cubes, so they don't phase into each
other.
  - Batch spawn cubes.
  - Add controls text.
  - Change controls to allow rotating around spotlights.

## Showcase

### Skybox

Before:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/8ba00d74-6d68-4414-97a8-28afb8305570">

After:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/ad15c471-6979-4dda-9889-9189136d8404">

### Spotlight

Before:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/53f966de-acf3-46b8-8299-0005c4cb8da0">

After:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/05c73c1e-0739-4226-83d6-e4249a9105e0">

### Animated Transform

Before:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/6d7d4ea0-e22e-42a5-9905-ea1731d474cf">

After:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/f1ee08d6-d17a-4391-91a6-d903b9fbdc3c">

### gLTF Skinned Mesh

Before:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/547569a6-d13b-4fe0-a8c1-e11f02c4f9a2">

After:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/34517aba-09e4-4e9b-982a-a4a8b893c48a">

---

## Changelog

- Increased lighting in `skybox`, `spotlight`, `animated_transform`, and
`gltf_skinned_mesh` examples.
- Improved usability of `spotlight` example.
msvbg pushed a commit to msvbg/bevy that referenced this pull request Feb 26, 2024
# Objective

- bevyengine#11868 changed the lighting system, forcing lights to increase their
intensity. The PR fixed most examples, but missed a few. These I later
caught in bevyengine/bevy-website#1023.
- Related: bevyengine#11982, bevyengine#11981.
- While there, I noticed that the spotlight example could use a few easy
improvements.

## Solution

- Increase lighting in `skybox`, `spotlight`, `animated_transform`, and
`gltf_skinned_mesh`.
- Improve spotlight example.
- Make ground plane move with cubes, so they don't phase into each
other.
  - Batch spawn cubes.
  - Add controls text.
  - Change controls to allow rotating around spotlights.

## Showcase

### Skybox

Before:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/8ba00d74-6d68-4414-97a8-28afb8305570">

After:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/ad15c471-6979-4dda-9889-9189136d8404">

### Spotlight

Before:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/53f966de-acf3-46b8-8299-0005c4cb8da0">

After:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/05c73c1e-0739-4226-83d6-e4249a9105e0">

### Animated Transform

Before:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/6d7d4ea0-e22e-42a5-9905-ea1731d474cf">

After:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/f1ee08d6-d17a-4391-91a6-d903b9fbdc3c">

### gLTF Skinned Mesh

Before:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/547569a6-d13b-4fe0-a8c1-e11f02c4f9a2">

After:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/34517aba-09e4-4e9b-982a-a4a8b893c48a">

---

## Changelog

- Increased lighting in `skybox`, `spotlight`, `animated_transform`, and
`gltf_skinned_mesh` examples.
- Improved usability of `spotlight` example.
@alice-i-cecile alice-i-cecile added this to the 0.13.1 milestone Feb 27, 2024
mockersf pushed a commit that referenced this pull request Feb 27, 2024
- #11868 changed the lighting system, forcing lights to increase their
intensity. The PR fixed most examples, but missed a few. These I later
caught in bevyengine/bevy-website#1023.
- Related: #11982, #11981.
- While there, I noticed that the spotlight example could use a few easy
improvements.

- Increase lighting in `skybox`, `spotlight`, `animated_transform`, and
`gltf_skinned_mesh`.
- Improve spotlight example.
- Make ground plane move with cubes, so they don't phase into each
other.
  - Batch spawn cubes.
  - Add controls text.
  - Change controls to allow rotating around spotlights.

Before:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/8ba00d74-6d68-4414-97a8-28afb8305570">

After:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/ad15c471-6979-4dda-9889-9189136d8404">

Before:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/53f966de-acf3-46b8-8299-0005c4cb8da0">

After:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/05c73c1e-0739-4226-83d6-e4249a9105e0">

Before:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/6d7d4ea0-e22e-42a5-9905-ea1731d474cf">

After:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/f1ee08d6-d17a-4391-91a6-d903b9fbdc3c">

Before:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/547569a6-d13b-4fe0-a8c1-e11f02c4f9a2">

After:

<img width="1392" alt="image"
src="https://github.com/bevyengine/bevy/assets/59022059/34517aba-09e4-4e9b-982a-a4a8b893c48a">

---

- Increased lighting in `skybox`, `spotlight`, `animated_transform`, and
`gltf_skinned_mesh` examples.
- Improved usability of `spotlight` example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Examples An addition or correction to our examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants