UE4 With Casey - Construction Script & Instanced Meshes

  Рет қаралды 12,376

UE4WithCasey

UE4WithCasey

Күн бұрын

Пікірлер: 31
@joshuakozlowski1106
@joshuakozlowski1106 6 жыл бұрын
Whoa, I had no idea that changes in the constructor propagated in the editor before run time. How did a 50+ hour unreal course forget to mention this. Awesome video as always Casey!
@kv7164
@kv7164 5 жыл бұрын
They way i understand construction scripts is that its the actual spawn / construction of an object based on that class, like a Weapon class could have very different weapons spawned based on the variables that are given to the construction script.
@ue4withcasey391
@ue4withcasey391 5 жыл бұрын
In reality the construction script is just a tool. It has no defined purpose and we can use it for whatever we need. docs.unrealengine.com/portals/0/images/Programming/UnrealArchitecture/Actors/ActorLifecycle/ActorLifeCycle1.png With this image, you can see that the construction script and begin play fill the same need of happening before tick and any gameplay interaction. However, construction script runs before component initialization. So if you aren't using the construction script to manipulate components, you are better off putting your code on begin play to manipulate variables.
@MiniGameStudio
@MiniGameStudio 5 жыл бұрын
Thank you. This helped me alot to understand the construction scripts usage.
@zest2heed
@zest2heed 2 жыл бұрын
Thanks , very useful tutorial, How to add a assembly components/parts to a instance?
@R-SXX
@R-SXX 2 жыл бұрын
I wonder if you could use the CS for stuff like vehicle customization? If I have 3 different rims, could I theoretically use the CS to change the bone of a skeletal mesh?
@AshishBorakhadikar1003
@AshishBorakhadikar1003 6 жыл бұрын
Whoa that's some really good info there. Sad to see less Subscriber for such a great channel. You are doing Good work Casey. I'm learning a lot about blueprints and construction script all thanks to you.
@PardCode
@PardCode 6 жыл бұрын
Really good job, mate! As always!
@morrices
@morrices 4 ай бұрын
Thanks for the video. Amazing way to present it! =D
@louisec6431
@louisec6431 3 жыл бұрын
Thank you Casey, your tutorial is very clear as I can easily catch up!
@Slouworker
@Slouworker 5 жыл бұрын
How would you make it so that the fence mesh would also stretch up to a certain point before creating another piece?
@ue4withcasey391
@ue4withcasey391 5 жыл бұрын
If you are doing a bunch with repeatable meshes, especially ones that can potentially curve, I would recommend looking into spline meshes. If I find some time I can make a video on that possibly today or tomorrow
@kellykryspin
@kellykryspin 3 жыл бұрын
is there a way to make instance static meshes that i can move around? Like if I wanted to place a bunch of the same boxes around in a room but wanted them to be instances???
@nightwalkerj
@nightwalkerj 4 жыл бұрын
Thanks for the tutorial but my stats doesnt list the static mesh calls. Only the mesh draw calls as a whole. How do you see the static mesh/ individual mesh draw calls?
@Paul-hw7kc
@Paul-hw7kc 4 жыл бұрын
How would you use this to create procedural foliage at run time?
@ty_teynium
@ty_teynium 5 жыл бұрын
There should be a tool in window tab or edit tab called CPU Profiler. It shows the stats of the engine's performance on your system so measures how much it's affected. The memory increases. I once followed someone tutorial for buildings and it looks nice but the memory just for one floor was up to 500mb so adding just two or three floors would be 2 to 3 gigs. Now that's just one building though, so if I wanted to make a city with you know multiple buildings, well my computer would jump off a cliff. My point is the Profiler allows you to see how costly on performance this technique is.
@ue4withcasey391
@ue4withcasey391 5 жыл бұрын
I don't believe the construction script would save what it is doing in memory. Aka there wouldn't be much of a difference in the end result between placing assets and spawning them at run time. That sounds like a separate issue is happening. However, I do agree that building an entire level from construction script isn't smart. However, there are very clear applications of it that can save us time from repeating the same action over and over when building levels.
@TheSwanDragons
@TheSwanDragons 2 жыл бұрын
Thank you! This was so much better than just creating copies of a static mesh object ^.^
@adamodimattia
@adamodimattia 3 жыл бұрын
But can you move them once they are instanced?
@TheAxebeard
@TheAxebeard 6 жыл бұрын
I'm starting over on an old game project I abandoned which involved a procedurally generated city/world. I see how using ISM would be great for roads (wish I knew that before), but I suppose it could also be used to spawn a row of buildings, and mix and match the individual meshes. Gonna have to mess with this soon :D
@ue4withcasey391
@ue4withcasey391 6 жыл бұрын
Yes it definitely can be. There are drawbacks to ISM though. They behave as if they are all the same mesh in a lot of ways. That means if you can see one of the instances on your screen (one piece of road or building) then your GPU is actually going to draw every instance as if they were all on your screen. So you have to use the ISM with a purpose. This same method can be used to spawn meshes without instancing, however.
@TheAxebeard
@TheAxebeard 6 жыл бұрын
@@ue4withcasey391 I'm not sure if this method would be best for this, but I'm currently using the Construction Script to procedurally generate map content. The only problem is, it takes forever when the game starts for the stuff to generate. Do you know how I'd be able to randomize the content in the editor, but then lock it into place so it's the same in-game?
@ue4withcasey391
@ue4withcasey391 6 жыл бұрын
I would have to do a bunch of testing, but you may be able to use "blutility" or run in editor events to do spawning. In theory (I'm not sure if it would work), but I would probably use construction script to randomly generate things and use seeding to be able to recreate the randomness, and then save in arrays all the objects I'm spawning and where. Then I would take that data and throw it into the run in editor events to do the permanent spawning and remove the construction script. I'm guessing there's a few blocks by UE4 in that theory, but I'm guessing with some manipulation in C++ I could get around it. But this is only one of several solutions for the hitch on load. Other answers could be that spawning the entire city at start is a mistake. You may only need to spawn sections as you go. Almost like level instancing your city into pieces. Or maybe moving the construction over to c++ if that makes it more efficient. Probably doing research on the converting from construction script to permanence would yield some kind of answer that someone has used. Maybe someone has made a plugin for this.
@jimbotht1091
@jimbotht1091 4 жыл бұрын
thank for your video, it's possible to have multiple texture for a mesh instance (sorry for my english google traduction)
@EyefyourGf
@EyefyourGf 3 жыл бұрын
You are awesome,just know that!
@bruceslasher6374
@bruceslasher6374 3 жыл бұрын
Thanks so much Bro
@prashantshukla6814
@prashantshukla6814 5 жыл бұрын
Great tutorial really liked it, except one thing.............ummmmmm....i can't remember :D....It was awesome
@Restart-Gaming
@Restart-Gaming 3 жыл бұрын
Great but only works on very flat surface this setup will not work on bumpy or mountain terrain
@quetepetinbenfort
@quetepetinbenfort 3 жыл бұрын
Thanks a lot!
@mijonmohammed7463
@mijonmohammed7463 2 жыл бұрын
He talk like Jidion lmaoo
@USAIsrUKEUVngrdBLRckOccupiedUA
@USAIsrUKEUVngrdBLRckOccupiedUA 5 жыл бұрын
It is really helpful! Thank you!
UE4 With Casey - Mastering Blueprints - Part 1 - Events
27:57
UE4WithCasey
Рет қаралды 45 М.
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
The Legend of Dragoon | Lloyd - A Character Study
15:04
Strictly Fantasy
Рет қаралды 2,2 М.
UE4 Optimization: Instancing
28:34
Tech Art Aid
Рет қаралды 151 М.
Populating Meshes Along a Spline | Tips & Tricks | Unreal Engine
11:49
Navigation Query Filters (Separating AI movement) - UE4 With Casey
13:01
UE 4 Minutes TUTORIAL Static Mesh Instance spawn along the grid
5:49
Bartosz Kamiński
Рет қаралды 30 М.
UE4 - Constructing Buildings with Instanced Static Meshes [TUTORIAL]
41:05
Republic of Texas Digital Works
Рет қаралды 34 М.
UE4 With Casey - Interactive Main Menus
18:04
UE4WithCasey
Рет қаралды 3,4 М.
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН