steve3d Posted May 18, 2012 Share Posted May 18, 2012 https://developer.unigine.com/forum/topic/1335-how-to-handle-this-kind-of-billboard-atlas I've created a topic to ask how to use speedtree's billboard atlas, finally, I have to modify the source to to this, but after I successfully modified the source to accept the billboard atlas, I found the LOD setting of ObjectBillboards works like normal ObjectMesh, that's unacceptable, It should work like ObjectGrass, LOD fading some billboards at some distance. I'm using this because some trees in our scene have fixed position, not random generated with ObjectClutter, so if I use ObjectGrass, uv are one big problem, but another bigger problem is that I can not control position of each grass blade, so the billboard will be different position with it's tree. Hope this can be fixed in next version of SDK. Link to comment
manguste Posted May 24, 2012 Share Posted May 24, 2012 A feature request is submitted to developers, they'll see if it can be implemented. Will keep you updated regarding this issue. Link to comment
steve3d Posted June 1, 2012 Author Share Posted June 1, 2012 any result from developers? I really need this, ... crying for this :D Link to comment
manguste Posted June 19, 2012 Share Posted June 19, 2012 Sorry, not for the next month for sure :( After that, we'll really try to give your issue high priority in a feature list. Link to comment
manguste Posted July 10, 2012 Share Posted July 10, 2012 Our developers gave it a go, but it did not go well. The trick is grass is rendered in cells (step parameter is just for that). In this case fading is not a problem. Billboards are rendered in one rendering pass, all at once, that's why they are so performance-friendly. But it also means fading is a problem. Nevertheless, our developers promised to see what they can do. Will keep you posted. There is good and transparent solution to your case: try to create one ObjectBillboards per tree. Then you can flexibly set up tree leaves fading with a distance. Link to comment
steve3d Posted July 11, 2012 Author Share Posted July 11, 2012 how about using shader to control this, if the billboards's distance beyond the range, just set the output position of vertext to world center (0, 0, 0), then this will partly solve this problem. Doing this on GPU side might be a much more simpler way. And create one ObjectBillboards per tree will lose the advantage of ObjectBillboards, in one of my big scene, there are totally 140000 trees. Link to comment
steve3d Posted July 18, 2012 Author Share Posted July 18, 2012 well, I've just modified the material added a near_cutoff shader parameter, and modified the shader's code to add: float dist = length(vertex.xyz - s_camera_position); if(abs(dist) < near_cutoff) vertex.xyz = float3(0.0f, 0.0f, 0.0f); else { vertex.xyz += (tangent * angle_cos - binormal * angle_sin) * width; vertex.xyz += (tangent * angle_sin + binormal * angle_cos) * height; } so far it works extremely fine. Link to comment
Recommended Posts