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.
You are officially my favorite person of the day. Thanks so much, it works perfectly now Enjoy your weekend!
I noticed when playing with image effects that the adaptive tonemapping has issues with the afs tree creator shader. When walking up to a tree the screen will go completely black and not recover as if it was exposed to crazy high brightness. Not sure if it is something wrong with my textures or the afs shaders but it does not do this with the normal tree creator shaders.
i can not confirm this.
some more info please.. ;-)
Not sure what details to give. I can throw a quick webplayer or video to show the problem. The only other time I have experienced this was when there was something wrong with one of the trees normal textures. Had crazy strong specular showing incorrectly and it would make the screen go completely black. The normals seem to be fine though. No specular problems. Will get an example together.
that would be great!
Forgot to check. It only does this in DX11 mode. Will get the scene here in a minute if my internet allows.
Here is a webplayer: Tone Mapping bug (28mb)
As soon as you move up to the tree the screen will most likely black out. You can press "F" to disable tone mapping and go back to normal. Press again to see the problem again. This happens the worst with the Kapok(large) tree. The ivy root seems to set the problem off.
i had a look at the webplayer: great tree!
but i did not see anything weird apart from the shadows fading in a little bit late... but i am on os x -> open gl.
anyway: as tone mapping simply takes the final rendered image i can not imagine how a shader would break it...
I had often this issue in DX11 with Tonemapping (unrelated to AFS). This happens to me when I use 'Adaptive Reinhard' with square texure size > 128
Thanks. I do not think it is directly AFS causing this but my textures. Just with AFS different specular my textures do this.
When this happened I was using 256. Strange issue.
I personally dislike the built in tone mapping techniques. There are some good tone mapping setups out there but no adaptive ones.
Will play with the textures and update if I find the problem.
This fixed the grass issue for us, thank you!
I have this exact same problem. How can I fix this? I don;t fully understand what you did to get this working.
Grass totally disappears at some angles.. really annoying.
unfortunately you will ahve to edit the shader as described in the mentioned post – or wait until unity has approved the update which i have uploaded 5 days ago.
i am sorry about the inconvenience but your problem should be fixed very soon.
I've had these same issues. The adaptive tonemaper is just broken in dx11 mode. I plan to write my own eventually but its in a long line of a billion other things at the moment.
I just want to confirm that the touch bending is working well under Unity 5?
@larsbertram1, sweet! Thanks for the quick reply! A definite buy from me then!
Curious about the performance of the touch bending feature. I know this depends on many things, but generally, how many objects with touch bending is it possible to have before running into serious performance problem?
Is a few hundreds to 1 thousand out of the questions, or absolutely possible?
probably not – at least not out of the box.
1000 game objects will kill performance, no matter if those use touch bending or not.
you will have to use a pooling system or streaming solution i guess.
Yeah, I juste realized my thousand number, actually doesn't make much sens.
I suppose I would need around 200 to 400 max.
still: pooling or streaming would be recommended i guess: 400 game objects: that is simply a lot.
I've recently bought your afs on the asset store and it is really great!
Now I have only one problem. I want to convert a tree creator tree with the afs foliage tool into a flattened tree.
After converting it the tree doesn't appear. Do you know why this happens?
sorry, but i would need some more information...
I chose one tree creater tree and created a prefab of it. Then I applied your afs foliage tool on it, saved the mesh once and coverted it to a flattened tree, as you can see in the picture below. But after some calculation the tree disappears and I don't know why. Actually I followed all your instructions which are given in the documentation.
Hope this helps more to solve my problem...
5how does the generated mesh look like?
you can preview it in the inspector or switch to shaded wireframe.
the first mesh that will be created when I press save mesh before I can convert the tree looks like this and the second one which will be created after I have pressed the convert button doesn't show the mesh.
Is it possible to get touch bending working with SpeedTree? Specifically the ground cover assets, eg: ferns. I'd like to use the SpeedTree shaders. Is it possible to integrate this? There's some details on the SpeedTree forums as to how it might be done, but I don't do much with shaders.
i am not working on any speedtree support right now, sorry.
but of course you can always convert your speedtree models to afs: you would have to live with less enhanced wind animations but would get much better lighting... which i think counts more especially if it comes to ground covering plants like fern on which touch bending makes most sense.
I have the same issue! After pressing "convert tree" (both: simple tree and foliageshader) the tree disappears?!
Using Unity 5.0.1f1 and AFS 4.0
Just wanted to note that using "afs align to camera" feature and set the "angle limit" to 90 helps a lot to reduce the issues with the oculus and billboard alignment! Thereby billboard alignment looks better and is less visible with the Oculus Rift!
For me Unity crashes and the tree disappears. It is easy to get the tree though. Just drag out the modified model that you saved and set the number of materials and apply them. Works for me.
Thanks Baldinoboy! Unfortunatly this does not work for me or I am doing something wrong?! Materials are already applied in my case, if I drag in the first saved mesh the tree is visible in wireframe at least...
i have to admit, that the script in the current package does not work (as i commented the needed lines – for what reason soever...). so either send me a pm with invoice number and email or wait until the next update.
sorry for the inconvenience.
Does it work with SpeedTree?
it works along with speedtree.
speedtree has its own format, its own shaders.
but you could convert speedtree models to work with afs in case you would like to have touch bending.
the first patch now is officially available—solving the grass issue on dx11 and any problems related to the depth normal shader like built in ssao.
Hi - I bought AFS a while back, and used it with no troubles. Now I am working a project and wish to use it again, but I can't get it to import. I get the following error:
Error while importing package: Package has unknown format
I'm using Unity Pro 4.6.4f1 on Windows 7. I'm not having any problems importing any other assets. I tried re-downloading multiple times, importing from the asset store, importing manually.. nothing has worked yet! Has anyone seen this, or does anyone know what issue might be?
The most recent version of AFS is made for Unity 5. AFS 4 is not compattible with Unity 4. If you are using Unity 4 you might want to PRIVATELY contact lars with your invoice number and ask him about sending you the AFS 3 package.
Ah, ok that explains it! I missed that somehow. Thank you very much for the info, I'll send him a private message.
This video has been up for quite a while and I know you have been recently focused on your terrain shader. but do some more details or progress on the upcoming grass touch bending feature? I have been watching the thread but the video went up on your Youtube channel without any appearance on the forums.
Grass Touch Bending:
no further details on this at the moment… sorry.
Where can I find video tutorials about how to apply these shaders to trees built inside Unity?
you will have to read the docs...
i just bought this and tring to find how to add trees too. tried to follow docs but cant seem to get it right. i got grass working but when i try to chance shaders for trees im not able to.
Yes, I think this should help:
[see documentation '04 Tree and Billboard Shaders']
- Create 2 new materials and using the "AfsTreeCreatorBarkOptimized" / "AfsTreeCreatorBarkDeferredOptimized" respectively the "AfsTreeCreatorLeavesOptimized" shader.
- Find and assign the textures of your tree which are generated by the tree creator.
- Find the prefab of your tree, click on the root node and replace "Optimized Bark Material" and "Optimized Leaves Material" with the new materials.
I'm using v4 in Unity 5.0.1. We've been having trouble with aliasing little white pixels in the tree branches when they are about 30 meters from the camera, (not the bill-boarded trees). I wonder if you have any suggestions for things to try?
Also, in experimenting with different textures to try to eliminate these problems I discovered that your documentation is out of date. I reverse-engineered the texture generation script by writing labels like “shadow_alpha” into each channel of each of my source textures. I found some baffling things:
A. In normal_specular.png, used in the optimized materials, the Red channel is a solid dark grey color. This does effect specularity, but it doesn't seem to come from any of the source textures used in the set-up materials. It also doesn't match the specular color defined in the setup material (which defaults to 50% grey), it's darker than that. Where does that color come from? Is it used as the specular value?
B. In normal_specular.png, the blue channel gets the branch pixels from the alpha channel of the shadow texture of the setup material. Why? Is it used for anything? It does seem to be faintly visible in the branches.
C. shadow.png appears to have it's RGB channels all taken from the alpha channel of the diffuse textures used in the setup materials. This is very baffling since there is a shadow texture input in the setup materials, but it only appears to effect the blue channel of the normal_specular.png, and doesn't contribute at all to the shadow.png.
D. In translucency_gloss.png the Red and Green channels are black. Are they used for anything? I'm guessing no.
Any help or clarification would be greatly appreciated. I'm at a complete loss about how to eliminate these little white pixels.
Take Receive Shadows off and it should work.
yea i got it working now but if i try to play with trees options it suddently changes shaders back to default
any idea how to fix this?
btw does flattened tree work in latest version? because if i try it my tree just disappears
not a really satisfying solution i think.
which rendering path do you use? and do you have a screen shoot?
i am not responsible for the texture combining/processing at it is all done by the built in tree creator.
nevertheless here you will find some answers.
it is not used.
this texture is not used by the afs tree creator shaders
only blue and alpha are used.
Thanks for the tip, unfortunately receive shadows was already off. I tried it both ways.