tournamentdan Posted December 6, 2015 Share Posted December 6, 2015 1. What are the polygon or vertices limit for a single instance? 2. Are there only two LOD for each instance? (billboard and regular model) 3. In this system can we add more LOD? 4. How are animations handled for the instanced vegetation? 5. If I have trees that are rigged, can I use different animations at the same time on identical instances? Quote Link to comment Share on other sites More sharing options...
martyj Posted December 8, 2015 Share Posted December 8, 2015 I am pretty sure we can't animate vegetation. Just with my experience of it. You may be able to find a way to animate all the vegetation at once, but probably not a specific instance. If you can run some code before and after the vegetation render sequence that would change the Model uniform maybe. Are you thinking of an animation for wind? Quote Link to comment Share on other sites More sharing options...
martyj Posted December 8, 2015 Share Posted December 8, 2015 Actually in C++ it looks easy to animate. In class cope VegitationAnimationFrame = 0; In your update loop before rendering. int searchIndex = 2; // Hard coded on the layer you wish to animate VegitationLayer* foundLayer = NULL; list<VegitationLayer*> layers = World->terrain->vegetationlayers for(std::list<VegitationLayer*>::iterator it=layers.begin(), i=0; it != layers.end(); it++, i++) { if(i == searchIndex) { foundLayer = *it; break; } } if(foundLayer != NULL) { Model* model = foundLayer->model; // Animate with the Entity SetAnimationFrame function } Quote Link to comment Share on other sites More sharing options...
Josh Posted December 8, 2015 Share Posted December 8, 2015 1. What are the polygon or vertices limit for a single instance? Around 65,000. 2. Are there only two LOD for each instance? (billboard and regular model) Yes 3. In this system can we add more LOD? No. 4. How are animations handled for the instanced vegetation? Animation is not supported. There is a shader for making leaves sway. 5. If I have trees that are rigged, can I use different animations at the same time on identical instances? No. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
tournamentdan Posted December 8, 2015 Author Share Posted December 8, 2015 5. If I have trees that are rigged, can I use different animations at the same time on identical instances? No. How do you pick the vegetation for decals? I am looking to animate trees and others with bones. So can't I pick the closest trees around the character controller and use copies instead of instances? It shouldn't raise the entity count that much. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 9, 2015 Share Posted December 9, 2015 If you do a world or camera pick, it will return the vegetation layer entity. The entire layer is one entity. A new member, pickinfo.mat, returns the 4x4 matrix of the specific instance. 2 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted December 9, 2015 Share Posted December 9, 2015 Is it a child/parent thing where the entire veg layer is an entity but it has children entities that are the trees? I'm just trying to think of possible ways where we could treat each vegetation as separate entities, even if that method is a little trickery like hiding that one in the veg system and swapping it with a real entity or something like that. Otherwise, right now the veg system doesn't handle dynamic situations like chopping down a tree, unless you have some other method in mind for that. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 10, 2015 Share Posted December 10, 2015 There actually isn't control for individual instances. There is a filter texture, but that does not correspond to the layout of the instances, since they might be denser than the terrain resolution. So it setting that up would be a little more difficult. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
tournamentdan Posted December 10, 2015 Author Share Posted December 10, 2015 In opengl, doesn't each instance get a invocation id in the geometry shader? With that wouldn't we have control over each individual instance? Quote Link to comment Share on other sites More sharing options...
damvcoool Posted December 11, 2015 Share Posted December 11, 2015 Would it be possible to expand the LOD for vegetation to have 3 LOD instead of just 2? (Close, not so close not too far, Real Far!) Quote Link to comment Share on other sites More sharing options...
martyj Posted December 11, 2015 Share Posted December 11, 2015 @tournamentdan We don't have access to the geometry shader unfortunatly. It would also be hard to animate a specific tree. If you're doing something that requires that much in depth work on a specific model. I'd recommend just making it an enitty. Quote Link to comment Share on other sites More sharing options...
tournamentdan Posted December 11, 2015 Author Share Posted December 11, 2015 I have software specifically made to create and animate vegetation. Depending on the distance from camera. Each individual billboard is switched out with an instance. Or vice versa. I don't see why it would be a problem switching out the closest instances with copies. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.