Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example to demonstrate manual generation and UV mapping of 3D mesh (generate_custom_mesh) solve #4922 #8909

Merged
merged 30 commits into from
Jun 23, 2023

Conversation

Adamkob12
Copy link
Contributor

Objective

Solution

  • Add an example that maps a custom texture on a 3D mesh.

Changelog

Added the texture itself (confirmed with mod on discord before it should be ok) to the assets folder, added to the README and Cargo.toml.

@Adamkob12 Adamkob12 closed this Jun 21, 2023
@Adamkob12 Adamkob12 deleted the solve_issue_4922 branch June 21, 2023 02:18
@Adamkob12 Adamkob12 restored the solve_issue_4922 branch June 21, 2023 02:19
@github-actions
Copy link
Contributor

You added a new example but didn't update the readme. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

@Adamkob12 Adamkob12 reopened this Jun 21, 2023
@alice-i-cecile
Copy link
Member

Can you swap to a more descriptive title? :) This won't be very useful when looking at the git log or commit list.

@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Examples An addition or correction to our examples labels Jun 21, 2023
@Adamkob12 Adamkob12 changed the title Solve issue #4922 Adding example for applying custom texture (3d_custom_image) solve #4922 Jun 21, 2023
Copy link
Contributor

@nicopap nicopap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is worthwhile. I don't think we had an example demonstrating how to create and edit meshes before. It's nice to show how to access and set mesh attributes. Very important, as it's something I'd suspect everyone making a 3d game would need to eventually do.

What I'd like to see

So what needs to be done:

  • Rename the example to something more descriptive
  • Remove the assets/textures/custom_image_for_example.png and use
    array_texture.png in the example instead.
  • Fix the direction labels in comments
  • Fix wording in "see docs"
  • (optionally) a very small bit of "update the UVs to different values when
    a key is pressed" in the example, this would also showcase how to edit
    an existing mesh
    .

examples/3d/3d_custom_image.rs Outdated Show resolved Hide resolved
assets/textures/custom_image_for_example.png Outdated Show resolved Hide resolved
examples/3d/3d_custom_image.rs Outdated Show resolved Hide resolved
examples/3d/3d_custom_image.rs Outdated Show resolved Hide resolved
examples/3d/3d_custom_image.rs Outdated Show resolved Hide resolved
examples/3d/3d_custom_image.rs Outdated Show resolved Hide resolved
Adamkob12 and others added 2 commits June 22, 2023 16:23
format

Co-authored-by: Nicola Papale <nicopap@users.noreply.github.com>
@github-actions
Copy link
Contributor

You added a new example but didn't update the readme. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

@Adamkob12
Copy link
Contributor Author

Changed the texture, added a toggle to switch between textures, clean up & format

@Adamkob12 Adamkob12 requested a review from nicopap June 22, 2023 23:20
Co-authored-by: Sélène Amanita <134181069+Selene-Amanita@users.noreply.github.com>
Co-authored-by: Sélène Amanita <134181069+Selene-Amanita@users.noreply.github.com>
@alice-i-cecile
Copy link
Member

Thank you both for your patience and thorough work on this!

Co-authored-by: Sélène Amanita <134181069+Selene-Amanita@users.noreply.github.com>
Co-authored-by: Sélène Amanita <134181069+Selene-Amanita@users.noreply.github.com>
@Selene-Amanita
Copy link
Member

Selene-Amanita commented Jun 23, 2023

I put a lot of nitpicky comments, but I'm actually pleased by this example even if we ignore my proposed changes, it looks really nice and is pretty clear, looks good to me (modulo typos), good job!

Adamkob12 and others added 4 commits June 23, 2023 22:08
Co-authored-by: Sélène Amanita <134181069+Selene-Amanita@users.noreply.github.com>
Co-authored-by: Sélène Amanita <134181069+Selene-Amanita@users.noreply.github.com>
Co-authored-by: Sélène Amanita <134181069+Selene-Amanita@users.noreply.github.com>
Co-authored-by: Sélène Amanita <134181069+Selene-Amanita@users.noreply.github.com>
@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 Jun 23, 2023
@Adamkob12
Copy link
Contributor Author

Sorry for all the typos, I swear I read these back but it's like I'm blind to them...
PS: When I commit a lot of changes one by one, do you get spammed with notifications? I'll try to do it all in one commit in the future if you do.

@alice-i-cecile
Copy link
Member

Awesome work, merging now!

@alice-i-cecile alice-i-cecile enabled auto-merge June 23, 2023 19:10
@Selene-Amanita
Copy link
Member

Selene-Amanita commented Jun 23, 2023

Sorry for all the typos, I swear I read these back but it's like I'm blind to them... PS: When I commit a lot of changes one by one, do you get spammed with notifications? I'll try to do it all in one commit in the future if you do.

No problem for the typos, happens to everybody

I think I have notifications but it's not really a problem and it can probably be changed in settings, do what it takes to make the best PR you can don't worry about that ^^

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 23, 2023
Merged via the queue into bevyengine:main with commit 75c6641 Jun 23, 2023
@Adamkob12 Adamkob12 deleted the solve_issue_4922 branch June 23, 2023 19:51
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.

Add an example that demonstrates how to set the texture of 3D meshes from images
4 participants