Unreal 5.3 - Making a volumetric ray marching shader from scratch (part 3)

Поділитися
Вставка
  • Опубліковано 2 жов 2024
  • In this video we will finish our volumetric raymarcher material by adding some animated noise, and make a pseudo volume texture editor that works in runtime, so you can modify these clouds with gameplay effects.
    As a remainder, this whole series is based on work by Ryan Brucks; check out his blog at shaderbits.com/

КОМЕНТАРІ • 37

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

    Hola Amigo! Loving this series. Thanks for taking the time! I've been scouring the web all week and this is the first tut that makes sense.
    I have to ask because I can't find info on it anywhere... Do you know of any resources that go over creating a Pseudo Volume Texture from a mesh? I am very comfortable in Blender, so that would be a bonus! I am wanting to turn models into textures to use as volumes in UE5 for a current project.

  • @linkrealities
    @linkrealities 6 днів тому

    Hi Enrique,
    first of all, thanks a lot for the tutorial series, it was really great to watch, good explained, and easy to follow.
    I just wanted to ask, if you found a solution for the non-uniform scaling issue in the meantime

  • @Ethan-gu9hm
    @Ethan-gu9hm 9 місяців тому +1

    How does this compare to the new VDB rendering in UE 5.3, and if I have a VDB, how can I convert it into the texture suitable for this rendering method?

  • @progenitorx
    @progenitorx 3 місяці тому

    Thank you for this tutorial series! I learned so much about raymarching and materials in general.
    Would it be a simple modification to have the material be affected by the light from a spot light instead of or in addition to the sky light?

    • @EnriqueVenturaGames
      @EnriqueVenturaGames  3 місяці тому +1

      It is not impossible but it needs a couple changes: the main one is that the traces from a spot light are not parallel, but instead they all come from the same origin; the other change is that the intensity of the light also decreases with the distance (usually squared distance), which must be incorporated when calculating the absorption. Hope this helps! :)

  • @MrBudoro
    @MrBudoro 6 місяців тому

    How come UpdateTreaces draw box extend even if it have 0 time 0 thikness and is not connected to any execution? or it should be connected to event tick?

    • @MrBudoro
      @MrBudoro 6 місяців тому

      Ahh it is, but it is showed way later

  • @weijunchen1290
    @weijunchen1290 11 місяців тому +2

    Is it possible to make a shadow cast onto the ground?

    • @EnriqueVenturaGames
      @EnriqueVenturaGames  11 місяців тому

      Yeah but projected shadows, much like depth sorting between multiple volumes, will need a separate tutorial. Maybe once I finish the ones I'm working on I'll have time to go back to this and add those effects.

    • @weijunchen1290
      @weijunchen1290 11 місяців тому

      Thanks for your answer, can't wait to see your next tutorial~

    • @colepeterson5392
      @colepeterson5392 4 місяці тому

      I would also love to see this project continued. Just about finished with this video, very cool stuff!

  • @Elkkkkkk
    @Elkkkkkk 9 місяців тому

    hey enrique thank you so much for this series, took me a lot of rewatches but understanding more every time :) but was also wondering how come we weren't using the volume material domain and if the code/theory we went through would apply similarly in that domain too.

    • @EnriqueVenturaGames
      @EnriqueVenturaGames  9 місяців тому +1

      Thank you! Yeah, for rendering volumes you can use true volumetric materials and it is a bit more efficient than using pseudo volume textures. The reason for the tutorial to use the pseudo volume approach is that in order to modify these textures in engine you need the appropriate type of render target (and we don't have volume RT in Unreal yet)

    • @Elkkkkkk
      @Elkkkkkk 9 місяців тому

      @@EnriqueVenturaGames hey Enrique thanks for the reply :) was wondering if you’re able to give a quick breakdown of all the volume rendering capabilities of UE at some point…as someone just starting to look into it it’s all very daunting. Pseudo volume textures, SVTs, VBDs…it’s all so cool but makes my head hurt

  • @2BRE-
    @2BRE- 4 місяці тому

    Hey, i have problem with this function Texture3DSample() "error: no matching function for call to 'Texture3DSample'", UE 5.4.1, any solution?

    • @colepeterson5392
      @colepeterson5392 4 місяці тому

      I had trouble with that function until I changed TexSampler to texSampler. Maybe it's similar for you.

    • @2BRE-
      @2BRE- 4 місяці тому

      @@colepeterson5392 still nothing, no matching function, only Texture2DSampler works, but the effect is strange

    • @colepeterson5392
      @colepeterson5392 4 місяці тому

      @@2BRE- Try this: noiseTexure.Sample(texSampler, (pos * 4.0) + noiseOffset); This method works for me with the volume texture but weirdly does not work with 2D textures. Hopefully they sort it out soon.

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

      You are probably not uot using a Volume Texture as the Texture input, make sure you are using VT_PerlinWorley_Balanced

  • @roadtoenviromentartist
    @roadtoenviromentartist 11 місяців тому

    Que crack!!!. jajaja.. y yo sin parar de estudiar no llego a esto ni con programación ni matematicas.. soy un profe y profesional mediocre sin me mido contigo.. si señor!!!!.

  • @colepeterson5392
    @colepeterson5392 4 місяці тому

    This series is hands down the coolest Unreal material tutorial ever. Learned a ton of useful tricks I can apply to any of my future materials. Can't thank you enough for breaking it down the way you do!

  • @fran.fndz.techart
    @fran.fndz.techart 11 місяців тому

    btw、it works in editor mode (no need to press play). using utility widge focus to get keybpard click (like Shift for Paint), the mouse position is editor camera vierport forward vector.

  • @gursimransingh8726
    @gursimransingh8726 11 місяців тому

    so can we make use of render target to mimic smoke effect using some fluid simulation (pseudo fluid simulation)

  • @MrBudoro
    @MrBudoro 6 місяців тому

    Hey, when i paste this 2 lines of code on ue5.3.2 im getting error and warning
    float4 noisesample = Texture3DSample(NoiseTex,TexSampler,(CurPos*4)+NoiseOffset);
    cursample -= max(noisesample.g*(5-cursample),0.0);
    "[SM5] D:\Engine\Private\BasePassPixelShader.usf.intermediate.hlsl(231,23-148): warning X3570: gradient instruction used in a loop with varying iteration, attempting to unroll the loop
    [SM5] D:\Engine\Private\BasePassPixelShader.usf.intermediate.hlsl(211,5-102): error X3511: unable to unroll loop, loop does not appear to terminate in a timely manner (99 iterations) or unrolled loop is too large, use the [unroll(n)] attribute to force an exact higher number"
    is there any way around it?

    • @EnriqueVenturaGames
      @EnriqueVenturaGames  5 місяців тому

      Not sure why you are getting that error, but the most probable cause is that the compiler is trying to unroll the loop because there is something funky going on with the mip mapping level of your texture 3D sample. As the error suggests, you can try [unroll(n)] with the number of steps to force the compiler to write separate, non-branching loops, but I would look into the texture that you are sampling from, maybe you can change the mip settings or force a sample at a specific detail level. Hopefully this helps!

  • @AMadLad
    @AMadLad 8 місяців тому

    How do I use the material for Niagara particles?

  • @just2293
    @just2293 10 місяців тому

    Good content!I have learned a lot from it,How do we handle non-uniform scaling?

  • @DeveloperGuy223
    @DeveloperGuy223 11 місяців тому

    Great content! I wil definetly be trying this out.

  • @adamcboyd
    @adamcboyd 11 місяців тому

    Our game has an aurora (borealis) in the sky at all times once the light drops. Its a VR game and i would love to be able to find a way to have something like that but with the aurora affecting scattered clouds. Its a near future bumper jumper. :)

    • @EnriqueVenturaGames
      @EnriqueVenturaGames  11 місяців тому

      That is a good question... once you mix different volumes the depth sorting becomes much more complicated and expensive. At this point simulating an actual aurora effect as part of the atmospheric simulation could be a better approach; I might make a tutorial on something like this in the future, I'll add it to the list of ideas!

  • @orestzhukow1455
    @orestzhukow1455 9 місяців тому

    Amazing tutorials !

  • @realpersnetto
    @realpersnetto 11 місяців тому

    What is this sorcery?

  • @monkeywrench677
    @monkeywrench677 11 місяців тому

    Fantastic!

  • @张毅-d8h
    @张毅-d8h 5 місяців тому

    Amazing