gpuopen-effects / tressfx Goto Github PK
View Code? Open in Web Editor NEWDirectX 12 and Vulkan libraries that provide convenient access to realistically rendered and simulated hair and fur
License: MIT License
DirectX 12 and Vulkan libraries that provide convenient access to realistically rendered and simulated hair and fur
License: MIT License
well, i think it's a good idea
Maya vision 2016
while exporting .tfxskin:
#NameError : balabala..\TressFX_Exporter.py line 1036: gobal name 'Point' is not define
while exporting .tfxbone
#indexError : balabala..\TressFX_Exporter.py line 728: list index out of range
how should i do to avoid those error?
my model file:
6662.zip
Clang format is a tool shipped with clang that can reformat file to match a given code style. It's often difficult to strictly follow a code style in a project especially if you work on others projects with different code style ; clang format just check and fixed that automatically. It can even be run as a git script so that no commit "break" style.
I tried to write a config file that defines the code style in tressFx. However it looks like tressFx is using an extra space inside parenthesis in function body (in if/for/...) , but not in function declaration. Unfortunately clang format has a single spaceInParenthesis that is used for every occurrence of parenthesis, whether it's in code or in declaration.
Is it important to have space inside parenthesis? Using clang format would avoid contributor and reviewer to spend time on checking indent, space, alignment of parenthesis, * location and so on.
Is tressfx still in developement ?? Any chance to get tressfx port to vulkan ?
Anyone have a clue? I'm not a programmer but keep getting this error on run time
TressFX/amd_tressfx/build/../lib/VS2015/Win32/Lib_Debug/GPUOpen_TressFX.x86d.lib is not a valid Win32 application.
Tried reinstalling VS but didnt help.
At line https://github.com/GPUOpen-Effects/TressFX/blob/master/amd_tressfx/src/TressFXRenderer.cpp#L251
the Texture1D union selector is used while the resource is a 2D texture. Since the binary representation matches it doesn't really matter but I think it wasn't intended.
There are two ways to color the hair/fur strands in the viewer:
When color comes from a texture, the color picker should be disabled in the viewer UI, because it does not affect the color in this situation, and having it accessible when it won't change anything is confusing.
Vulkan demo works fine with shader compiler (glslc.exe version 1.1.x) from binary release, but when I use compiler from vulkan version 1.2.x it fails to compile shaders.
I'm working on a custom engine integration, recreating the demo scene. It would be great if you could provide the source for ratboy, like you did in tressfx v3 sample models. I need an asset that i know will work rather than making my own during initial integration.
Please and thanks!
Hello, firstly thanks to make opensource software :)
I am a console developer, are there any plan to port gpuopen effects on consoles ?
This would be awesome for consoles and also for AMD because with this gpuopen should become far more interesting than gameworks
Sorry for my bad english.
Hello,
I've implemented initial integration into UE4 and I would appreciate any help dealing deferred shading lighting and TressFX.
TressFX 2.2 render : http://puu.sh/mKo82/21b2cdd9f6.jpg
TressFX 3.0 render : http://puu.sh/mKo9U/11de724e15.jpg
The hair on the 3.0 is glitchy, i had to zoom so it's easier to see.
Built at the same hour, on the same computer.
Hi there,
In the v4.1.0 sample, there are two hair objects, the NumHairVerticesPerStrand is 32 for one and 8 for the other. In other physical pass, the NumHairVerticesPerStrand of these two hair objects is correct.
TressFX/src/TressFX/TressFXConstantBuffers.h
Lines 66 to 70 in ba0bdac
But the last physical pass CollideWithHair, both are 8. For all hair objects, it use the data value of the last hair object!
As we can clearly see from the following figure, both hair objects use the same ConstBuffer (Buffer 895):
The process of delivering the ConstBuffer is described in the TressFXSDFCollision::CollideWithHair:
TressFX/src/TressFX/TressFXSDFCollision.h
Line 95 in ba0bdac
TressFX/src/TressFX/TressFXSDFCollision.cpp
Lines 171 to 198 in ba0bdac
For each model that collides with the hair object, there is a TressFXSDFCollision instance, but only one TressFXSDFCollisionParams structure instance and one ConstantBufferResource in this TressFXSDFCollision instance.
So, when there are multiple hair objects, there is only one ConstBuffer in the TressFXSDFCollision!
Therefore, the same ConstBuffer is updated after each hair object calls the CollideWithHair function. Regardless of which hair object, the same data from the last hair object is used.
Language: CN
[缺陷报告] 头发的碰撞矫正处理中,当有多个头发对象时,ConstBuffer(ConstBuffer_SDF)始终使用了最后一个头发对象的数据
在v4.1.0版本的示例程序中,有两个头发对象,其中一个头发对象的NumHairVerticesPerStrand为32,另一个为8。在其他的物理计算的pass中,这两个头发对象的NumHairVerticesPerStrand是对的。
TressFX/src/TressFX/TressFXConstantBuffers.h
Lines 66 to 70 in ba0bdac
而在最后一个处理碰撞矫正的物理pass中,两个都变成了8。该pass针对所有的头发对象,仅使用了最后一次更新的数据值!
该ConstBuffer的下发逻辑在TressFXSDFCollision中:
TressFX/src/TressFX/TressFXSDFCollision.h
Line 95 in ba0bdac
TressFX/src/TressFX/TressFXSDFCollision.cpp
Lines 171 to 198 in ba0bdac
对于每一个会和头发对象产生碰撞的物体模型,都有一个TressFXSDFCollision实例,但该实例中仅存了一个TressFXSDFCollisionParams结构体实例和一个对应的ConstantBufferResource。
当有多个头发对象时,由于该ConstBuffer只有一个,因此每个头发对象都调用CollideWithHair函数后,都是更新的同一块ConstBuffer,因此不管哪个头发对象,都使用了最后一个头发对象的数据!
I think that AMD need a conccurent to physx.
Bullet is an opensource physics engine, it Just need plugin of game engine to be more widely used.
The release 3.0 should be awesome in performance jump because it will fully use openCL.
So I think it should be awesome for gamers and for AMD to promote bullet in pushing it under the gpuopen umbrella, and optionnaly in accelerating the 3.0 development and plugins
It is very unclear what is the shader flow of TFX 4.0.
It seems that the main shader procedure in the lib source is missing and what I found in the effects dir of the sample is very unclear.
Could you please clarify how to write a standalone shader for each pass?
I got this warning when I exported my hair in maya 2019 by using TressFX pulgin.
What happened?
Hi there,
In the v4.1.0, there is a serious bug in the wind calculation. In fact, the wind does not work currently. The bug and its fix method are as follows.
1: In the sample, where the wind magnitude is not set at all, m_windMagnitude is only be set to 0.0f during initialization, however m_clampPositionDelta is not used at all, but it can be configured in the ImGUI.
TressFX/src/TressFX/TressFXSettings.h
Lines 82 to 86 in ba0bdac
TressFX/src/TressFX/TressFXSettings.h
Line 49 in ba0bdac
Line 596 in ba0bdac
So we can modify the above code to these.
2: When calculating the displacement caused by wind, the effect is a vector with magnitude. The shader directly calculates the cross product of the unnormalized v and w, where v is the hair strand vector (with magnitude and direction), and w is wind vector (with magnitude and direction).
TressFX/src/Shaders/TressFXSimulation.hlsl
Lines 904 to 911 in ba0bdac
The vector cross product result is the displacement direction, but the value of each component in the vector has no practical significance. So we need to split into two parts to calculate separately in here, as shown below.
After modifying the code as shown above, the wind calculation will be correct and affect the hair strands.
3: The wind calculation and length constraints use the same pass, the length constraints will be iteratively calculated(dispatch multiple times), but the wind calculation does not need iterate, so we need to separate this pass to the wind calculation pass and the length constraints pass.
The TressFX repo contains a bunch of prebuilt libraries, headers for them and a LICENSE.txt in amd_tressfx_sample/prebuilt, but there is no link or information about where to obtain the source code.
A web search didn't turn up anything either.
Considering that the license file says the code is under the MIT license, I'd expect the source code to be available somewhere, but no link is provided.
Would it be possible to include the Sushi source code, or add links to where to obtain it?
TressFX provides sample implementations of TressFX 4.1 in DX12 and Vulkan. I am aiming to implement either 4.0 or 4.1 in an existing DX11 engine, however the TressFX 4.0 implementation, while technically DX11, is opaque due to the fact that it is implemented to interface with a closed-source engine for some reason (Sushi). While the documentation for 4.1 does not explicitly mention DX11, it also does not indicate that support for DX11 has been completely dropped. Would implementing TressFX 4.1 in DX11 be doable by porting DX12EngineInterfaceImpl.cpp to DX11, or is there a hard incompatibility between DX11 and TressFX 4.1?
Additionally, are there any existing code snippets or open-source projects that might help with getting started implementing TressFX 4.0 with raw DX11, rather than one that relies heavily on the closed-source Sushi DLLs?
Thanks!
TressFX currently uses D3D11_COMPARISON_LESS_EQUAL for z-order comparison. [Reference]
The z-ordering should be optionally D3D11_COMPARISON_GREATER_EQUAL; either via preprocessor definition or TressFX_Desc option. This also requires changes to make sure the ordering of transparent hair strands works correctly.
rationale:
Many engines used in popular games (including GTA V, Witcher 3, Just Cause 2) use inverted (and sometimes logarithmic) depth buffers to increase depth precision.
See
Hi if there is any chance for Blender Exporter, cause right now there is only Maya exporter, i think it would be nice addition to open-source technology :)
Shown in Crimson Relive presentation as avaiable now if rememberl correctly..
There are some requirements for the assets such as:
It would be nice if these requirements could be resolved automatically by resampling the hairs to generate new vertices if necessary, and adding (invisible or duplicate) guide hairs, instead of asserting or crashing.
272 else if ( token.find(L"Ex1") != std::string::npos )
273 {
274 Ex2 = (float)_wtof(sTokens[1].c_str());
275 }
Line 272 : should be Ex2 instead of Ex1 ?
402 g_RenderHUD.m_GUI.AddSlider( IDC_OPACITY, iX, iY += AMD::HUD::iElementDelta, AMD::HUD::iElementWidth, AMD::HUD::iElementHeight,
403 0, 100, (int)(100 * (g_hairAlpha.min - g_hairAlpha.min) / (g_hairAlpha.max - g_hairAlpha.min)) );
404
Line 403: should be (int)(100 * (g_hairAlpha.max - g_hairAlpha.min) / (g_hairAlpha.max - g_hairAlpha.min) ?
It would be nice to have documentation for the API and maybe some samples. Right now all the functions take a TressFX_Desc which contains public state about the Hair asset, but it is unknown which fields need to be set before each function call, and which fields are modified.
Additionally, there seem to be unused members in the TressFX_Desc, such as mWorld
, which make it quite frustrating to work with TressFX. The name mWorld
suggests it's supposed to be the world transform for the model, but in fact it does nothing, it's not used anywhere in the code, and modelTransformForHead
has to be used instead.
Is there a build of unreal or unity running tressfx 4.0 somewhere that is publically available for me to test out tressfx using my own art assets and groom?
Hi guys,
Going over the code we assume that intention was to compute: #fibers = distance / (strand radius + spacing between strands) but due to a typo used multiplication instead of addition.
Was that indeed a typo or intentional?
TressFX/src/Shaders/TressFXLighting.hlsl
Line 196 in ba0bdac
Hello!
Could you please clarify why you chose to use a single TressFX_OpaqueDesc for the lifetime of the program?
I've ported TressFX 2 a year ago to OpenGL here :
https://github.com/vlj/YAGF/tree/master/examples/TressFX
It's using a simple framework I wrote while learning DX12.
The TressFX 2 SDK was included with an AMD helper library for D3D11 which loaded Ruby's head mesh, and enabled an UI controlling some parameters. Is there a port of this library on top of OpenGL or Vulkan ? It would ease integrating my GL port to the official SDK if maintainers agree.
I'm a beginner about maya. I have installed the python script of the maya exporter. But when I export the hair which is generated by XGen, it give the warning as following.
Warning: No nurbs curves were selected!
But I can't see any curves in outliner, I only has a description.
Does anyone give some suggestions about this problem?
Hi,
can't see slides but seems at GDC there was talk:
"Simulating and Rendering Physically-Realistic Curly Hair"
some ETA was shared?
interested to play with it..
The assets have low quality and have several problems, It would be nice to have better assets for this demo.
The animation of the default asset, the bear, is rather jerky. Additionally, the texture is low resolution, doesn't fit to the hair and also looks like there are some major UV-Mapping issues on his right side: .
The shading of the hair also looked better (more highlights, better specular, less diffuse) in TressFx 2.2
Comparison:
Version 2.2:
Version 3.0.1
edit: This is most likely caused by the fact that by default only SUPERSIMPLESHADING is activated. Not sure why this is the default.
When increasing the wind magnitude, it is appearent that the hair-ends of ponytail are fixed, and the color of her scalp is different then the hair itself.
All in all I think it's functional, but there is room for improvement.
Though this has been improved since the initial release on GitHub, the lighting on the bear still seems a little wonky. Not sure if it is in the specular or the shadows (or both), but the lighting flashes as the bear animates. The issue goes away if you disable simulation in the UI.
We are looking into it.
TressFX\amd_tressfx\src\TressFXSimulation.cpp
L256, there should be 'which' not 'wich'
The GPUOpen Website talks about a TressFX 5.0 release and there is a GDC Video talking about it, but there isn't a release or mention of it anywhere in this Repo, what gives?
Hello,
Would it be possible to get the source for the asset used in the sample?
I am having trouble with integrating the skinning system and not having the option to either import my assets to the sample or using the sample asset in unreal makes it impossible to find the source of the issue.
AMD_Types.h contains a series of typedefs that map the C integer types to fixed-size ones, without taking into account different compilers, architectures and OSes. The C or C++ standards mandate no specific size for these types.
Instead, the C99 standard types from stdint.h should be used. These are also available via the std:: namespace by including cstdint in C++ code.
This header has been available in VC++ since at least VS2012.
No doc folder in directory amd/tressfx/ like said in the description. The documentation is supposed to be here.
Does TressFX support linux, if so there are no instructions.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.