Bevy 0.8's New Material System

  Рет қаралды 5,896

Logic Projects

Logic Projects

Күн бұрын

In this tutorial we cover the new material systems in Bevy 0.8 and recreate my old multi-part series in a single video.
Discord Invite: / discord
Patreon: / logicprojects
Final code: github.com/mwbryant/new-bevy-...
0:00 Intro
0:52 Absolute Basics
3:17 Basic Data/Textures in Shaders
5:36 Changing Data in Shaders
8:53 Time and ExtractResource
10:00 Outro

Пікірлер: 33
@ietsization
@ietsization 2 жыл бұрын
impressive how quickly you made a video for the new update. Loved the old one because it explained all the complexity and didn't need this one because it was so straightforward (which says a lot about bevy)
@logicprojects
@logicprojects 2 жыл бұрын
I had already wrote and recorded this on the 0.8 dev branch so I cheated a bit to get this out. It is super easy now but I hoped the second half would be interesting enough to justify the video (the new extraction systems and getting the buffer to update took a bit of engine reading to learn)
@hellnawnaw
@hellnawnaw Жыл бұрын
Thank you for the tutorial, it really helped me to get started with my project!
@peterhayman
@peterhayman Жыл бұрын
thank you so much for updating this!
@diedie5
@diedie5 2 жыл бұрын
This is awesome, thank you for explaining the new material system so clearly. I would love it if you did a video on the new UI system as well!
@logicprojects
@logicprojects 2 жыл бұрын
Has anything with UI really changed? I haven't seen anything beyond they forked the backend and now maintain it themselves but user experience seems to be the same
@gakman
@gakman 2 жыл бұрын
Many thanks for this!
@Phosphoros47
@Phosphoros47 Жыл бұрын
As seen by views and upvotes, all of your videos are highly underrated. Thank you so much for all those tutorials! ❤
@logicprojects
@logicprojects Жыл бұрын
Thank you so much! Growth has been slow and steady and I'm really grateful for all the positive feedback
@jeffg4686
@jeffg4686 2 жыл бұрын
real nice derives
@ARS-fi5dp
@ARS-fi5dp 2 жыл бұрын
Thank you a lot❤
@CenturionSC2
@CenturionSC2 Жыл бұрын
Thanks for making this - really helpful! Maybe you could go a bit slower since it's hard to read and digest the code before it moves on to the next part Cheers : )
@Boxing_Gamer
@Boxing_Gamer 2 жыл бұрын
The engine is progressing so fast that it might soon rival unreal and unity.
@nohz4483
@nohz4483 2 жыл бұрын
It's a great overview, but IMO for a new viewer as me having that much references to the old video is hard to follow, and at the same time I'm not super motivated watching the old one to understand as it's fully outdated :) Nice work tho keep it up
@logicprojects
@logicprojects 2 жыл бұрын
Yeah I thought about that when making this but this was also my 0.8 release announcement video so I targeted it more towards people already around bevy and my channel. But I understand
@i_am_feenster
@i_am_feenster Жыл бұрын
Thank you so much, this is exactly what I needed to get up and running! Can I ask a really stupid question, what font are you using? the bold const `HEIGHT` and `RESOLUTION` look really nice for some reason :P
@logicprojects
@logicprojects Жыл бұрын
Font is Fira Code with ligatures enabled. Color theme is Gruvbox Dark Hard
@i_am_feenster
@i_am_feenster Жыл бұрын
@@logicprojects thank you!
@jeffg4686
@jeffg4686 Жыл бұрын
Do you happen to know much about the camera system as it currently stands? I saw a "DepthCalculation" field on the struct, and didn't know if that could be used for "depth of field" effects. That's certainly something I hope they get in there with the "post" stuff they're gonna be working on (if it's not already part of renderer - haven't tried the depth calculation yet) I was reading article on Unreal, and it's basically just splitting into 3 layers, blurring front and back layers, then blending them all together. That one effect can really change a game imo. Make it much more realistic. they have kinda a "high end" and "low end" modes (cinematic and game) in Unreal. Not a bad idea to have 2 options here even for real-time (support all cards with improved experience if newer card exists in system) That brings up a whole other topic - Feature Detection - but maybe all that stuff just handled under the hood, and not by app dev. I guess it's mostly wgpu based feature detection really, so framework could just shift rendering algorithm incrementally based on hardware 'capacity' available.
@Phosphoros47
@Phosphoros47 Жыл бұрын
I played around a little with materials and shaders too and ask myself, is using prepare and extract necessary, or why can't you just set eg the color property of CoolMaterial directly?
@logicprojects
@logicprojects Жыл бұрын
That would create a new material I think. It's been a while since I've looked at this though so it might have changed. Doing it your way would be easier if it works though
@starlederer
@starlederer 2 жыл бұрын
I love that it is now this easy to create custom materials but i did some testing and found that MaterialMesh2dBundles performs much worse compared to SpriteBundles. 1024 SpriteBundles on the screen: 111fps 1024 MaterialMesh2dBundles (quads): 86fps I am yet to put a finger on what exactly causes such a dramatic performance loss but it is definitely not the shaders or uniform updates because even a shader that simply outputs a color and has no uniforms performs the same. So far I found 1 way to customize a shader with 0 performance loss (performance gain actually, 116fps!). You need to copy Bevy's Sprite implementation and modify it directly but that's a lot of code that needs to be comprehended. My guesses why MaterialMesh2dBundles perform so much worse than SpriteBundles are: * Sprites use hard coded quads instead of mesh resources (most likely) * Sprites have less vertex attributes
@logicprojects
@logicprojects 2 жыл бұрын
This is very interesting. I'd ask on the rendering channels of bevy's discord about this. They are very aggressive about performance and would probably be interested. Thanks for letting me know. My guess would be sprites have batching but maybe material meshes do not but I'm not sure without research
@Yotanido
@Yotanido 2 жыл бұрын
@@logicprojects Sprites are one of the few (only?) things that have batching currently, so this seems likely. That is something that is being worked on for 0.9.
@daizhuoxian
@daizhuoxian 2 жыл бұрын
I think currently storage buffers are left out? You need to go over all the dirty works to use storage buffers
@logicprojects
@logicprojects 2 жыл бұрын
I haven't actually played with them that much. I probably will when I port the live coding project to 0.8. Reading bevy's news it seemed like storage buffers are now much easier to use (specifically the ShaderType derive section of the blog). Is there hidden complexity there the blog leaves out? They claim bevy's internal lights use them so I would reference that as an example
@arikfm
@arikfm Жыл бұрын
You introduce yourself with Howdy, are you an aggie by chance?
@logicprojects
@logicprojects Жыл бұрын
Not personally but I have close friends who are, just a greeting I like the sound of. It's just my ""youtuber"" opening I guess
@arikfm
@arikfm Жыл бұрын
@@logicprojects well now you have another Aggie for a friend 👍 Keep up the good content!
@MichaelAllwright
@MichaelAllwright Жыл бұрын
I feel like video could have been a bit more applicable to a broader audience if more time was spent on discussing some of the basic ideas and principles. For example, (1) what is a shader/shader program/material and when would I use them, (2) what is wgpu, and (3) how can I apply this knowledge to, for example, an existing scene built from GLTF assets in Bevy?
@logicprojects
@logicprojects Жыл бұрын
That's good feedback and you're right but my target audience wasn't that wide for this video. I saw this as my bevy 0.8 release video and I was highlighting specifically what changed in this version of the engine and celebrating the improved ergonomics of a system that I previously had made many detailed videos on. In my new intro series (after more basics videos) I'll be using this and describing it more in the kind of the detail you suggest
@adsick_ua
@adsick_ua Жыл бұрын
imo it is still complicated and intertwined😢
@adsick_ua
@adsick_ua Жыл бұрын
crazy error space and if you get an error it 70% won't tell you much about what to do in order to fix it
Bevy Rendering Demystified
25:30
Logic Projects
Рет қаралды 13 М.
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 60 МЛН
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 55 МЛН
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 9 МЛН
Compute Shaders in Bevy
21:12
Logic Projects
Рет қаралды 11 М.
What's in a wgsl fragment shader? ft Bevy
19:17
chris biscardi
Рет қаралды 11 М.
Rapier Physics Engine Showcase: Rust Physics Engine for Bevy
10:13
Logic Projects
Рет қаралды 15 М.
Hardware Design in Rust - rust-hdl and Intro to FPGAs
21:00
Logic Projects
Рет қаралды 4,3 М.
Handmade Hero in 2024? | let's build a game Engine - day 001
1:27:56
Pathfinding and Async Tasks in Bevy
7:39
Logic Projects
Рет қаралды 8 М.
Bevy 0.11 Release!
3:53
Logic Projects
Рет қаралды 3,4 М.
Iced vs Slint  | Rust GUI Wars #1
10:07
Creative Coders
Рет қаралды 3,4 М.
Сколько реально стоит ПК Величайшего?
0:37
Это Xiaomi Su7 Max 🤯 #xiaomi #su7max
1:01
Tynalieff Shorts
Рет қаралды 2 МЛН
Какой ноутбук взять для учёбы? #msi #rtx4090 #laptop #юмор #игровой #apple #shorts
0:18