TressFX rewrite

Howdy,

I just startedΒ rewriting the TressFX for unity codebase, i hope i can improve the whole thing so it finally get’s as usable as AMD’s implementation.

I think i did things in a wrong way and thus the overall rendering / simulation quality was not as good as it should be.

For the rewrite i’ll take the new TressFX v2.2 as base.
The main advantages of the new TressFX version is it’s performance. AMD improved the simulation performance by using guidance hair so they only simulate some “guide” hairs and surrounding hairs are following them.

However, if you want to follow my progress checkout the dev branch of the github repository πŸ™‚

Gamescom 2014

Hey there,

Today i’ve been on the Gamescom in Cologne πŸ™‚
After almost 4 hours of driving and getting stuck in traffic for several times me and a friend arrived there, if you live in germany and want to go there i really suggest to get a train ticket ^^.
Our first impression was just WOW (we’ve never been on the gamescom before). There were just so much people and so big halls. Just epic πŸ˜€

It was really fun and interesting to see all those games and events.
But i would’ve been happy to see some technic demonstrations for next-gen graphics from AMD or Nvidia.

Anyway, here are some photos:
20140815_134856

The FarCry 4 booth. I am really waiting for this game πŸ™‚

20140815_144402

One of the AMD booths, they made a great show and gave away free t-shirts.

20140815_150654 20140815_150701

Nvidia’s booth, i’ve watched a “Beat the Pro” match there, they were playing Overgrowth.
The Professional Gamer “Nartuo” against “Matthias”, a gamer from the crowd selected by the moderator.
It was very interesting to watch, even if i haven’t have known Overgrowth and how the game works πŸ˜›

20140815_153339

The last one, the Borderlands booth. I also wait for this game and wanted to play it but there were so much people waiting for it and i got a limited timeframe (I have only been there today). I’ll play it on the Relase day πŸ˜›

It was nice to walk around and see all those games and shows, hopefully i’ll be able to get a ticket for the business area for next year.
Also Unity Technologies have been on the gamescom but only in the business area, it would have been very nice to talk to them and see the preview of Unity 5.
Hopefully i’ll be able to get a business area ticket next year πŸ˜›

Overall it was worth the long way and pre-ordering the tickets. I’ll be there next year again for sure πŸ˜€

Anyway, I’m back for work now. TressFX is waiting πŸ™‚

TressFX Final Rendering

Hey there,

I just decided to “finalize” the tressfx rendering implementation. So from now on i won’t add new functions to the shader , i will fix issues, add performance fixes and so on, but the main feature set is implemented now.
I also thought about Pointlight and Deferred Rendering support, but for now it’s low priority.

The currently supported features:

  • Kajiya-Kay lighting model
  • Shadow Recieving / Collecting
  • 1 Directional Light and Ambient light

I properly configured the hair material and took some screenshots:

TressFX Rendering TressFX Rendering TressFX Rendering

The above screenshots were made with Antialiasing 8x, i highly recommend using AA.

So, the next things i’ll work on will be some TressFX Tools, extending the custom rendering system support for TressFX, CubicWorld (my almost forgotten voxel engine project :P), and maybe an exporting tool for blender or some modeling software to export hair data.

I’ll also work on the simulation, maybe runtime dynamic collision or wetness simulation. Things like that πŸ˜›

So, that’s it for now.

 

 

TressFX Model Import

Hey there,

Today i have been working on importing models to Unity TressFX.
Lee Perry-Smith from Infinite-RealitiesΒ sent me an .ase file which contained the hair splines.
Thanks to him.

I wrote a tool which converted them into the TFX file format for use in tressfx.
After converting them i added them to the unity project, configured some basic simulation values and tried it out.

Here’s the result:

irltd_model irltd_model2 irltd_model3

 

Simulation is fully working, so there’s finally a way to import hair styles into my tressfx implementation πŸ™‚

I also fixed the rendering bounds bug which was causing the hair was only rendered when the camera was looking towards the coordinate origin.

Now there’s also an abstract class for implementing own rendering techniques, so anyone can implement own hair shading models.
More information about that can be found in the Readme file in the Github repository.

That’s it for today πŸ˜›

 

TressFX Update

Hey there,

The last week i spent much time in improving the TressFX portation.
I added Kajiya-Kay lighting, patched some Simulation bugs and added a TressFX Hair ScriptableObject asset type.

Here are some images of the new lighting model:

Also the configuration of the hair styles is much easier now thanks to the ScriptableObject Asset types.
Instead of configuring confusing arrays on the TressFXRender and TressFXSimulation now everything has moved to the ScriptableObject:

scriptable_objects

 

For creating new hair now only these asset types have to be created and configured. After that just place them in the TressFXLoader and the configuration is done πŸ™‚
tressfx_hairloader_inspector

The TressFXRender and TressFXSimulation classes now only shows global settings in their inspector.

So, that was almost all news from TressFX. I am mainly working on the rendering at the moment.
I’m also working on a tool for generating specular maps, noise textures and stuff like that as a small helper tool for creating tressfx hairs.
It’ll also support open other hair model formats and export them as .tfx files for unity.

So, thats it for now.
Have a nice day πŸ™‚

TressFX new rendering implementation

Hey there,

I just started writing a new TressFX Rendering implementation yesterday.
Instead of using the DrawProcedural() function i am now using multiple meshes.

The performance is slower than DrawProcedural but i cannot find any way to properly integrate DrawProcedural() into unity’s rendering pipeline (so no lighting, shadows, etc.).

So, i build my meshes with the vertex triangle index as x-coordinate.
In the shader i am getting the index from a computebuffer and then i get the vertex from the vertices position buffer.

This way i can integrate the rendering into the unity rendering pipeline and get shadows and lighting working.

After about 10 hours of work i got a shader which supports shadow casting, collecting and directional lighting (Specular BlinnPhong lighting model).
No more words, here are screenshots:

  • New TressFX rendering shadow collector pass.

There are some rendering bugs, it seems like my mesh bounds calculation doesn’t work well.
Sometimes shadows are not collected or casted, the meshes get culled so nothing get rendered or the lighting does not work properly or generated artifacts.

I also updated the Simulation implementation, now Wind simulation is fully working πŸ™‚
The next step will be implementing a proper lighting model and multiple light support.

The new rendering implementation is available in the dev branch in the TressFX Github repo:Β https://github.com/kennux/TressFXUnity/tree/dev

Have a nice day πŸ˜€