Alex
Alex
  • 38
  • 205 715
UE5 Procedural Grass Using Bezier Curves pt. 9: Hierarchical Runtime Generation
So far, we have taken advantage of PCG to pre-compute data about our landscape and grass, which is stored on a per instance basis. This approach allows PCG to communicate lots of details about our game world to the grass for advanced effects, but because it is precomputed, can be memory or storage intensive and does not react dynamically to changes in the world.
Hierarchical Runtime Generation allows our grass to be generated on the fly, but generating so many points can be costly - so we need to be much more sensitive about what we do in our PCG graph. Ghost of Tsushima solved this using compute shaders to create the data they needed on demand, instead of using the CPU.
Переглядів: 663

Відео

UE5 Procedural Grass Using Bezier Curves pt. 8: Distance Blending Normals and Buffers
Переглядів 1,1 тис.21 день тому
It order to get a seamless transition from mesh grass to the underlying terrain, we need to blend out mesh normals and buffer data like color and roughness to match the landscape material by the point which the culling occurs. Games or projects that fail to this will have harsh and noticeable culling transitions. Here I show a technique for blending to the landscape normal that does not rely on...
UE5 Procedural Grass Using Bezier Curves pt. 7: Optimizations
Переглядів 9902 місяці тому
Here we scale up from 500k instances to 8 million, and look at a first pass for optimizing our grass setup by adding LODs, controlling shadows, setting a graduated culling system, and also prevent clipping and unnecessary instances by allowing meshes or volumes to block grass from spawning.
UE5 Procedural Grass Using Bezier Curves pt. 6: Per Blade Randomness
Переглядів 6772 місяці тому
Here we look at using PCG data packing to create values that our material can use to drive per instance parameters while retaining artist direction.
UE5 Procedural Grass Using Bezier Curves pt. 5: Wind
Переглядів 1,5 тис.2 місяці тому
Here I demonstrate an example of a wind system that leverages the strengths of the bezier curve to create animated grass using a customizable, multi-layered approach.
UE5 Procedural Grass Using Bezier Curves pt. 4: View Dependent Thickening
Переглядів 9792 місяці тому
In Ghost of Tsushima, a shader trick was utilized to thicken the look of the grass when viewing it from the edge - an angle which would otherwise make the grass disappear as it lacks any thickness.
UE5 Procedural Grass Using Bezier Curves pt. 3: Pixel Shading
Переглядів 8643 місяці тому
Here we will transform the grass from a flat smooth surface - which may work for more stylized projects - to a more detailed and believable result by further adjusting the pixel normal.
UE5 Procedural Grass Using Bezier Curves pt. 2: Calculating Normals
Переглядів 1 тис.3 місяці тому
Here we use the known equation for the derivative of the bezier curve to solve for the normal vector to correct the shading of our grass blade. Part 1: ua-cam.com/video/D5RwV6bmnHk/v-deo.html
UE5 Procedural Grass Using Bezier Curves (Ghost of Tsushima Technique)
Переглядів 2,7 тис.3 місяці тому
In this video we will create a blade of grass for which the shape can be procedurally defined using a bezier curve. I show the process for a quadratic curve, although the technique works for higher order curves as well. Part 2: ua-cam.com/video/YxE9yN9uOXU/v-deo.html
Fixing Runtime Virtual Texture stretching (Tri-planar RVT!?)
Переглядів 3,5 тис.10 місяців тому
Here I demonstrate a method of offsetting RVT coordinates to create a tri-planar sample instead of the traditional XY plane sample. This is achieved with my single sample method, although it would work with a regular 3 sample method. The only flaw with this method is that the higher up an object you sample, the farther away you sample - but this is mostly irrelevant because the vast majority of...
Art Directing Procedural Content with Landscape Layer Painting (UE5)
Переглядів 1,3 тис.10 місяців тому
Generating content procedurally doesn't have to mean giving up artistic control. Here I demo a technique for using landscape paint layers to pass data to PCG to control scale, density and even material data (like color or wind strength) of grass.
Anti-Aliased Step & Smooth Step Material Function (UE5)
Переглядів 1,7 тис.10 місяців тому
Step functions are great for thresholding gradients like distance fields. But they have one fatal flaw - aliasing. Here I show a quick and cheap way to achieve a step without aliasing, which can quite significantly improve the quality of many effects like distance field based text. Material Function Pastebin blueprintue.com/render/kbx_d4x1/ Blog Post describing the method with sample code drewc...
UE5 Dynamic Colored Translucent Shadows pt. 2
Переглядів 1,9 тис.11 місяців тому
Sorry about the length. I regret not making this into more than 2 parts, but hopefully you'll see through to the end. In part 2 we create our shadow depth mask, align our BP to the sun and discuss tweaks to getting a nice, believable shadow that closely matches our path traced reference. 00:00 Turn off shadows for scene capture 02:30 How to capture depth without capturing unwanted background? 0...
UE5 Dynamic Colored Shadows pt. 1
Переглядів 4,2 тис.11 місяців тому
UE5 doesn't natively support any dynamic colored translucent shadows - only the path-tracer and baked lighting offer this feature. But using a home-cooked shadow and color pass we can create our own. We do with by capturing the color of our object, and the depth of our scene from the perspective of the sun, and re-projecting that color using an emissive decal. Since light is additive, this shou...
Parallax Occlusion Mapping Decals (Using Custom Decal Response) UE5
Переглядів 7 тис.11 місяців тому
Many have wanted to use POM and decals together to add details to an object or environment, only to find that the built in node breaks if it is rotated in any way - making it unusable as a decal. This is because POM relies on mesh tangents to render correctly, and the decal cannot sample them. In my last video, we learned how custom decal responses could be used to allow working tangent space n...
Customizing Material Decal Response (UE5)
Переглядів 6 тис.11 місяців тому
Customizing Material Decal Response (UE5)
Parallax Occlusion Mapping Deep Dive Bonus Episode - Nanite vs POM
Переглядів 2 тис.Рік тому
Parallax Occlusion Mapping Deep Dive Bonus Episode - Nanite vs POM
Parallax Occlusion Mapping Deep Dive EP: 5 - Fixing Stretched Textures
Переглядів 4,8 тис.Рік тому
Parallax Occlusion Mapping Deep Dive EP: 5 - Fixing Stretched Textures
Parallax Occlusion Mapping Deep Dive EP: 4 - Blending Multiple POM Textures
Переглядів 4,3 тис.Рік тому
Parallax Occlusion Mapping Deep Dive EP: 4 - Blending Multiple POM Textures
Parallax Occlusion Mapping Deep Dive EP: 3 - Shadows
Переглядів 4,5 тис.Рік тому
Parallax Occlusion Mapping Deep Dive EP: 3 - Shadows
Parallax Occlusion Mapping Deep Dive EP: 2 - Pixel Depth Offset and Stair Stepping
Переглядів 4,4 тис.Рік тому
Parallax Occlusion Mapping Deep Dive EP: 2 - Pixel Depth Offset and Stair Stepping
Parallax Occlusion Mapping Deep Dive EP: 1 - Filtering and Mips
Переглядів 4,5 тис.Рік тому
Parallax Occlusion Mapping Deep Dive EP: 1 - Filtering and Mips
Terminating the Shadow Terminator Problem (Jagged Shadows)
Переглядів 14 тис.Рік тому
Terminating the Shadow Terminator Problem (Jagged Shadows)
Single Sample Seamless Tri-Planar Mapping (UE5)
Переглядів 14 тис.Рік тому
Single Sample Seamless Tri-Planar Mapping (UE5)
Rotating Normal Maps in Unreal Engine
Переглядів 5 тис.Рік тому
Rotating Normal Maps in Unreal Engine
The Ultimate Water Caustics Shader
Переглядів 3,7 тис.Рік тому
The Ultimate Water Caustics Shader
Reflecting Metallic Objects in Lumen (UE5)
Переглядів 24 тис.2 роки тому
Reflecting Metallic Objects in Lumen (UE5)
This one node makes almost any shader faster. (Unreal Engine)
Переглядів 7 тис.2 роки тому
This one node makes almost any shader faster. (Unreal Engine)
Stop Using Skeletal Meshes! (Unreal Performance Optimization Tips)
Переглядів 43 тис.2 роки тому
Stop Using Skeletal Meshes! (Unreal Performance Optimization Tips)
Vector Displacement Maps pt. 2: Optimized for Unreal Engine
Переглядів 3,3 тис.3 роки тому
Vector Displacement Maps pt. 2: Optimized for Unreal Engine

КОМЕНТАРІ

  • @xristosboom
    @xristosboom День тому

    Hello Sir Is there any information about your email? I would like to address something in person

  • @FPChris
    @FPChris 7 днів тому

    You say ahhhh a lot ;)

    • @TechArtAlex
      @TechArtAlex 7 днів тому

      Unfortunately it is too time consuming to script these videos, especially since this channel isn't monetized. I just have some talking points I want to hit, so that stuff slips in. I think most people will find they do the same if they are talking off the top of their head of 20 minutes straight.

  • @shannen1188
    @shannen1188 7 днів тому

    Could you potentially reduce the points being generated by the Surface Sampler (which is probably what's slow) but then take (some of) those points (may filter using density) then do some random transform/jitter to re-create the points you removed? I remember someone talking about being able to structure your nodes so they can run async or in parallel so that might help? Could you also do something (more?) to reduce the density of the points being generated at the edges of the screen ?

    • @TechArtAlex
      @TechArtAlex 7 днів тому

      The PCG generation can consider both direction and radius and weight them against eachother, but I haven't experimented with that. It could potentially help reduce points being generated off screen, although you may get more pop in and possibly stutter when rotating the camera as a result. Worth a try for sure. It seems the static mesh spawner is the most expensive node by far. Generating the points can be fairly expensive (especially for the large grids) but I think the best fix for that is simply spawning fewer points on the larger grids. In my example, I'm using the same point density for all grids, so the larger grids are exponentially more expensive to complete, since each step squares the surface area. A huge endless field of grass with no occluders whatsoever is basically a worst case scenario/ torture test. It is possible to spawn a cluster of points around a sampled point, but I'm not sure if that extra logic would be faster than just having sampled more points to begin with. That kind of technique is really useful for things like spawning saplings near a parent tree, for example. Its worth looking into, but I think using a single point to spawn more than one blade might work better (either by using a mesh with multiple blades, or maybe spawning a level instance with multiple meshes) Based on your comment I tried to see if forcing a particular execution order would make any difference. I forced the smaller grids to wait until the larger ones had finished by creating a dependency using the gather node. I was hoping this would mean fewer static mesh spawners running at once. I didn't notice any difference is performance, but it is a bit tough to measure. Making the large grids dependent on the small ones didn't work at all for some reason, but if it did I expect the results would be the same. Maybe there are other ways to control the execution sequence though.

    • @shannen1188
      @shannen1188 7 днів тому

      @@TechArtAlex I haven't had a chance to view all the videos yet but I assume you have checked out the PCG Profiler window and that's how you are determining the cost? I wonder how much an improvement you might see using the rdInst (Marketplace Plugin) StaticMeshSpawner Node instead as he maintains his system is faster then the normal ISM/HISM add instance method.

    • @TechArtAlex
      @TechArtAlex 7 днів тому

      @@shannen1188 Correct. I'll have to look into that node.

  • @roadtoenviromentartist
    @roadtoenviromentartist 8 днів тому

    Extend please your screen I can not to watch nothing. Too little the nodes and the write.

  • @g4xx0r
    @g4xx0r 8 днів тому

    You upload, I give like! Simple as that. Thank you for this series, really a lot of great techniques! I'll definetely put that in some of my projects.

  • @bartosztitkin2700
    @bartosztitkin2700 8 днів тому

    welcome back!

  • @NorwinLabs
    @NorwinLabs 8 днів тому

    I've never been more excited about math and grass before. I appreciate these videos!

  • @ScorpyX
    @ScorpyX 8 днів тому

    this is a GRASS DAY! Time for grass! ♥

  • @DatGuyGLK
    @DatGuyGLK 8 днів тому

    damn I was just looking at your previous video and hoped this would come out, and moments later you upload lol

  • @BooneyTune
    @BooneyTune 8 днів тому

    It's a good day when we get another grass video.

  • @AaronFhd
    @AaronFhd 8 днів тому

    Let’s go🎉

  • @syaoranli7869
    @syaoranli7869 10 днів тому

    Hi, I don't know if you'll see this, or if you even check old videos. But I was wondering if it was possible to use shape keys to morph the cube into a complex object? You mentioned in the video that the traditional way of displacement is good if you're trying to make a stencil for Zbrush. Well Blender now has something similar and I've been scouring the internet for any information on how to make precise brushes from existing mesh. I'm not math savvy and barely understand the shader editor as it is. But I really would like to know if it's possible to morph something like a high subdivision grid into something like an archway, something with overhang essentially. I've been racking my brain trying so many combinations trying to figure out how to create complex shapes but preserving a uniform grid UV map, so that when I bake it the texture can then be used in sculpt mode. This is a wonderful video by the way! Thank you for putting out this tutorial!

    • @TechArtAlex
      @TechArtAlex 9 днів тому

      Think of a Vector Displacement Map like a super stretchy square of rubber. You can make any shape you could stretch it over, but you can't add any holes to it. It would be impossible, as far as I am aware, to make a brush that could turn any subdivided surface into an archway. The problem isn't the overhang, it is the hole. A common mesh used to demonstrate VDMs capabilities is a mushroom. Quite complicated, with a large overhang. but our imaginary sheet can stretch over it just fine, with no holes needed. Topology is the relevant mathematical field.

    • @syaoranli7869
      @syaoranli7869 9 днів тому

      ​@@TechArtAlexYeah someone told me holes are impossible, and that's fine. But what if I had a hard modeled surface? Like a cube that has been booleaned by another cube? Is there a way to accomplish this through the shader editor? The only way I've found has been through multires and shrinkwrapping and manipulating the mesh of the grid in Sculpt mode. But I was hoping there might be a simpler work around. Blender secrets put out a video regarding vdm brushes, and said that it was possible to make vdms from existing objects. But does not disclose how. He only teases in his video that he uses shape keys. And that's what led me to your video [via keywords "Vector Displacement with shape keys"]

    • @TechArtAlex
      @TechArtAlex 9 днів тому

      @@syaoranli7869 You just need to bake the world position of the plane/mesh before and after applying the shape key, and then the difference between the two world positions is a standard vector displacement map.

    • @syaoranli7869
      @syaoranli7869 8 днів тому

      ​@@TechArtAlexcan this be accomplished when joining a hard modeled object with a grid?

    • @TechArtAlex
      @TechArtAlex 8 днів тому

      @@syaoranli7869 By grid you mean a subdivided plane? Any object/shape that can be flattened into a continuous plane with no overlap or holes should work. Think about our infinitely stretchy square of rubber. It may be possible to go beyond these constraints with clever mesh construction, but not in a generalized manner.

  • @topraktunca1829
    @topraktunca1829 10 днів тому

    First of all I want to thank you and say these tutorials are one of a kind on this topic. I have never seen a video covering foliage in this much detail. And explaining everything crystal clear. Also my pc is not that great and the meshes caused some frame drops, at first I thought this is normal. But I experimented and found out that using hierarchical instanced sm instead of normal instanced sm makes a day and night difference fps drops completely gone and noticeble performance boost. When you freeze the rendering you can see hism does culling more aggresively. Instanced sm does that too but some kind of a half loaded thing idk (mesh is loaded but probably just not rendered in).

    • @TechArtAlex
      @TechArtAlex 9 днів тому

      Thanks! On my machine it didn't make any difference what type of instance I selected, but yes in theory HISM or Foliage instances should perform better than standard instances. They also cull in grid clusters instead of individual instances which is faster, but in some cases you may notice a blockiness to the culling.

  • @NorwinLabs
    @NorwinLabs 10 днів тому

    How would you go about spawning grass in a procedural world? PCG gets too many points.

    • @TechArtAlex
      @TechArtAlex 10 днів тому

      Hierarchical runtime generation with PCG. The next video will probably cover an example of that and some of the pros and cons.

    • @NorwinLabs
      @NorwinLabs 10 днів тому

      @@TechArtAlex awesome! Thanks.

  • @bartosztitkin2700
    @bartosztitkin2700 10 днів тому

    from bezier grass video to this :D good one

  • @AaronFhd
    @AaronFhd 14 днів тому

    This is great now add RVT to blend with texture below and you got a great grass

  • @AbyssFX.
    @AbyssFX. 15 днів тому

    ​ @TechArtAlex Hey found your videos while trying to figure something out and wondered if you could help. Have you had any success with implementing this form of displacement on a skeletal mesh. The trick looks to be to start with the displacement map in tangent space and then using the transform to turn it into world space, but I have no idea how to do it with this method. Any advice?

    • @TechArtAlex
      @TechArtAlex 14 днів тому

      Correct, the vectors need to be in tangent space, which needs to be converted into world space for the WPO. I never got a version of the script to bake them correctly though with this particular encoding method due to a difference in how blender handles vertex normals vs tangents. I'll probably revisit it eventually, I've wanted to redo these videos for some time to correct some things.

    • @AbyssFX.
      @AbyssFX. 10 днів тому

      @@TechArtAlex Hey, so I finally made some headway in this matter. I'm currently using a traditional UV mapped tangent map to get the effect in unreal on a skeletal mesh. The key was to make a distance offset map that then controls how far each vertex should move in the direction of the new tangent map. I made the offset map by subtracting position maps of the mesh and the modified mesh. I made the vertex normals on my deformed mesh face outward in a unifor way as I just need the displacement to deform inward and this way I don't need to calculate the displacement direction and just have it baked into the tangent map. Btw you also don't need to use a 32 bit format if you just add a 1 to all your values and then divide by 2. That will store all the negative values in the 0 - 0.5 range and the positive in the 0.5 - 1 range, You can then do the math in reverse in unreal to get the proper coordinates.(Not too sure which approach is cheaper on the system, but it makes working with the img formats easier :D )

    • @TechArtAlex
      @TechArtAlex 10 днів тому

      @@AbyssFX. Awesome, glad you got it working. The reason for 32 bit accuracy get more accurate displacement. If this isn't necessary then remapping to 0-1 is fine.

    • @AbyssFX.
      @AbyssFX. 9 днів тому

      @@TechArtAlex That is something I still need to tweak and test. The last issue I have is the accuracy of the displacement. It's a bit messy still. I need to figure out how to bake in tangent space with the pixel per vertex UV thing you're doing and then I can test to see how much of a difference the 32 bit makes(it could be a huge difference and I was just foolish 😅). The main thing I noticed is that unreal sets a rly bad compression on non 32 bit images by default, changing those settings appears to "fix" the issue..

    • @TechArtAlex
      @TechArtAlex 9 днів тому

      @@AbyssFX. Yeah, regardless of bit depth, you need to use uncompressed formats for the pixel per vertex technique.

  • @NorwinLabs
    @NorwinLabs 15 днів тому

    Random queston. So I have made it though episode 7 and When viewed at a low angle, my grass material has a black shading issue on it. I believe it is too low and is in the ground when viewing in the material editor. How can I fix that? Is it a model issue?

    • @TechArtAlex
      @TechArtAlex 15 днів тому

      Is the artifact only in the material viewer, or does it also appear on the grass in level?

    • @NorwinLabs
      @NorwinLabs 15 днів тому

      @@TechArtAlex both. It tanks my fps and if I turn off world position offset, or switch it to transparent it goes away and viewing it anywhere, it has it. I suspect it is detecting it is underground. When I spawn it, I have to elevate it with pcg because it spawns clipped into the ground. Maybe it's contact shadows?

    • @TechArtAlex
      @TechArtAlex 15 днів тому

      @@NorwinLabs of it is clipped below the ground then your mesh pivot or UVs must be different than how I've set them up in the example. This could be adjusted but I set it up the way I did to minimize shader math. It could also be the setting "affects distance field lighting" in the mesh spawner. This setting often causes black artifacts.

    • @NorwinLabs
      @NorwinLabs 15 днів тому

      @@TechArtAlex It was affects distance field lighting. I was using the wrong pcg graph. Thanks!

  • @christopherfrancique9912
    @christopherfrancique9912 18 днів тому

    any plans for an asset pack , looks so good

    • @TechArtAlex
      @TechArtAlex 18 днів тому

      Thanks! There's a possibility.

  • @simonb1009
    @simonb1009 18 днів тому

    How do you create YCoord, ZCoord and XCoord Nodes?

    • @TechArtAlex
      @TechArtAlex 18 днів тому

      Those are "Named Reroute Nodes", a very useful tool for making the material tidier.

    • @simonb1009
      @simonb1009 18 днів тому

      @@TechArtAlex Thanks!

    • @simonb1009
      @simonb1009 16 днів тому

      @@TechArtAlex Yes, its good tutorial. But i have mistake- there triplanar only on Y coorditanates, On X i have stretchings. Please help me..

  • @BooneyTune
    @BooneyTune 18 днів тому

    Love my grass series

  • @YodaMaster-p3k
    @YodaMaster-p3k 19 днів тому

    the performance· is much better than tri-planar node?

    • @TechArtAlex
      @TechArtAlex 19 днів тому

      This isn't really a substitute for triplanar mapping, but rather how to achieve a sort of tri-planar mapping effect with landscape RVTs. The dithering technique used will be far more efficient than sampling a landscape RVT multiple times as normal triplanar mapping would, however.

    • @YodaMaster-p3k
      @YodaMaster-p3k 19 днів тому

      @@TechArtAlex we want to use rvt method, but tri-planar has performance problem, so we want to find a good method to solve the strectching problem..

    • @TechArtAlex
      @TechArtAlex 19 днів тому

      @@YodaMaster-p3k Sampling virtual textures actually requires two samples. So when you use a triplanar mapped RVT you get 6 samples per texture instead of 3. This could be part of the poor performance. The dithering technique (which I go into more detail about in my single sample triplanar mapping video) allows you to get a good projection with one one texture sampler (two in the case of RVTs instead of 6). So it can dramatically reduce the number of samples needed for RVT.

  • @givemepen0
    @givemepen0 20 днів тому

    UA-cam front page really feeding me this gem, great explanation

  • @CGToonStudio
    @CGToonStudio 20 днів тому

    Hi sir I'm working on a simple animation project in Unreal Engine 5.4. It's a 10-15 minute documentary-style video for UA-cam in 1080p, featuring MetaHumans and city life scenes. I'm sourcing assets from Sketchfab and will do color grading in DaVinci Resolve 19. Since I'm not creating games, I'm focused on keeping Unreal's size small and optimizing performance for smoother viewport and faster rendering. Could you make a video covering all possible ways to optimize Unreal Engine for animation projects like mine? It would be incredibly helpful to learn how to manage MetaHumans, streamline rendering, and keep the project lightweight. Thanks so much in Advance

  • @pierreseaumaire6988
    @pierreseaumaire6988 21 день тому

    Hey simple question, Can you with this method make an infinite rotation on a fanfor example ?

    • @TechArtAlex
      @TechArtAlex 21 день тому

      Yes, that kind environmental animation is one of the primary use cases of this technique. You would just input time * speed into the rotation angle, and something will spin nonstop.

    • @pierreseaumaire6988
      @pierreseaumaire6988 20 днів тому

      @@TechArtAlex Oh thank you for your answer man !

  • @yoyopanda8362
    @yoyopanda8362 21 день тому

    How is the performance compared to the other methods?

    • @TechArtAlex
      @TechArtAlex 21 день тому

      Because we are pre-computing and storing the landscape normal vector as instance data, this blending technique is very cheap at runtime. Nearly all of the cost is at build time instead of runtime. This could be an issue for those wanting to do hierarchical runtime generation, as the more complex the PCG volume is, the slower the grass can be spawned. This is something I'm considering making a video on.

  • @bartosztitkin2700
    @bartosztitkin2700 21 день тому

    You are genius bro but too much spaghetti in nodes. I needed more than few times to stop video and guess what happend, backwards and again. Keep improve this grass! You are The Legend

    • @TechArtAlex
      @TechArtAlex 21 день тому

      Haha thanks, yeah this one is definitely too much spaghetti right now.

  • @evzircon4152
    @evzircon4152 22 дні тому

    My grass cast a square shadow, what to do?

    • @TechArtAlex
      @TechArtAlex 21 день тому

      The only reason I could see that happening is if you were using raytraced shadows without enabling the feature "use WPO with raytracing". I strongly suggest you don't use raytraced shadows for the grass, as it will be extremely expensive. I talk about shadows more on a later video.

    • @evzircon4152
      @evzircon4152 21 день тому

      @@TechArtAlex Thank you! Just wrong shadows misled me

  • @Cloroqx
    @Cloroqx 23 дні тому

    I'd love to see how you'd approach adding some more variation to the grass, doing the normal map into the distance trick you mention around the 19 minute mark and merging this with a RT for character interactions. Controling the intensity of the cloud shadow and having it work into the distance would also be interesting. Outside of that, I think you pretty much covered everything. Fantastic work and thank you for sharing your knowledge with us!

  • @medmel2160
    @medmel2160 24 дні тому

    Hell yeah!

  • @Hotrood999
    @Hotrood999 24 дні тому

    I like the fact that you avoid taking shortcuts with Unreal's proprietary features and rely on more holistic and fundamental techniques Reject modernity, embrace tradition Great video!

    • @TechArtAlex
      @TechArtAlex 24 дні тому

      Thanks! While I'm optimistic about the fancy new tech, I definitely think the old fashion techniques like LODs and even cube-mapped reflections will still have their place for a long time.

  • @Levelonesucks
    @Levelonesucks 25 днів тому

    looks great. love your vids. love... you

  • @Leo7531
    @Leo7531 25 днів тому

    I'm interested to see how one would go about dynamically deforming the mesh to account for characters stepping on it, right now I'm trying to incorporate the same thing using Render targets in this same series but im curious if there's another way to go about doing it

    • @TechArtAlex
      @TechArtAlex 25 днів тому

      There are other ways, but a render target is probably the best.

    • @FishMan1nsk
      @FishMan1nsk 24 дні тому

      There's a basic example in some ot the unreal sample projects. It does not use render targets. But the effect looks somewhat decent. It just distort the grass outward from pawns.

    • @Leo7531
      @Leo7531 24 дні тому

      @@FishMan1nsk yea I've followed the kodeco tutorial before from tommy tran but I'm not trying to do the particle method, there's a way to sort of recreate the same effect but with render targets but I'm still trying to figure that part out. Effectively it's taking the same RT mask data and sort of adding to it with an offset to determine direction of the bend

  • @PPonyo
    @PPonyo 25 днів тому

    THE LEGEND RETURNS

  • @ЕвгенийКостюкевич-т7в

    can I do the same with render target textures?

    • @TechArtAlex
      @TechArtAlex 25 днів тому

      Yes, that would work just fine.

    • @ЕвгенийКостюкевич-т7в
      @ЕвгенийКостюкевич-т7в 25 днів тому

      @@TechArtAlex Do I have to do something additional to connecting alpha channel to SDF and funcion result to opacity? (the material is translucent UI)

    • @TechArtAlex
      @TechArtAlex 24 дні тому

      Not that I can think of. It should work the same with any distance field.

  • @zeon3d755
    @zeon3d755 28 днів тому

    where can i get the code pls

    • @bartosztitkin2700
      @bartosztitkin2700 22 дні тому

      Make it yourself from part 1 to achieve knowledge and understand how it works!

  • @dcrookz
    @dcrookz Місяць тому

    I'm interested in the transition to grass textures at distance that you mention here, if you've got the juice to do another video on grass!

    • @TechArtAlex
      @TechArtAlex Місяць тому

      Still planning on it! Just needed a bit of a break haha. Maybe sometime this week.

  • @factchecker2179
    @factchecker2179 Місяць тому

    Man you saved us hours and hours of pain, thanks

  • @CalmBurger
    @CalmBurger Місяць тому

    What a brilliant human!

  • @vaanidel2117
    @vaanidel2117 Місяць тому

    This is insane. EDIT: ha my dumbass should've just watched the vid first. Nice stuff here!

  • @avilxy8305
    @avilxy8305 Місяць тому

    Hello Alex, I am loving this series and have managed to get a similar result to yours but I would like to add player interaction. I have created an interaction system that works on most foliage but when I add it to the WPO output of the grass it produces a very strange stretching/deformation affect. I believe this is because I am not controlling the individual control points. Any ideas on how I could go about adding a normal WPO interaction to this grass?

    • @TechArtAlex
      @TechArtAlex Місяць тому

      In theory as long as it is the last thing you do, after applying all other modifications, you should be able to use regular deformation. But I would strongly recommend using and shifting the control points with your interaction system instead. This will make sure you have correct normals, and we have built in the length preservation system already it can take advantage of.

    • @avilxy8305
      @avilxy8305 Місяць тому

      ​@@TechArtAlex I can't work out how to directly affect the points. Do u have any idea on how I can apply normal WPO (regular deformation) such as simplegrasswind to the grass blades. Using an add node does not work as it creates the same stretching affect. Any rough idea would be appreciated.

    • @TechArtAlex
      @TechArtAlex Місяць тому

      @@avilxy8305 Directly applying to the points would be done in exactly the same was as the wind video. In that case we added and subtract from the control points coordinate based on the wind sine wave. But we can also push it based on things like our interaction system render target. The Simple grass wind always stretches meshes, which is part of why I recommended against using it in the wind video in favor of my method, which is capable of estimating and preserving approximate length.

  • @swoorp
    @swoorp Місяць тому

    How would you structure the shader for view dependent thickening if you were to instead use a mesh of grass blade. I designed a mesh of grass blade myself, and I am trying to achieve what you achieved with vertex colors instead, it is not working correctly though. You used texture coordinate to calculate the left edge (t) and I am doing the same with vertex colors, and that seems to be working just fine. The part where you multiply the rest of the nodes with your normal is where my version has a problem, I assume. Since my normal is rounded (blue gradient), I am not exactly sure how I could make it work. And by no means I am experienced with writing shaders, so I am interested what your approach to this would be.

    • @TechArtAlex
      @TechArtAlex Місяць тому

      its mostly a matter of deciding what direction you want to shift the vertex positions. In Ghost of Tsushima, they simply shifted them down in view space. I am shifting them in the downward facing vertex normal direction, but you could shift them in any direction you want and have a means to define. The downward local z normal would be another decent choice. The reason I went with the approach I did is that neither the view space or local z shift thickens the blade evenly regardless of the triangles orientation. You could also nullify part of your normal, and multiply by that. For example, say we only want to shift the verts in the Z and X direction. We can just eliminate the Y axis and then the roundness of the blade in that direction wont interfere.

    • @swoorp
      @swoorp Місяць тому

      @@TechArtAlex Interesting, I will mess with this myself more. I have kind of got it working by multiplying XZ vector and skipping the normal. Funny thing is the X pushes the verts towards -X instead of +X lol. But yeah, love your work. Thanks!

    • @swoorp
      @swoorp Місяць тому

      @@TechArtAlex Okay, final update. I got it working, I made changes to my mesh, and now it is working almost perfectly. Thanks!

  • @vyacheslavkuzmak3086
    @vyacheslavkuzmak3086 Місяць тому

    Update: My fault, missed the subdivision adding for the rectangle itself. Great tutorial! Never throught mathematics could be so amazing. I have one problem for now, after adding "transform vector" node, width stops working, goes back to simple rectangle. But stil works with Local Space option, checked everything few times for now

  • @TomDenny-s7n
    @TomDenny-s7n Місяць тому

    Thank you so much for this series. I have been trying to implement the wind system shown in this video to my grass meshes (from videos before) and it just disappears and I think I may be missing something. Any ideas? Or maybe a screenshot of the wind shader that I could check mine against?

    • @TechArtAlex
      @TechArtAlex Місяць тому

      A disappearing mesh may have something to do with the mesh bounds, or just displacing the mesh far away accidentally. Make sure you're only applying the wind to p1 and p2 and not p0.

    • @TomDenny-s7n
      @TomDenny-s7n Місяць тому

      @@TechArtAlex Ah, Thank you so much for the quick reply. It turns out because of my messy code I was applying wind to P0 not p1. Once again thank you for this brilliant series.

  • @jamesbrady1930
    @jamesbrady1930 Місяць тому

    is this available as a start to finish tutorial? that would be great as I am trying to do this with my own project to make the cliff faces more seamless.

    • @TechArtAlex
      @TechArtAlex Місяць тому

      I don't have a start to finish tutorial version. If you haven't already, you'll probably want to watch my single sample triplanar mapping video, which has more details on that part. This video is just a slight modification of the world coordinates used for the triplanar mapping. If you are comfortable with creating a triplanar mapping material from scratch, this will be a lot more approachable.

    • @jamesbrady1930
      @jamesbrady1930 Місяць тому

      @@TechArtAlex link? also im wondering since I am doing a TD game if it would be overkill anwyway. so kind of mulling over its use currently. lol. like should i, shouldn't i, what will it add to the scene blah blah. either way great video regardless, and definitely something I want to investigate and learn.

    • @TechArtAlex
      @TechArtAlex Місяць тому

      @@jamesbrady1930 Thanks! Yeah, might be kind of hard to notice this effect on a TD game. But it's always good to have another tool in the belt I guess.

    • @jamesbrady1930
      @jamesbrady1930 Місяць тому

      @@TechArtAlex im doing a ruins project, going to revisit that kind of Skyrim feel, made my own rock and cliff faces. 1.5-2km wide terrain I made, road, along with a ruin cathedral. if you can link me that video and see if I can incorporate it into that one maybe.

    • @TechArtAlex
      @TechArtAlex Місяць тому

      @@jamesbrady1930 Nice! Here's that link ua-cam.com/video/dFApswlwsRc/v-deo.htmlsi=Wa1t0esNwNq74F_-

  • @christopherfrancique9912
    @christopherfrancique9912 Місяць тому

    bro looks so good coming along so well

  • @medmel2160
    @medmel2160 Місяць тому

    This is more and more looking like Ghost of Tsushima grass! Keep it up!

  • @Stygmire
    @Stygmire Місяць тому

    Thanks-again. FWIW, and it might be my specific implementation + stupid-compiler-tricks but I was able to save a few (3) instructions by swapping-out the MakeFloat2 for Wind_Speed_X and Wind_Speed_Y for a 4vec parameter, using a component-mask off the top (white) pin and the B channel for the Wind_Speed_Multi parameter. YMMV, but try it; every savings helps! I find, generally, any time you use an append-vector it will cost you at-least-one instruction. It's part of my performance pass to see where I can eliminate such ops and pack values. Not always, for sure, but more often than not, I find I can scrounge a decent savings when doing so. Also, my understanding is that a power() function is just-expensive to load and run, not something that is reflected in the instruction-count. Unless one uses a large/very-small value for the exponent; eg: it's better to multiply-out a power-3 or power-4 vs using a power() function (confirm/thoughts)? For the power-functions on the camera-tilt, I swapped out the power(0.5) for a divide by 0.1 -> Saturate (seems close-enough in the visual comparison of the gradient), and the power(0.33) for a divide by .025 -> Saturate. Doing so saved me several more instructions.. Additionally, as I have grass going out to ~500 meters (I mean how much do you really need), and at that point it's almost sub-pixel size, I added a distance-gradient to scale-up the WPO operations (straight multiply) for the final bezier-curve, the tilt-power, and the y-scaling of the mesh. At a very-far distance this helps 'fatten' the grass and back-fill screenspace, helping to provide good mesh coverage/saturation at a distance. Even just doubling it, at that distance you wouldn't notice the scaling of the mesh and it will keep more of the mesh in the visual-field. If you just multiply the last-part of the WPO-chain, it will mush the grass at a distance, so you have to spot-multiply those three places. EDIT: I moved the scaled WPO multiply to earlier in the tilt-calculations so it increases the amount of tilt based on distance vs just increasing tilt overall. Dumb on my part... Finally, I enabled the Early-z-pass option for masked-only in project-settings, switched the grass-shader from opaque to masked, and plugged in a smooth-stepped PerInstanceFadeAmount into opacity-mask. This did garner a few extra FPS in testing, and made a very nice fade out you can't really notice. I added a shaderbin link: blueprintue.com/blueprint/510z4it9/ (updated!) Hope these help, and keep the lessons coming! :D

    • @TechArtAlex
      @TechArtAlex Місяць тому

      I have seen append go either way when it comes to instruction counts. Vector packing can also go either way in frame times, but I'd still consider it good form. That said, in a complete implementation wind params probably should be coming in from a collection parameter node anyway as it will probably be part of a larger global wind system so those were all just placeholders since I don't plan on building all of that out. Pow is in theory more expensive, but in practice most compilers are doing lots of automatic optimizations that may make that mostly irrelevant. For example if you put in a power of 2, it'll generally just multiply by itself anyway - although there are more sophisticated tricks being used as well. But it doesn't hurt to avoid potentially costly operations. I'm always quite skeptical of instruction counts, but if we can observe a frame time reduction then I'm all in. Like you said - doesn't hurt to try and see what happens. I'll have to test these changes out. Grass takes up a lot of screen space, and in this case has lots of verts, so every little bit counts. As for scaling the grass at a distance, I think this is generally a good approach. It is basically what nanite volume preservation does - and it is what outerra proposed in their blogpost that inspired Sucker Punch. Every time they cut the polygons in half, they double the surface area of the remaining grass. This can help reduce quad overdraw, reduce aliasing and lots of other goodies. Ideally I'd cull much more aggressively than I did in this demo, but I kind of wanted to show off a ridiculous number just because I figured people would want to see it haha. I've also been experimenting with importance based culling, but I'll probably make a separate video on that rather than bundling it in this series. Basically, rather than using distance alone, we can assign an importance value to grass based on things like proximity to a mesh. For example, if the grass is near a certain mesh, it should be culled later - since that grass is visually more important to the scene as its silhouette is contributing much more detail than a random blade in a field. The result is quite good I think. Another example would be that grass on a hilltop is more important than grass in a rut, although that's a bit harder to procedurally define. As for culling, I prefer to shrink and/or sink the grass blades while blending their normal towards the underlying terrain. This avoids the need for a masked material while still making the transition basically invisible. When I get around to the next video, it will probably be about blending out in more detail, and how to get the underlying terrain normal vector without needing to sample a virtual texture (thanks once again to PCG data packing). Thanks for the feedback and sticking around!

    • @Stygmire
      @Stygmire Місяць тому

      @@TechArtAlex >as for culling, I prefer to shrink and/or sink the grass blades while blending their normal towards the underlying terrain. How does this work? I have been informed/learned that using WPO to move a grass mesh, for example 10,000 down the Z-axis so it's culled and never drawn. Is flattening the mesh the same kind of thing? Does it prevent the mesh from being drawn in the first place? Genuinely eager to learn. From what I recall Final Fantasy had a similar/same thing with moving particles around the camera to be culled. Is flattening the grass the same thing?

    • @TechArtAlex
      @TechArtAlex Місяць тому

      @@Stygmire Pretty much, yeah. Using the vertex shader this way doesn't completely remove the mesh, because its verts technically still exist. However, because they occupy zero screen space, there is no fragment/pixel shading happening. And because they're instances, the verts were cheap anyway. This is the same reason why the extra/wasted triangle is basically free. Yes that vertex exists, but ideally no fragments are being shaded. If the grass sinks below the ground, then the z- pass can make sure the fragments are skipped too. Eventually the instance is entirely culled, but by that time it is already invisible. Using several cascades like I have cleans up the nullified meshes regularly to keep the instance count down, even if many are not really drawn. I tried assigning random cull values on a per instance basis, but it was not scalable to this many instances. But that might work for other things.

  • @BooneyTune
    @BooneyTune 2 місяці тому

    I would like to see more on the optimization. I don't have much experience with it but this is great tutorial series to get to know more about it and learn.

    • @TechArtAlex
      @TechArtAlex 2 місяці тому

      I'm not sure there's a whole lot more that can be done besides controlling these elements more tightly or cutting features. For example, one can cull the grass much more aggressively than I did. Ghost of Tsushima culled 75% of blades at each cascade, whereas I'm only culling 25%. But if I think of any easy performance wins I'll make sure to mention them.

  • @mathy6918
    @mathy6918 2 місяці тому

    Simply put, the most useful UE5 tutorial around.