Announcement

Collapse
No announcement yet.

Your thoughts on and comments to Volume Rendering in Unreal Engine 4.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hello! I am trying to do texture volumes, I will point out that I am really bad with materials, shaders and what not. Most things here goes far beyond my understanding.

    I saw Dokipen's tutorial ( https://www.youtube.com/watch?v=x_N1...ature=youtu.be ) and thought that felt feasible and have followed it, though I use the start content default T_Fire_SubUV which is 6X6 UVs.
    So I have changed some of the node values, but I too get these lines when looking from the side.
    Any help is appreciated.

    Click image for larger version

Name:	voltexparticle.png
Views:	1
Size:	158.3 KB
ID:	1124877

    Click image for larger version

Name:	matnodes.png
Views:	1
Size:	233.2 KB
ID:	1124879
    Last edited by ste1nar; 03-19-2017, 11:23 AM.

    Comment


      Hello

      I need your help to create my own volume texture. Can I use Houdini / 3Dsmax to create my texture ?

      Comment


        Originally posted by erodann View Post
        Hello

        I need your help to create my own volume texture. Can I use Houdini / 3Dsmax to create my texture ?
        The only way I know how to do that would be to create a mesh with the subUV layout and use render to texture.

        So if you want a 256^3 volume, you need 256 slices stacked one atop another with the right spacing, and they need to be laid out in UV space in a 16x16 fashion. Then you can do render to texture and capture your material that way.

        Or you could render out the individual frame slices and use an external program to stitch them into a flipbook.

        I haven't actually done it but it should work. I am trying to do all my volume stuff in UE4.

        This type of stuff should get easier once true 3d texture support is in the engine. But I am not sure what that pipeline will look like either.
        Last edited by RyanB; 03-23-2017, 05:36 PM.
        Ryan Brucks
        Principal Technical Artist, Epic Games

        Comment


          Originally posted by dvd.kh
          more details please. :]
          I have posted all the details already. See these two articles:

          http://shaderbits.com/blog/creating-...ic-ray-marcher

          http://shaderbits.com/blog/authoring...olume-textures

          I am going to release these as a content plugin very soon. Been working on it on random times but Horizon Zero Dawn has been taking up my free time lately.
          Ryan Brucks
          Principal Technical Artist, Epic Games

          Comment


            I don't really do video tutorials other than livestreams. I tend to prefer written tutorials over videos for more advanced stuff.

            But I will ping the livestream guys to see if they have any time coming up.
            Ryan Brucks
            Principal Technical Artist, Epic Games

            Comment


              I just got done making that effect in realtime actually but it is really slow. In a month or two I will share details about it but I need to hold of for now so it won't be part of the initial content plugin release.
              Ryan Brucks
              Principal Technical Artist, Epic Games

              Comment


                Hello RyanB,

                Thanks for putting together the tutorials & information on all this. I've followed all the steps described in your blog here: http://shaderbits.com/blog/creating-...ic-ray-marcher

                Generally my results match what you have shown except I see a strange line artifact when aligned horizontally with the slices:
                Click image for larger version

Name:	LinesBug.jpg
Views:	1
Size:	36.3 KB
ID:	1127068

                I'm guessing I have something setup incorrectly in the Ray March Cube Setup function based on your tutorial information, but I can't seem to figure this out. Any tips on where I could look? Thanks and any help is much appreciated!

                Comment


                  I had a similar problem for a bit. I think it might come from a small mistake in how you calculate the row offset. I cant remember exactly how I solved it however. You can see that every n slices it samples from the slice ONE ROW below it. (Or above it)

                  Comment


                    Originally posted by NoobsDeSroobs View Post
                    I had a similar problem for a bit. I think it might come from a small mistake in how you calculate the row offset. I cant remember exactly how I solved it however. You can see that every n slices it samples from the slice ONE ROW below it. (Or above it)
                    I've been banging my head on this the last few nights, could you do me a huge favor and dig into your copy of this shader to see if you can find the issue? I'm seeing where it does the extra final step in the Density RayMarch function but generally I have a hard time following this code.

                    Comment


                      Originally posted by Dorian000 View Post
                      I've been banging my head on this the last few nights, could you do me a huge favor and dig into your copy of this shader to see if you can find the issue? I'm seeing where it does the extra final step in the Density RayMarch function but generally I have a hard time following this code.
                      My project is open source: https://github.com/NoobsDeSroobs/VRVizualizer

                      Comment


                        Todays livestream sounds very useful for the topic of volumetric stuff.

                        https://forums.unrealengine.com/show...Live-from-Epic!

                        Comment


                          Thanks NoobsDeScroobs & Steve, I'll check those out!

                          Comment


                            FWIW, after utilizing the raymarching shader from the content plugin Ryan released I'm still having the slicing artifact with this cloud texture. I think it has something to do with this 3D texture pages being 12x12 instead of 16x16 or something to do with the size of each page. Still not able to figure it out but I'll keep digging!

                            Comment


                              I'm curious, would anyone know if this same ray marching technique could be used to render a voxel style game like minecraft on the GPU? Not sure if a fully opaque pixel in a 3d texture could be optimized to no longer bother processing all the pixels in pages behind it.

                              Comment


                                Originally posted by Dorian000 View Post
                                FWIW, after utilizing the raymarching shader from the content plugin Ryan released I'm still having the slicing artifact with this cloud texture. I think it has something to do with this 3D texture pages being 12x12 instead of 16x16 or something to do with the size of each page. Still not able to figure it out but I'll keep digging!
                                What is your 12x12 layout? It needs to divide evenly with the texture resolution with no fractions. And your volume should not have any data touching the edges.

                                Suggested sizes I have calculated. As you can see, 12x12 is nowhere on the list:

                                16 ^ 3:
                                16 x 1 frames of 16x16 in a 256 x 16 texture
                                8 x 2 frames of 16x16 in a 128 x 32 texture
                                4 x 4 frames of 16x16 in a 64 x 64 texture

                                32 ^ 3:
                                32 x 1 frames of 32x32 in a 1024 x 32 texture
                                16 x 2 frames of 32x32 in a 512 x 64 texture
                                8 x 4 frames of 32x32 in a 256 x 128 texture

                                64 ^ 3:
                                64x1 frames of 64x64 in a 4096 x 64 texture
                                32x2 frames of 64x64 in a 2048 x128 texture
                                16x4 frames of 64x64 in a 1024 x 256 texture
                                8x8 frames of 64x64 in a 512 x 512 texture

                                100 ^ 3:
                                20x5 frames of 100x100 in a 2000 x 500 texture
                                10x10 frames of 100x100 in a 1000 x 1000 texture

                                128 ^ 3:
                                64 x 2 frames of 128x128 in a 8192 x 256 texture
                                32 x 4 frames of 128x128 in a 4096 x 512 texture
                                16 x 8 frames of 128x128 in a 2048 x 1024 texture

                                196 ^ 3:
                                14x14 frames of 196x196 in a 2744x2744 texture

                                200 ^ 3:
                                50x4 frames of 200x200 in a 5000 x 400 texture
                                25x8 frames of 200x200 in a 2500 x 200 texture

                                256 ^ 3:
                                32x8 frames of 256x256 in a 8192 x 2048 texture
                                16x16 frames of 256x256 in a 4096 x 4096 texture


                                324^3:
                                18x18 frames of 324x324 in a 5184 x 5184 texture


                                400^3:
                                20x20 frames of 400x400 in a 8000 x 8000 texture


                                For the non-square aspect ratios, you need to edit common.usf and change the input argument to "PseudoVolumeTexture" and change "float xsize" to be "float2 xsize".
                                Ryan Brucks
                                Principal Technical Artist, Epic Games

                                Comment

                                Working...
                                X