Announcement

Collapse
No announcement yet.

Hair Rendering Simulation test

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

    #46
    Originally posted by JasonStewart View Post
    Hi everybody. I'm a developer technology engineer at AMD. I just wanted to offer my help to Ehamloptiran, if you have any questions regarding TressFX.

    Latest TressFX info is here, from the recent AMD & Microsoft Developer Day in Sweden:
    http://developer.amd.com/resources/d...presentations/
    TressFX: The Fast and The Furry

    I'd be interested to hear what you would like to see improved in the simulation code. Also, there is a new version of the TressFX sample that will be released soon that has simulation improvements.
    Hi Jason,

    Thats awesome, I am glad to have an AMD developer here. I wouldn't mind some tips on how I would go about making TressFX work in a deferred pipeline properly. I noticed in the GDC presentation, it was touched on in one of the slides. I had major issues getting it to work in UE4's deferred pipeline and ended up Rendering the ABuffer and KBuffer during the translucency stage (So I sort the hair with the translucent objects so they are rendered in the correct order), and then composite it into the scene color (So all lighting/shading is done during the KBuffer pass as you would do in a forward renderer).

    I would also love to get my hands on the new sample at some point, it looks like, if I am reading the latest presentation correctly, that tessellation has been implemented, which I was planning to do anyways. Plus I am interested to see the updated simulation code.

    The improvements I would like to see with the simulation (If it hasn't been done already) is gravity having more impact. I am thinking of situations where the character is swimming, you could turn off gravity, have the hair move freely around, then when exiting the water you turn gravity back on and up the stiffness and spec, to make it look wet. (The second part can already be done). And maybe some wind improvements because right now it just looks really odd and artificial, but this could be improved at the wind end, by feeding in a better wind function, so that may be sufficient.

    Thanks,
    Ehamloptiran.
    FluidSurface Plugin: https://github.com/Ehamloptiran/UnrealEngine/releases
    TextureMovie Plugin: https://github.com/Ehamloptiran/TextureMoviePlugin

    Comment


      #47
      UPDATE

      Current simulation code complete except for Collisions:

      https://drive.google.com/file/d/0Bzq...it?usp=sharing
      FluidSurface Plugin: https://github.com/Ehamloptiran/UnrealEngine/releases
      TextureMovie Plugin: https://github.com/Ehamloptiran/TextureMoviePlugin

      Comment


        #48
        Very nice!


        Twitter - @TheCSilverman

        Ancient Cistern | Advanced Material Pack Ed. 1 | Advanced Material Pack Ed. 2 | Advanced Material Pack Ed. 3 | Texture Pack Ed. 1 | Container Pack Ed. 1 | Road Sign Pack Ed. 1

        Comment


          #49
          Couple more pictures, just playing around with some assets made in 3dsmax:

          Click image for larger version

Name:	BetterGrass.jpg
Views:	1
Size:	266.3 KB
ID:	1051191
          Just a test to see how rendering some foliage would go

          Click image for larger version

Name:	FullBodyFur.jpg
Views:	1
Size:	191.9 KB
ID:	1051192
          Full body fur consisting of 200,000 strands.

          And a video of my new and better furball in motion: https://drive.google.com/file/d/0Bzq...it?usp=sharing
          FluidSurface Plugin: https://github.com/Ehamloptiran/UnrealEngine/releases
          TextureMovie Plugin: https://github.com/Ehamloptiran/TextureMoviePlugin

          Comment


            #50
            soo awesome work!!!
            reference
            http://dirty-windows.de

            my blog
            http://ulrichthuemmler.blogspot.com/

            Comment


              #51
              Originally posted by Ehamloptiran View Post
              Thats awesome, I am glad to have an AMD developer here. I wouldn't mind some tips on how I would go about making TressFX work in a deferred pipeline properly. I noticed in the GDC presentation, it was touched on in one of the slides. I had major issues getting it to work in UE4's deferred pipeline and ended up Rendering the ABuffer and KBuffer during the translucency stage (So I sort the hair with the translucent objects so they are rendered in the correct order), and then composite it into the scene color (So all lighting/shading is done during the KBuffer pass as you would do in a forward renderer).

              I would also love to get my hands on the new sample at some point, it looks like, if I am reading the latest presentation correctly, that tessellation has been implemented, which I was planning to do anyways. Plus I am interested to see the updated simulation code.

              The improvements I would like to see with the simulation (If it hasn't been done already) is gravity having more impact. I am thinking of situations where the character is swimming, you could turn off gravity, have the hair move freely around, then when exiting the water you turn gravity back on and up the stiffness and spec, to make it look wet. (The second part can already be done). And maybe some wind improvements because right now it just looks really odd and artificial, but this could be improved at the wind end, by feeding in a better wind function, so that may be sufficient.
              Regarding proper integration with deferred, doing it forward as you have done actually feels like the right answer to me. Trying to shoehorn everything down the deferred path can be problematic. Martin and Nick from the UE4 rendering team touched on this a little during a Twitch broadcast a couple of months ago.
              http://www.twitch.tv/unrealengine/b/518420018

              At the 9:15 mark, they start talking about opaque vs. translucent (and the related topics of deferred vs. forward). Later in that same section, at the 12:04 mark, Martin mentions how the current plan is to move the current deferred solution to be "more hybrid". While few details were given, typically in this context "hybrid" means "send deferred-friendly materials down the deferred path, and do the rest forward". And, in my opinion, hair would typically fall into the "do the rest forward" bucket.

              At the 32:45 mark, Martin actually talks a bit about how hair lighting would probably be done in the translucency system (and then right after that, Nick talks a bit about the complications with integrating many lighting models into a deferred renderer).

              All that is to say, your current forward solution sounds pretty sensible to me.

              Regarding tessellation, the latest presentation mentions tessellation only to discuss how it should be avoided, as it will negatively impact performance. A "pure" vertex shader solution for hair geometry is much faster. In practice, you rarely get curvature issues unless the hair is very close. And if that use case is important in a particular game, it would still be better just to author more vertices per strand rather than use hardware tessellation.
              Last edited by JasonStewart; 06-10-2014, 02:10 PM.

              Comment


                #52
                Outstanding!

                Only thing with the sim that I think could use a little work is the slightly over-damped feel of the hair movement. Its got a slightly underwater feel to me.

                But I seem to remember the TressFX in Tomb Raider being like this too, so it might be a limitation of the technology.

                Comment


                  #53
                  Originally posted by JasonStewart View Post
                  Regarding proper integration with deferred, doing it forward as you have done actually feels like the right answer to me. Trying to shoehorn everything down the deferred path can be problematic. Martin and Nick from the UE4 rendering team touched on this a little during a Twitch broadcast a couple of months ago.
                  http://www.twitch.tv/unrealengine/b/518420018

                  At the 9:15 mark, they start talking about opaque vs. translucent (and the related topics of deferred vs. forward). Later in that same section, at the 12:04 mark, Martin mentions how the current plan is to move the current deferred solution to be "more hybrid". While few details were given, typically in this context "hybrid" means "send deferred-friendly materials down the deferred path, and do the rest forward". And, in my opinion, hair would typically fall into the "do the rest forward" bucket.

                  At the 32:45 mark, Martin actually talks a bit about how hair lighting would probably be done in the translucency system (and then right after that, Nick talks a bit about the complications with integrating many lighting models into a deferred renderer).

                  All that is to say, your current forward solution sounds pretty sensible to me.

                  Regarding tessellation, the latest presentation mentions tessellation only to discuss how it should be avoided, as it will negatively impact performance. A "pure" vertex shader solution for hair geometry is much faster. In practice, you rarely get curvature issues unless the hair is very close. And if that use case is important in a particular game, it would still be better just to author more vertices per strand rather than use hardware tessellation.
                  Hi Jason, thanks for clearing that up. The one twitch stream video I did not watch appears to answer my questions, I will give it a watch asap. As for the tessellation, I have to say I quickly thumbed through the presentation during a work meeting, so I was under the impression that it was saying to avoid the Geometry Shader, did not realize it was Tessellation as well, so thanks for clarifying that. I will have to give it a more in depth look at some point.

                  I have to say I actually prefer the way TressFX loads in the data, especially for authoring, I was able to whip up a quick script in 3dsmax to export the strands from the Hair and Fur modifier.

                  Originally posted by Crow87 View Post
                  Outstanding!

                  Only thing with the sim that I think could use a little work is the slightly over-damped feel of the hair movement. Its got a slightly underwater feel to me.

                  But I seem to remember the TressFX in Tomb Raider being like this too, so it might be a limitation of the technology.
                  That may also be due to the settings set for local/global shape matching, stiffness and damping. For the hair I left it as default from the TressFX demo, for the furball I deliberately gave it a low gravity like effect, but you can increase the stiffness and such to give it a more realistic result.
                  FluidSurface Plugin: https://github.com/Ehamloptiran/UnrealEngine/releases
                  TextureMovie Plugin: https://github.com/Ehamloptiran/TextureMoviePlugin

                  Comment


                    #54
                    This is actually fantastic. Well done on the great work...it's really improving quickly.

                    Do you plan on releasing this?

                    Comment


                      #55
                      Originally posted by Kenomica View Post
                      This is actually fantastic. Well done on the great work...it's really improving quickly.

                      Do you plan on releasing this?
                      Eventually, I am planning on building some in editor tools first and the ability to use materials with the hair with some special hair specific material functions. Then I will release the source. It won't be in a plugin due to additions to the main rendering pass.
                      FluidSurface Plugin: https://github.com/Ehamloptiran/UnrealEngine/releases
                      TextureMovie Plugin: https://github.com/Ehamloptiran/TextureMoviePlugin

                      Comment


                        #56
                        Hi Ehamloptiran. Congratulations for your job. It´s very great.

                        You will provide tutorials teaching us to make this realistic hair? Thanks

                        Comment


                          #57
                          Originally posted by ren3d View Post
                          Hi Ehamloptiran. Congratulations for your job. It´s very great.

                          You will provide tutorials teaching us to make this realistic hair? Thanks
                          Thanks, I'll be doing one better, when I have completed the Editor components, and implemented some optimizations, I will release the entire source code, and include the tool to extract the hair from the Fur modifier in 3dsmax and a short document on how to produce the hair, not that I am an expert at authoring the hair, far from it.
                          FluidSurface Plugin: https://github.com/Ehamloptiran/UnrealEngine/releases
                          TextureMovie Plugin: https://github.com/Ehamloptiran/TextureMoviePlugin

                          Comment


                            #58
                            Wow!
                            This just looks amaizing!
                            Looking forward to it

                            Comment


                              #59
                              Thanks JasonStewart, Yes Ehamloptiran, use the enw TressFX 2.0 the one JasonStewart provided to you, it willl be the best solution because the consoles use it and it runs like charm on them (Tomb Raider Remastered Edition). It would be wiser to use it.

                              Comment


                                #60
                                Originally posted by DarkInfiktrator View Post
                                Thanks JasonStewart, Yes Ehamloptiran, use the enw TressFX 2.0 the one JasonStewart provided to you, it willl be the best solution because the consoles use it and it runs like charm on them (Tomb Raider Remastered Edition). It would be wiser to use it.
                                Well I need to wait for the new sample to be released, I will update the code when its released.
                                FluidSurface Plugin: https://github.com/Ehamloptiran/UnrealEngine/releases
                                TextureMovie Plugin: https://github.com/Ehamloptiran/TextureMoviePlugin

                                Comment

                                Working...
                                X