Jump to content
  • entries
    943
  • comments
    5,899
  • views
    924,389

Vegetation Update


Josh

6,333 views

 Share

An update is available on the beta branch which adds the new vegetation system. You can open the attached map in the editor to see the system in action. Be sure to create a new project, or update your existing one, in order to get the new shaders and models.

vegetationsample.zip

 

To get this update early you must opt in to the beta branch on Steam.

 

The new vegetation system is special because it does not use persistent objects stored in memory. Rendering and physics are executed according to a distribution algorithm that dynamically generates instances each frame. This allows the system to manage an infinite number of instances, with much denser placement and faster performance than a conventional vegetation system would allow (such as what Leadwerks 2 used.)

 

blogentry-1-0-18854700-1448762090_thumb.jpg

 

You can select the vegetation tool in the terrain tools dropdown box. Usage is pretty self-explanatory.

 

Models that are to be used as vegetation layers much have a material with a vegetation shader applied. There are two new slots in shaders list in the material editor, for the vegetation and vegetation shadow shaders. These can be selected from the "Shaders\Vegetation" folder.

 

Models with a default physics shape and collision enabled will be collideable.

 

A new "Pick mode" setting has been added in the material editor. This allows you to disable picking on some materials (like leaves and grass). This allows bullets to pass through objects that should not stop them.

 

At this time, vegetation will only appear when texture+lighting render mode is in use.

 

The default models have been donated generously by Pure3D.de.

  • Upvote 17
 Share

15 Comments


Recommended Comments

/Leadwerks/Projects/CrawlerDefense/Shaders/Vegetation/Shadow/billboard_top.shader"

and side shader are missing as well as

r/Shaders/Model/leaves.shader"

After I made this in a new and updated project.

Link to comment

Having a play with this new feature I'm blown away of how cool it is. Question. Will it be possible to set a min/max size for the layers to get even more variation in the future?

 

A possible improvement would be a min/max depth into the terrain. It would be cool for rocks and trees. I have tree models that would need to be moved lower in the modeling program, but having control in LE for that would be better.

 

Nice work Josh.

Link to comment

Pretty cool stuff, Josh! I also get a couple of missing shader errors, same as Slastraf.

 

The framerate is getting low at some point, depending on how dense the veggies are, but i guess you could still make a couple of performance optimizations. Overall, i really like the new vegetation (could also be used for non veggie stuff)! Well done!

 

Btw, i also noticed that the framerate is higher when the directionnal light comes from above, and decreases when the directionnal light comes from a lower angle.

Link to comment

The shader is there but its in a different folder. The materials for the grass, bush, and tree lists the leaves.shader in the Shader/Model folder, but its actually in the Shader/Vegetation folder. Make the changes to those materials and the errors go away.

 

Btw, i also noticed that the framerate is higher when the directionnal light comes from above, and decreases when the directionnal light comes from a lower angle.

I assume thats due to number and size of the shadows that are created.

Link to comment

I think you talked about this before but I'm trying to remember what you said with what if we want to "chop" down a tree?

  • Upvote 2
Link to comment

Also, are we doing to get access to some of these vegetation layer properties in code? I can see the density property being useful in performance parameters for the given users PC.

  • Upvote 1
Link to comment

Finally got to testing this today and I am really enjoying it.

It works very well and is easy to use. Now I just need access through code to really get to work! :)

Link to comment

THe infinity seems nice and all, and seems a big thing for MMO`s, but what going to do in games such as FPS, that some models really need to be synced in the same place for everybody?

Link to comment

@vfn4i83 The vegetation can actually be painted onto the terrain manually so it doesn't need to be infinite, you can decide areas in which it is placed. Also you can always just manually place models, without using the vegetation system, if they need to be in really specific positions.

Link to comment

Well tested for 5 minutes, in 5 minutes ! This can be summed in one word: Great, simply great. Now making full big map is no boring anymore, like throwing model after model. Pretty nice new feature !

 

Edit:

 

Only getting a problem with the model shape, not realy repoduced with the new tool: Player is going through my barrels, other shaped trees.

Somebody else found this ?

  • Upvote 1
Link to comment
Guest
Add a comment...

×   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.

×
×
  • Create New...