Jump to content

Vegetation


tournamentdan
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

}

Link to comment
Share on other sites

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.

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

 

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.

 

 

Link to comment
Share on other sites

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.

  • Upvote 2

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

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.

Link to comment
Share on other sites

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.

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...