Тёмный

Unreal Engine 5 Light Weight Instances | New Feature |  

Amir Ansari
Подписаться 533
Просмотров 19 тыс.
50% 1

Unreal Engine 5 tutorial and break down of a new feature introduced in #UE5 called Light Weight Instances or LWI. It's useful for Instancing Actors, especially for Open World or Large scale games.
Socials:
Twitter: / amiransari09

Наука

Опубликовано:

 

17 апр 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 53   
@amiransarimy97
@amiransarimy97 2 года назад
I've uploaded another video on how to setup Light Weight Instances from scratch ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Zgt6Wx-wlKE.html
@niceguy8142
@niceguy8142 Год назад
amazing as always i love ur tutorial help me alot please don't stop to teach unreal stuff
@crazyguy7585
@crazyguy7585 8 месяцев назад
Thanks A lot for this valuable Information but I have a question how can we turn them back to light weight for example if i drop pickup i want to turn my pickup into light weight if this possible that will save lot of Performance.
@charlesscholton5252
@charlesscholton5252 12 дней назад
This is an amazing feature I was not aware about. Thank you very much for these videos.
@namrog84
@namrog84 Месяц назад
Super helpful! keep it up! It'd be great to see 2 extra scenario breakdowns. Multiplayer/replication example a object that has multiple static mesh components on it, represented as a singlar actor (e.g. a table with items on it)
@vicwaberub5297
@vicwaberub5297 2 года назад
ISM, HISM, Auto-Instancing and now Light Weiht Instances: I think i'm losing track of the advantages, disadvantages, and intended uses. What does the new technology offer in terms of performance compared to the old ones?
@genesisflores2585
@genesisflores2585 Год назад
Thank you for the amazing videos, I love how you throughly explain things. Also, cute voice 😅😊
@olaufr
@olaufr Год назад
Thank you! Very useful, I'm going to use this heavily instead of HISM, I hope Epic will make this native or out of beta soon.
@Trait74
@Trait74 2 года назад
Very helpful! thank you!!
@amiransarimy97
@amiransarimy97 2 года назад
Glad you found it useful! :)
@Sluggernaut
@Sluggernaut Год назад
Thanks so much for this
@HeavensDisciplesGames
@HeavensDisciplesGames 2 года назад
Thanks for sharing. This will come in handy for procedural generation! I'm having some issues with HISMs in UE5.
@amiransarimy97
@amiransarimy97 2 года назад
Hey glad you found it useful :)
@zz6838
@zz6838 Год назад
Thank you!Maybe epic should update their doc timely
@gonzalomorales1593
@gonzalomorales1593 2 года назад
Hola muchas gracias por este video, por favor podrías explicar cómo implementarlo desde cero y si es compatible con mesh destruibles gracias.
@hullabulla
@hullabulla Год назад
You also need to do this in development editor and not ind ebug game I've noticed or else the chairs just disappear. Thanks for the tutorial, it was great!
@xMrDog
@xMrDog Год назад
If I follow the steps between 1:00 and 1:24, without editing any blueprints, will I have an instanced mesh? For example, I make a window, I add a Hierarchical InstancedStaticMesh as you've shown. Now, if I duplicate the mesh by doing simply copy and paste, will the second mesh require calculation or will it be instanced? I tried to do so, and it created another statichmeshcomponent under the main one. I wanted to know this, I only found the procedure in your tutorial, thank you in advance.
@YuuJer
@YuuJer 2 года назад
cool vid! i guess this only affects cost of interactive objects in the scene, but not for actual rendering the object itself right? like if it was all nanite, or nanite LWI, would the LWI run faster?
@amiransarimy97
@amiransarimy97 2 года назад
Thanks for watching! Glad you found it useful. Yeah it's a more optimized way of having a large number of actors in the level. As for the rendering , The meshes are instanced so they are rendered in a batch , which essentially is cheaper than placing/rendering individual meshes. I haven't looked into whether Nanite works with Mesh instancing or not.
@seanrodrigues8323
@seanrodrigues8323 2 года назад
Can I select an actor blueprint and convert it into a Light Weight Instance?
@user-dr1eb4fe8t
@user-dr1eb4fe8t 2 года назад
Nice video but I have a question. You showed how the LightWeightInstances become the real BP_Chair once you interact with them but is this also reversable if you dont interact anymore? Maybe with one of the functions you mentioned?
@amiransarimy97
@amiransarimy97 2 года назад
Thanks for the kind words! Yeah so the system does not automatically convert it back to Light weight instances, but you can do it manually by calling "ConvertActorToLightWeightInstance" and pass the actor you want to convert to a Light weight instance as the parameter.
@joeymalta749
@joeymalta749 Год назад
It seems very finicky using it in runtime. I tried spawning some actors in runtime and converting them to lightweight instances. They dissapear, but if i shut down the game they show up as instances in the editor. What if you want them to become instances on the go ? Spawn them and then make them instances? there isnt much about it online
@XelanaterEllevanox
@XelanaterEllevanox 2 года назад
You mention that other information about the actor, in addition to the transform can be added. How would you add additional value types (float, boolean, etc) about the actor?
@amiransarimy97
@amiransarimy97 2 года назад
Sure, You can take a look at the ALightWeightInstanceManager::SetDataFromActor, So what you can do is to Create you own manager derived from "ALightWeightInstanceManager" then override the function called "SetDataFromActor". Then within the function you can customize what you wish to store when the actor is converted into a light weight instance. You also want to inherit from the FLWIData structure and add the properties you need and to in order to tell the manager to use your new struct, you can override AllocateInitData and allocate your own struct instead.
@XelanaterEllevanox
@XelanaterEllevanox 2 года назад
Alright, thanks. I will be taking a look to see if I can add what I need.
@XelanaterEllevanox
@XelanaterEllevanox Год назад
After some time, I've been unable to succeed. As someone with no prior C++ experience, this is beyond what I am able to accomplish. Would you be willing to make a short tutorial of how to add a few other basic variable types, in addition to the transform? I'm working on a voxel game like Minecraft, where each block is an actor that gets converted into a LW Instance. However, since each block requires more data than a single mesh and transform (such as block id, material, even shape), I am unable to implement all the visual differences for blocks that have been converted into LW Instances.
@Skalbemann
@Skalbemann Год назад
Holy shit!
@chromativerse
@chromativerse Год назад
Hello, every time I try to add a static mesh to the InstancedStaticMeshComponent (the step at 5:13) the editor instantly crashes. Do you know why this might be happening? Edit: Nevermind, I watched your other video and figured it out.
@ymi_yugy3133
@ymi_yugy3133 2 года назад
Do you have the project files? For me the instances just vanish when I convert them to a lightweight instance.
@amiransarimy97
@amiransarimy97 2 года назад
Interesting, have you setup the hierarchical instanced static mesh component Mesh ? It should be set on the manager. I’ll try to get a project file and upload it for you.
@RobCardIV
@RobCardIV 2 года назад
holy shit. could the performance really rival ISMCs X_x. Thanks. Ill have to practice this.
@blackdevilcreations
@blackdevilcreations Год назад
That is supercool!! And makes my thought about buying an instance pool plugin obsolete 😅 This will push my Keeper-Like Gridmap to a more performant Level
@gonzalomorales1593
@gonzalomorales1593 2 года назад
Hello, thank you very much for this video, could you please explain how to implement it from scratch and if it is compatible with destructible meshes, thank you.
@amiransarimy97
@amiransarimy97 2 года назад
Hi thank you for the kind words , this video pretty much explains how to setup one from scratch. But if there is anything specific you need clarification on let me know . As for being compatible with destructible, You can definitely convert it back to a full actor and destruct the mesh right before the destruction. E.g right after getting hit by a axe , convert it to a full actor and then destruct it.
@seanrodrigues8323
@seanrodrigues8323 2 года назад
Can select an actor blueprint and convert it into a Light Weight Instance?
@amiransarimy97
@amiransarimy97 2 года назад
Yes, you need to enable the LightWeightInstancesEditor plugin, as shown at time stamp 2 minute and 10 seconds , then you should be able to select an actor in the world and use the actor menu at the top of the screen to convert it.
@seanrodrigues8323
@seanrodrigues8323 2 года назад
@@amiransarimy97 Hello, may I ask for more of your guidance.
@seanrodrigues8323
@seanrodrigues8323 2 года назад
1. I enabled the LightWeightInstances­Editor plugin. 2. Currently the Actor in the world is an Actor Blueprint. I selected the actor Blueprint. 3. Where can I find the "actor menu" at the top of the screen to convert the actor blueprint to a light weight instance. 4. The actor blueprint does not have the "Variable Name" so I cannot enable the "InstancedStaticMesh Component" noted at time index 4:47 5. Do I need to convert the actor blueprint to a standard static Mesh, then try to make a Light weight instance out of it?
@amiransarimy97
@amiransarimy97 2 года назад
@@seanrodrigues8323 Have you created the Manager blueprint referenced at 4:20 and placed it in the world? As for the Actor menu, you can see the reference at 5:50. 4. When you created the manager class, you have to select the one named "LightWeightInstanceStaticMeshManager" as the parent. I might do another video soon, showing in detail how to set up one! Let me know if you have any other question
@amiransarimy97
@amiransarimy97 2 года назад
I've uploaded a new walkthrough video on how to setup Light Weight instances from scratch , let me know if that helps :) ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Zgt6Wx-wlKE.html
@internetexplorer781
@internetexplorer781 2 года назад
When you say "We are only storing its transform...". This is not entirely true, under the hood those are just good old HISM components which properties are hidden. Nice video though!
@amiransarimy97
@amiransarimy97 2 года назад
Thanks for the kind word! You might be confusing lightweight instances with HISM, The use of HISM is only for the rendering side of Light instances. In fact, Lightweight instances are not only meant to be used for actors with meshes. you can have a lightweight instance of an actor that is entirely data-oriented and does not require rendering. I only use LightWeightInstance Static Mesh so I could show a visualization of how the system works in the video but you can use lightweight instances without any mesh or rendering. it's more than just hiding properties. You can refer to How the engine now treats Tracing and casts, you no longer get an actor but instead an ActorHandle which is just an id of the Actor that has been traced. In fact, The majority of the engine has been changed to accommodate lightweight instances. I suggest you look into LightWeightInstance Manager to see how the process is implemented under the hood. When you convert an actor to a lightweight instance, The actor is removed from the world and only its Transform is stored which is mapped to a Handle Id then the moment you convert the instance back to an actual actor, the actor gets created at the transform. Few places I would recommend looking at , if you are interested in learning about Light Weight instances : 1 - ALightWeightInstanceManager 2 - FLightWeightInstanceSubsystem 3 - FHitResult, Where instead of an actor you get a "FActorInstanceHandle HitObjectHandle". Let me know if you still need more info , I'll be glad to help out😊
@internetexplorer781
@internetexplorer781 2 года назад
Yea, i think i mixed it with LW Instance static mesh manager. My bad! :) In that case.. that sounds fairly cheap to use.
@amiransarimy97
@amiransarimy97 2 года назад
@@internetexplorer781 Yeah it's amazing stuff!
@cafo5997
@cafo5997 2 года назад
Hi Amir, it is just me or it is broken in .1 ?
@amiransarimy97
@amiransarimy97 2 года назад
Hi Fabrizio, Thanks for watching :), I recorded this video in UE 5.0.1, Is there anything specific that seems broken?
@cafo5997
@cafo5997 2 года назад
@@amiransarimy97 Thanks to you for the video :) I don't know really what happens, at first it just kept crashing for an assert but we work around that by setting the seed as the first thing in the blueprint different from 0. Now it doesn't crash but when I choose my BP and then go to the Change to LightWeight in the Actor panel, my BP just disappears. If I add instances to the manager, they don't show up. I'm probably missing something very stupid here... Haven't you experienced the crashes for the asserts? HierarchicalInstancedStaticMesh.cpp #3186
@amiransarimy97
@amiransarimy97 2 года назад
@@cafo5997 Yeah I've experienced the crash as well when you set the HISM component mesh before setting the Random Seed. Interesting, I'll try the Light Weight instances again tomorrow and probably record a video if I can.
@cafo5997
@cafo5997 2 года назад
@@amiransarimy97 Oh, I get It. Well, no rush don't worry! And thanks again :)
@amiransarimy97
@amiransarimy97 2 года назад
@@cafo5997 Hey i think i figured it out, The BP just disappearing also happened to me, so there seems to be a bug , and the work around is to Place the manager in the world , Save the level , restart the editor and then actually convert the actors to light weight instances. I've also uploaded a new video on it : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Zgt6Wx-wlKE.html
@Soheil2030
@Soheil2030 Год назад
داداش فارسی فعالیت کن جامعه بازی سازی داخل کشور به امثال شما احتیاج داره!
Далее
Good dad 🥰 #demariki
00:17
Просмотров 2,1 млн
Would you help?!😳
00:32
Просмотров 3,8 млн
Demystifying the Skylight [Unreal Engine 4 & 5]
13:47
Просмотров 193 тыс.
AI Makes a Physics Engine (ChatGPT)
6:21
Просмотров 17 тыс.
Learning Unreal Engine in One Month to make a Game!
15:25
Unreal Engine Materials in 6 Levels of Complexity
44:12
Самый дорогой кабель Apple
0:37
Просмотров 318 тыс.
Acer Predator Тараканьи Бега!
1:00
Просмотров 337 тыс.