A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by larsbertram1, Apr 24, 2012.
unfortunately: no. but a 4k atlas should offer plenty of space.
Does AFS work with Metal? The asset store description does not say...
i think so.
Hi, I tried to use the shader with skinned mesh. We have some monsters which are tree or have many leaves. Rather than animating all of those branches or leaves, I just want to test if we can also use this shader or not. And it didn't work nicely. My knowledge of shader is still very limited. Can you explain to me why does the shader not work with skinned mesh? Do they calculate vertex color differently between mesh filter and skinned mesh? Is it possible to modify shader so that it also works with skinned mesh? If it's yes then where should I look into?
what actually happened?
skinned mesh renderes should not have any impact on the vertex colors.
It turns into something like this.
hmm, i would expect some glitches, but not such heavy distortion.
that is with a gentle breeze or heavy wind?
I tested it in Foliage Shader Overview Demo scene. It starts to distort when main value of wind zone is more than 0.
Hello, I have a question regarding the compatibility and limitations of the Advanced Foliage Shader v5 asset.
Do the foliage shaders have to be used with Unity's Tree Creator tool, or can they be applied to a non tree creator mesh and still benefit from Wind & touch blending?
Are the wind animations based off unity's wind solution or a custom one - (wind masks? to specify exactly which parts of the mesh should be effected).
the foliage shader can be used on custom meshes – although these have to have baked bending information.
the package comes with a tool tht allows you to bake simple bending information right within unity.
for more complex animations you would also have to paint vertex colors in your 3d app.
model and texture guide:
Thanks for the reply.
So does this "baked bending information" cover both touch bending and wind animation. And can this tool be used on "tree's / grass" or only foliage?
And is the "wind animation" done using unity's wind component or a different method?
afs tree shaders only cover tree creator shaders.
and grass is a completely different story as well.
wind is derived from unity's built in wind zones.
Why looks like this? (After upgrading to Unity 2018.2.9)
i guess you are using deferred but haven't assigned the afs deferred lighting and reflection shader.
I didn't change anything, just import the asset and then I take this pic.
Edit: In a new project there is no same issue! I don't know what's wrong with my project! It's a deferred and linear color space project.
you have to assign the shaders manually in any new project. please follow the docs:
Before starting please make sure that your project is set to use the linear color space in Edit -> Project Settings -> Player.
In case your camera uses deferred rendering you also have to assign the Afs deferred lighting shaders in Edit -> Project Settings -> Graphics:
Under the Built-in shader settings change Deferred to custom, then assign the Afs_Internal-DeferredShading shader.
Also change Deferred Reflections to Custom and assign the Afs_Internal-DeferredReflections shader.
Thanks for help, can we use those samples from demo scene in our game?
Any idea on how to convert a translucency map with subsurface scattering colors (RGB, like the ones from megascans) to a grey one used in your shader?
not really... simply convert to grayscale and adjust the contrast?
hmm ok i think i will try to make a new texture by comparing the rgb colors of the albedo and the translucency map, wherever the difference in color is bigger it will have the greatest transmissivity which would be more white. If this doesn't work ill try your solution, thanks!
Hi. When Unity 2018.3 is released, do you plan to support HDRP?
i have not really looked in this, but i guess sooner or later afs will
Does AFS support HDRP ?!
not at the moment as it is still in beta.
When you said beta do you mean 2018.3 is still in beta or HDRP is still in preview?
Hi, this is regards to creating Textures, I just find it a bit confusing.
I don't know how to generate Transculency Map, from what software do I generate that?
Normap Map: Red (A) / Green (G)
Transculency: Grey (R)
Smoothness: Grey (B)
And you have to combine these textures. How long does it take you to do this?
i paint it in photoshop...
roughly 30 seconds.
30 Seconds? Can you please put a video so I can do it that way. It is the thought process. I will be happy, because right now I have so many plants but I do not know. Please, the asset is incomplete without that video.
Would you mind creating a shader which gives access to all channels, rather than combining textures? I just want to drop and run. I know there is performance loss but I will be using only few.
no video, sorry.
but you just take the regular normal map. then:
- select red channel and copy it to clipboard.
- add alpha channel, paste from clipboard.
- open your translucency texture (grayscale), select all and copy to clipboard.
- switch back to the normal, select red color channel, paste.
- do the same with the smoothness and the blue color channel.
Thanks and sorry for late reply.
Hey Lars, this is a very belated reply but I've come across the time where i'm needing to set these grass shaders up again and I've gotten to the same place where I got stuck at before and to me everything seems normal but my grass still goes black in play mode, everything else about the shader works i just cant get my head around it, oh and everything is combining
as well. I would appreciate any help
hmm, if everything is combined normals should be fine.
in case you use deferred you could enter play mode and then use the frame debugger to have a look at the grass normals.
btw.: which version of unity do you use?
Thanks for the reply Lars, Yeah everything looks to be combined and i'm using unity version 2018.2.18f1
also i'm not to familiar with the frame debugger but I did manage to find the combined mesh in there maybe you can find something wrong in here?
Much appreciated lars.
hmm, i tested grass in unity 2018.2.15 and everything looks just fine.
so you must do something wrong... not sure what tho.
combined grass in playmode:
and here you can see the grass normals in playmode: the ypretty much fit the underlaying ground normals as they show up the same color:
yeah it's odd, the normals seem to be good aswell I think, here's what they look like
if that is in play mode then they are fine, yes.
so the only difference left between edit mode and play mode are the vertex colors:
while in edit mode the shader sets the vertex colors to white it expects the vertex colors to be set by script in play mode.
so check the attached "combine children afs" script and look for the Healthy and Dry Color: are these set to black?
It says it supports vegetation studio pro. And has indirect instancing support in the shader. Does it still renders in deferred rendering path with vegetation studio pro?
yes. why should it stop doing so?
Hey lars, that was in play mode and yes these are set to white
I am using the grass model processor script to set up vertex color alpha maybe I am doing this wrong I have named my model "GrassClump_AfsGM03Testnew" should it just do it automatically on import? also when I don't combine the colors look fine but because i'm not combining the normals are broken.
hmm, that is very strange: normals seem to be correct and vertex colors are set to white.
no i have no other idea what might go wrong when entering playmode – as normals and vertex colors are the only difference.
that looks fine.
@Game_DevKH described a problem he had in the reviews on the asset store:
it looks as if some normal maps are broken and some models lack proper vertex colors.
latter seems especially strange because other instances of the "same"?! mesh look totally fine.
but without further information about your normal maps and the actual setup of the models i can't really tell you what is going on.
who knows... but adding grasses to paint trees does not seem to be a good idea.
Why are my grasses and foliages black when adding to the Paint Details and invisible when adding to Paint Trees?
actually i have not tested afs in 2018.3.
so does the included demo scene look correct?
if so shaders should be fine and you must have done something wrong.
unfortunately the video does not show e.g. the healthy and dry colors you have chosen nor the rendering mode you have selected like gras or vertexLit.
Black object solved! Well... now how can I get Touch Bending work with terrain?
touch bending is not supported on the terrain.
What do I do? Who's going to place grass one by one? Is there some other way or any asset recommended?