Okay so basically I need to create my new class which will be just actor and this actor will be just foxhole actor so instead of my testing actor I will be just using this voxel actor so just creating this and I need a lot of variables so I will just copy them and Parameters do not have problems with this okay and I will copy all properties for now so and will explain this okay so my voxel H is header file and I need to hear some of my properties I don’t want to create them so first one is just a Write of materials I will be using them for my voxels just a you material interface and number of materials will be the same like number of voxel types so it will depends on this number of so I need to yeah take into account in this one then I have random seed which is Expose so I will be just passing this argument in my blueprint and when it’s a actor create that I will be just using this one same voxel size which is just a this first value I had in my blueprint then chunk at line elements is the same And a position of chunk so it’s x and y so these are my images realized arguments exposed I have also some controlling values like multiplayers and wave and frequency I will be using in generating chunks just for testing purposes then the chunk total elements and I just calculated in inside C++ same With voxel size and trunkline element which is just power to so this is just double of it’s just squared and one more thing we have chunk fields which are just the values of my voxels so if box’ll is zero the chunk field is zero means there is no voxel if it’s a Different one let’s say it’s just a box of dirt if it’s two it’s just grass and that’s a server and this is my standard procedural component which we will just create right now okay and one more thing I need to import my noise which is a Function and to do that and to why it’s in black we just need to go I just need to copy these two files and the simplest way is to just pasting this inside my source and just generating visual studio files which will just automatically add these video files here okay and we can Go back and as you can see there is the detection of some modification so I just overwrite should be fine and like that we can just use this simplex noise inside our and atlantean and we can generate everything from this point and I will be showing how we can just use This but let’s go back and let’s replace our actor with this new one actor this voxel actor which will be generating things so basically mmm I just need a one thing okay um okay and instead of aha instead of spawning the actor I just spawning a spawning my a voxel Actor okay but I should get this is interesting voxel actor it has a lot of properties with this compiled probably not what let’s try this out okay so I need to add information about procedural image component and I have to do this in two places so it will be just Include a perceptron mesh component okay and one more thing it’s in our yeah dependency it’s in okay okay so we need to create a private dependency because it’s not high should be fine and of course a procedural mass component because I will be using okay and like that we should not get any Warnings and errors maybe not let’s try this out huh should be fine yeah I have my uh P and there is nothing wrong with this I don’t know what’s going on what the hmm maybe just public in the other or maybe not stupid okay you should be fine Oh yeah yeah yeah so we have all our properties procedural image component and to generate our first procedural – we just need to get on construction but it has to be a overwrite so I use my little a void function and overwrite this and I have to do something with This so let’s go – lets go – and we need to fill this so yeah it will be our construction and I can set my parameters so basically first think it will be just a chunk a Z elements it will be just number of voxels in the coordinate and It will be just 18 a chunk total elements will be just a chunk blind elements multiplied by a chunk line elements and multiplied by chunk Z elements so it will be just number of elements total elements right okay and I can also do something with this it just Powered – and yeah so one more thing it will be just a voxel size size half so these are my values okay and right now I just need to create a particular component which will be just the okay maybe this so I’m just creating my string from Integer it’s just index of this chunk and underscore and my index and a of course I need a pointer to my string and because this name construction requires this and use my name as one of these arguments inside my procedural match component and creating new object which Is which is fine and I need to register this component and two more steps will because my my root and by default is just an component I just need to make this component root to be able to move this later on so I just use my root component and assigned to my procedural Component and set word rotation this is important because I’m just using my own cross type construction and transform okay so yeah and I can just use my parent function on the construction okay so I should get this actor constructed so I can just build and play you can Just close this maybe I should open this inside parade here should be final I hope so yeah it’s working finally yeah it will be available yeah but I made few mistakes in in the at least stages I just copy too much and I didn’t noticed I have no public and for My properties and I was sure I missed some letter in includes but but I missed the this public I wasn’t sure what was was that here so right now I just need to go to controller you can just print something accidentally this is great you play your controller and instead of These actors I just need more a new so I just duplicate this and use my we’ll be just and get chunks and instead of tests will be tossed box tobacco okay and I have my book selector so I can just use this one instead of this okay Cannot so I just use pad and I can just take my and instead of spawning test actor I just spawn actor but maybe just work selector okay so basically this is just just like that and I need to get my index s this is just x + y voxel size is The same and my and okay transform is the same so I just adding this to my so this is everything I just replace this by my voxel actor yeah so this is simple like that so we can check this out but I need maybe cube because I removed my okay And right now I can check if I get all my actors and as you can see we have these actors created but there is okay there is nothing here yet so I need for every actor for every voxel just fill my tank filled awry and depends on of these Values and generate my boxers yeah one after another in ER so okay and as you can see we have this voxel 7 – as our root so everything is fine and yeah and as you can see this is in this place thank you for follow ok so every chunk As you can see it’s in different place so it’s fine so I just need to generate this but we can get a have some fun with our noise right now yeah why not so I will just generate a new actor but yeah it will be in our maybe right here So instead of this test a test I will just yeah so maybe in construction script I will just show you how noise works so I will just use my for loop from 0 to maybe 20% for 2nd one and I have my get noise 2d 2d noise yeah it’s It’s right here so everything is working right now yeah and I can just multiply by point one do the same for second one and use my noises multiplied by some weight maybe which will be maybe just and right now and it will be my Z coordinate and These two will be just my x and y so it will be just multiplied by 100 and I will be using a voxel 100 by 100 and a I will add instead of the static mesh I will just instant static mesh and it will be just cube shape cube which Should be 100 by 100 by 100 yeah it’s like that so I just get my and add instance every loop mmm and my transfer will be just from this so I just multiplied by 100 as well but maybe yeah I think it should be fine let’s try this Out okay okay and I can just make vector and we can just try this out okay compile let’s go to viewport and we have our floor but that coordinate is yeah because I didn’t link this as you can see so my simple acknowledge is was Equal to zero but right now it should be should be yeah and as you can see it’s just changing and we can just make this even more just multiplying by 20 so right now it it’s like part of this it’s just coming up yeah and I can use a Floor just to make round values yeah so yeah so maybe this floor and just multiply by 100 should be fine and right now we have these steps yeah so it’s looking more like it should and we can of course connect many chunks of this just getting the same coordinate so Basically if I just add two variables x and y which will be just visible integer x and y integer and Y adding to this one instead of this you can just linking this but maybe who’s taking this one and second mod will be taking this one and This one and why okay so everything it’s from this points so right now when I just take this and put my actor test it’s right here okay right because is zero so I need to need this and we have this element and when I just create another one maybe depends on Position but if I change to 1 0 we will get a different one so let’s remove this and maybe get get local position ad for position and if I divide by its 100 by 100 so to get position should be I can do this why not let’s break this so or maybe Just divided by 100 so I will just get my x and y so instead of this one okay let’s try this out and yeah mmm Oh hey hey hello hello okay and I’m using let’s try this out Oh because it should be this one right only no it should be from this point Here but a position should be the same so yeah so it will be this one it will be this one and only noise which is this one should be from okay let’s try this out right now so when I just move this yeah finally it’s just like that and as You can see I can just expand this and make huge huge flow from this elements and we are increasing size of this okay yeah and basically what we can do from this is just changing our a noise so it can be just 0.1 or maybe point 2 so and I just save this it’s just like that we have mountains or something like that so it’s just changing rapidly yeah and then go on so you can just have fun with this and this noise is available as plugging 200 line join we can change this value and you shouldn’t Change this one okay let’s play music maybe this one okay and we want to do the same with with our actors here voxel actors it was just example that you can use the same noise in blueprint and make usage of this okay so right now I can just remove this Actor I won’t be ok let’s go to new player because I have still my okay but – no because remove chunk I should be removing this one so let’s get chunks get depends on index and remove should be like that okay and yeah and removing index okay so I just replace this one And I can finally remove this old chunk see yeah okay so this is fine and I can remove this test yeah you Video Information
This video, titled ‘Unreal Minecraft – Twitch 12h challenge – 2. C++ project set’, was uploaded by Tefel – Astro Colony on 2016-07-03 17:27:54. It has garnered 20296 views and 149 likes. The duration of the video is 00:24:52 or 1492 seconds.
This video shows process of creating Unreal Minecraft-like cubic World in Unreal Engine 4. You need to know It cames from twitch.tv/Tefel where I had this Live stream and not everything is perfect like local recording. The video has small cuts but probably You may want to skip some boring parts 🙂 Have fun.
More info, result and the download link: https://www.youtube.com/watch?v=WXJw1pswLRM
All parts: 1 – generating endless world https://www.youtube.com/watch?v=29vUp09JDAg 2 – c++ project set ⌫ 3 – voxels generation (from 3ds) 4 – creating terrain using simplex noise 5 – generate different voxel types (materials) 6 – BSP – making weapons 7 – prototypying character 8 – adding / removing voxels 9 – spawning trees (voxels) 10 – custom elements – grass, flowers (instances) 11 – graphic look – post process effects 12 – inventory 13 – particles, effects, sounds 14 – gui / menu
If You want more streams – making prototypes please suggest what would You like to watch in the comments below.