Another excellent and useful tutorial! One question: At about 8:50, you hook up a lerp node with constant inputs of A=0 and B=1. Unless my pre-coffee brain is entirely dormant, that's going to be the same as the input alpha on the lerp. Is there a reason you needed the lerp to exist as opposed to just connecting the alpha straight through to the multiply? There is another lerp of this type later, and the other two lerps could probably just be the cheaper OneMinus node instead of lerps. Or am I missing something? BTW, big thanks for the detailed contents list. I already know how to make automaterials, but didn't know the PCG part yet, so I started at the PhysicalMaterial section and saved some time. It's great that the end-to-end process is here for those who need it. Best of both worlds. :)
@MichaelRoyalty Жыл бұрын
Wow. No, there is no reason why I use a lerp node there. I sort of gave myself a crash course in physical materials, and along the way I didn't realize I was working with floats that were the exact same input as the alpha. Alpha and OneMinus-Alpha would be a much better way to go, thanks for pointing that out! I'm happy the contents list helped! I was thinking this would be a super short tutorial, but it ballooned because I wanted to make sure anybody could follow it from scratch, so I made sure to set up the ToC for the more experienced people like yourself.
@scottcourtney8878 Жыл бұрын
The point rotation at about 18:15 is a great tip!
@xjuliussx Жыл бұрын
Great videos and tutorials, makes the summer worth the time !
@Kiran.KillStreak Жыл бұрын
Nice Tutorial, Getting material info by its physics material by ray casting is the key. got it.
@MichaelRoyalty Жыл бұрын
Exactly! It's taking advantage of the existing system, just like footstep sounds.
@tyrheo738 Жыл бұрын
Good job MR
@unrealitybites763 Жыл бұрын
Excellent work, Michael. This is the missing link between landscape and PCG. It would be interesting to create a C++ version of your Blueprint Element to see what the performance gains are.
@MichaelRoyalty Жыл бұрын
Exactly! I'm happy that the two procedural systems, materials and PCG, can interact in this way. The performance gains would be very interesting. I'm also running into a couple stability problems with this blueprint, when you start to create many points and refresh them, and I bet a C++ version would help with that.
@ethanwasme43077 ай бұрын
smart using the physical material.
@tylercottington14616 ай бұрын
This is a really great tutorial and one of the only ones I've found that tackle how to use PCGs with auto landscapes. I do have a question regarding the physical materials logic. In my case, I have 4 textures that are all being used as an auto material(Layer "Auto" in layer blend). I have them as snow, stone, dirt, and grass. Grass uses the same logic as my stone but with slightly different blend bias/sharpness(they both use the world align blend logic used for your sandstone). However, when using the same logic for physical materials, I get PM_dirt instead of grass and when testing the blend between stone and snow, I get grass. Where did I go wrong?
@AaronFhd Жыл бұрын
This stuff is great. Keep up the goods vids. Also would be great to see some stuff on Static meshes, Maybe a Project to that if we can't use landscapes
@MichaelRoyalty Жыл бұрын
Good idea. Maybe treating one of those enormous Quixel mountain static meshes as a landscape would be a fun thing to look at.
@AaronFhd Жыл бұрын
@@MichaelRoyalty that would be great as now I am using more Nanite meshes as I need more details
@KrolPower Жыл бұрын
Loving your tutorials man, thanks! Any chance you're planning a Skyscrapers part 3? Some ideas for it could be, unique ground floor and top floor, setting the parameters to variables for various building footprint sizes, and spawning things between the buildings like roads/sidewalks.
@MichaelRoyalty Жыл бұрын
Eventually! I think I've about dead-ended on my current iteration of skyscrapers, but I have one update planned -- making more diverse blocks, instead of just single buildings. I've experimented with creating spline-based sidewalks around the buildings but the results aren't very satisfying. I'm planning to revisit the problem from scratch soon, and see if I can make the construction more flexible.
@mesterKG Жыл бұрын
Another solution to the ignore actor issue would be to create a collision channel specific for the landscape and change the line trace to use that channel instead.
@MichaelRoyalty Жыл бұрын
I was thinking along those lines, but didn't realize you could create a separate collision channel. Would changing the landscape's collision channel cause problems with other systems, or can you just make sure that all collision that previously impacted landscape is still connected to the new channel?
@mesterKG Жыл бұрын
A new channel for this purpose would only be added to whatever collision settings already set up so I don’t think it will affect other stuff. I set mine up with default ignore so I must opt in for anything that should block the channel. Of course I then forget to set this to block on the landscape and get confused for a moment until I realize my mistake 🙂.
@MichaelRoyalty Жыл бұрын
@@mesterKG Haha, I hate it when that happens! You've set everything up right but something has mysteriously changed. Awesome, so using a new channel sounds like the easiest way to maintain, since you don't have to worry about any new elements added to your world. Thanks for the advice!
@wilismatrix98479 ай бұрын
crazy genius !!
@MrWorth Жыл бұрын
hi can u help me for something? I wanna use a mesh(mountains) like landscape for cover somewhere on the landscape.. When i try "Get Data Actor" i can't use the "Normal to Density".. i don't know why but it's just not working. When i try "Mesh to Points" i couldn't scale the PCG. Can u make a video for it?
@MichaelRoyalty Жыл бұрын
You can do two things. World Ray Hit will work a lot like the surface data, you can then plug it into a surface sampler. You can also use "Mesh Sampler" if you install the "Procedural Content Generation Geometry Script Interop" plugin. To scale the results, send the sampled data through the Source of a Copy Points node, and scale the point you are using as the Target.
@jamerach Жыл бұрын
I like the approach. There's one weird issue that I came across, if you put the spline and PCG separately, not in the same blueprint, the editor handles it far better. Why...? No clue :D
@midnightruin6983 Жыл бұрын
i came up with a similar , except with the traces i used a box trace and getting the extents of the point i added a few filter controls
@MichaelRoyalty Жыл бұрын
That sounds really handy. Yeah, the key is just the physical material plus the trace to get it in, the rest can be iterated and improved a lot!
@dapxful Жыл бұрын
Nice tutorial, thanks! but I have a question, Is it necessary to add physical materials to the auto material in order to sample what kind of texture is applied?
@dapxful Жыл бұрын
Ok, I see now. We need the physical material to detect the parts of the automaterial that have not been manually painted
@MichaelRoyalty Жыл бұрын
Exactly -- Without a physical material, you can just detect "Auto Material", but not what texture the auto material has applied. Using physical material is a workaround.
@MichaelRoyalty Жыл бұрын
Also 5.3 has updated the World Ray Hit node to allow it to return physical materials, so you don't need a custom blueprint anymore!
@dapxful Жыл бұрын
@@MichaelRoyaltyI understand. What I have end up doing is to create a blend layer in the material (in my automaterial I was not using them), add a non-weight info layer, and uploading a texture with flow mask for that layer created with houdini,using the same project file that I have used for the heightmap. Then I have used the flow mask to add debris using PCG. Thanks for your tutorials ;)
@ParikshitBhujbal11 ай бұрын
HELP pls ! At 11:30 the ' Get Surface Type ' function is not showing as an option for me at all :s
@MichaelRoyalty11 ай бұрын
It works for me in 5.2 and 5.3, I can just right click inside the blueprint and select the 'Get Surface Type' node. I'm not sure why it wouldn't work for you.
@ParikshitBhujbal11 ай бұрын
@@MichaelRoyalty Hi, I went through your video again and figured out what caused that, it was my bad I accidently selected get multi line trace instead of a single line trace hence it was not showing me get surface type but was instead showing as an array.
@MichaelRoyalty11 ай бұрын
Ooh! Yeah when you do that you can add a for each loop to it. I use multi line trace a lot with pcg, it's very useful, as long as you notice you're using it 😅
@willembuiting Жыл бұрын
Love these tutorials. Very helpfull. I do have a question; is there a way to turn on and off PCG like a switch? It constantly interfears my work when working on other stuff within my level. Thanks again for all your great work!
@MichaelRoyalty Жыл бұрын
There are a couple ways. You can click "Pause Regeneration" on the graph, and it should stop recalculating as you make changes. If you want a more powerful and flexible method, Adrien Logut has made a document with some useful tips. Look for "Emulate Branch Node" about 5 pages into this document: docs.google.com/document/d/1n8Zq31Cnf1uqqkdRve1md0GLweTe7SHp8U4lbP4XEvY
@mesterKG Жыл бұрын
I've made an editor utility widget that looks for all actors with a PCG Component and toggles its Activated flag (not the IsActive flag, but "activated"). Also I force a cleanup or generate with the toggle. This widget can then be placed in your editor layout so it is super easy to toggle on/off any PCG stuff in a level.
@MichaelRoyalty Жыл бұрын
@@mesterKG That sounds incredibly handy. I've locked up my engine so many times regenerating a large PCG by accident when I just was trying to edit the bounds. Do you have a guide on what you've done?
@mesterKG Жыл бұрын
I don’t have a guide ready, but I can see if can get something out somewhere to share.. nothing before tomorrow night though..
@mesterKG Жыл бұрын
Here's a short video showing me editor utiltity widget - kzbin.info/www/bejne/Z2qkZoFuntqgesk
@bleedcraft Жыл бұрын
Great method for landscape material. I'm not sure what I'm missing, but the Sample Physical Materials in the Point Loop will not work for me. I see the columns including Auto and Concrete, but no information is there. Not sure what I missed.
@MichaelRoyalty Жыл бұрын
Thanks! Have you set the Trace Channel on the line trace to use "Camera" instead of "Visibility"?
@bleedcraft Жыл бұрын
Yes, it is set to Camera.@@MichaelRoyalty
@HenryRronbertson9 ай бұрын
You are a life saver man!!!!
@MichaelRoyalty9 ай бұрын
If you're using version 5.3 you can get the physical material from the world ray hit query node! That might save you some effort.
@HenryRronbertson8 ай бұрын
@@MichaelRoyaltyThank you so much!!
@netcodedev Жыл бұрын
Hi I ran into a problem in UE 5.3... As soon as I try to hook up the PCG Blueprint to a node UE5 just crashes. I cant seem to find the error... Do you have any ideas?
@MichaelRoyalty Жыл бұрын
Hi, I don't have any idea why it would crash but I have heard in 5.3 you can now get the physical material from the ray hit node. So I would look at that rather than a blueprint element.
@netcodedev Жыл бұрын
@@MichaelRoyalty ah cool. Do you have any sources for that? I managed to fix the crashing by disabling the debug render on the line trace. At least I think that's what fixed it
@MichaelRoyalty Жыл бұрын
I just made a new tutorial on world ray hit! It's very straightforward.
@twigz7003 Жыл бұрын
The engine seems to crash whenever I increase the size of the spline or volume? If I keep it small it works... Any ideas why that might be?
@MichaelRoyalty Жыл бұрын
I've run into crashes when I'm working with many points and modify my PCG with static meshes spawned. I'm guessing it's running into memory limits. Try cleaning up your PCG graph and pausing its generation before modifying the spline.
@peterkovac6251 Жыл бұрын
yes it crashes almost with any settings ... its unuseable this way :/ ... cannot make area big enough or points dense enough ... both crashes engine and there is no way to solve it with turning off autogenerate because once you turn it back on it crashes again ... shame .. its nice approach but works only with very small scales whats not very practical ...
@k0cc4259 ай бұрын
honestly the ignore list looks like a bother - You're probably better off doing a multi line trace -> loop -> actor has tag (e.g. "Landscape") -> sample -> break a bit more performance intensive, but for something like PCG, it really doesn't matter all that much
@MichaelRoyalty9 ай бұрын
Thanks for the suggestion, that's a better way of doing it, and easier than setting up a separate trace channel. I'd recommend using version 5.3, getting the physical material is now a native part of the world ray hit query node!
@888marcinb5 ай бұрын
I came here to see how was the thing on the thumbnail done... and got dissapointed cuz it was fake