This image shows what is happening in here, the alpha works well against other objects but not against the sky. I am wondering if the leafs can project alpha mapped shadows...of course yes but how? View attachment 779 View attachment 780
Try setting Source/Destination Blending to Src Alpha/Inv Src Alpha and then check 'Sorted' (and you 'may' need to uncheck Chroma transparency in the gTex). As far as the shadows go: in the Instance rollout in the GMT Exporter plugin, select 'Texture' When you make your object a shadow caster. Of course, the problem you'll have is that the normals will be moving to face the 'camera' and the sun needs to be able to 'see' the face of the polygons in order to cast the shadows. So, when the camera is between the sun and the leaves, you will see shadows cast on the ground. But when the leaves are between the camera and the sun, I don't think it will cast shadows.
Done and works (I used the Src Alpha/Inv Src Alpha method) Thanks a lot! The shadow on the ground does not have the alpha working yet. I selected the "texture" in shadow caster (now I remember it is in the new `rF2_Track_Technology_v2` pdf) but nothing. View attachment 782 I think I got your point and I agree ... If I could make another object for the leaves to cast shadows, that is invisible for the camera but facing the sun or static... Now I am lost...
I haven't checked it yet, but as maniak and Alex pointed out - you will most likely need chroma instead of blending, for them to work correctly. The difference between alpha blending and alpha test (a.k.a. chroma) is that blending always draws full polygon, but blends it with background, while alpha test literally renders the given shape, by skipping pixels. Chroma transparency doesn't require sorting because it works perfectly well with Z buffer while blending doesn't. Billboards always rotate towards eye, and when rendering to shadowmap, the sun is the eye. So billboards used to cast shadows will be rotated towards sun and will cast shadows. Take a closer look at people standing near track in Monaco - no matter where are you looking from - they will always cast the same shadow, as if they were facing the sun. This produces a nasty self-shadow bug on people, because half of the billboard will always be in it's own shadow. This is only one of many issues I've found with billboards. Current ISI implementation suffers with both shadows and lighting. As soon as unlocked CoreShaders.mas is available, I'll fix those things If not, I'll send my feedback to ISI, so they can fix it themselves (although these problems with bllboards would take a lot of explaining but very little programming to fix, so I would prefer just to get my hands on shaders).
@K Szczech You are right, the shadows faces the sun and yes now I used what maniac and alex sugested (chroma) and worked fine too I only still have squares in the ground shadows... View attachment 796
Ok, the texture shadows works now. My bad I am exporting the scn file to an exterior scn file for it not to mess with the original one, so I had forgotten to set the shadows to "textured" instead of "solid" in the scn Thanks to all of you!
View attachment 927 Ok can someone answer my question please. I am fixing my trees as well and I might replace some but why do these trees look like ass only 100 yards away? I thought I had things check right in the export part. I am selecting multiple trees as well when exporting so I cannot mess with the LOD area. Or can I? If I have to export 150 instances for trees well that's plain dumb..
Just a wild guess, but have you created mipmaps for your textures? You can also play around with each (tree) material texture stage mipmap bias. Try some negative values up to -2.
This is a convert from RF1 so I believe they have mipmaps but I am not seeing anything when I open it in photoshop, doesn't give me an option to view mipmaps. If I uncheck chroma crap the trees are beutiful and full again but if I leave them at scn alpha/inv scn alpha I get some wierd clippings in the trees themselves and I think that was talked about above because of a bad shader for rf2 or something or shaders that needed to be fixed. As of now I think chroma looks like crap on trees because they seem so hardly even there (way to many pixals invisible).
There are two ways to make objects transparent in games: - alpha blending - alpha test On the left you see alpha blending, on the right you see alpha test. Now the differences: Alpha Blending: - smoothly blends proportionally to alpha channel of texture - not z-buffer friendly (you need to enable sorting, or you may see further objects rendered on top of nearby objects) - not shdowmap friendly (it cannot cast proper shadows) - FSAA friendly - slightly worse performance (need to perform blending) - mipmap friendly Alpha Test: - either render pixels or not, providing sharply cut edges - z-buffer friendly - no problems at all, no sorting needed - shadowmap friendly - no problems at all - not FSAA friendly - slightly better performance (either drawing pixel or not - no blending performed) - not mimpap friendly (needs good mipmaps) To use blending, you just need to set Source and Dest Blend to something else than One / Zero. In most cases you will want Src Alpha / Inv Src Alpha. To use alpha test... well, that one is a bit weird actually I believe alpha test enables itself when you use chroma color on the primary texture (any texture?). You should always choose carefully. For glass it's obvious you need blending and not alpha test, but for vegetation and fences it may be much less troublesome to use alpha test instead. As for which one looks better on trees - personally, I haven't seen a single tree in my life that would have blurry leafs On the other hand - as you move away, leafs and gaps all mix up due to limited screen resolution. In this case blending combined with mipmapping may work like antialiasing.
Here when you say glass you mean grass, glass? Well I assume you mean it right and it is glass, so when doing 3d grass should we use alpha test, right?
No, he meant glass alright. A material that is neither completely opaque nor completely transparent (even if just in certain places). You need blending to get that 50% transparency going.
Indeed. With glass being semi-transparent there is no other option but to use alpha blending. EDIT: I'm slow ...
I found this interesting article about realtime trees and it's shadows. Something like this could be implemented in rF and we would have the most good looking trees ever... http://www.kevinboulanger.net/treeshadows.html