Jump to content

Mesh Layers


Recommended Posts

I'm watching the video of todays workshop.  Your mesh layers does exactly what I need 😁 and I agree with the others about how it should be a seperate class from the terrain.  Somthing we can use idenpenantly would be very powerfull.  Firstly I could use it for my voxel terrain foliage system - which is the exact same as yours but can work in caves and such too.  Also it could be used for making cities with huge amounts of buildings and I'm sure many other things too.  🙂  What do you think about this?

Link to comment
Share on other sites

The reason it is tied to the terrain is because each instance's position is determined programmatically, and not stored in memory. The x and z position are calculated by the instance number, and the y position is based on the terrain heightmap elevation.

There is no position for each instance stored in memory, which is why each instances consumes only one bit.

Without the terrain, how would the algorithm figure out the position of each instance?

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

I see what you mean.  It would be no "easy" task for the user, but for those of use who know how all the positioning would be done in a shader function.  The idea of a MeshLayer class would be to construct a grid of meshes from a single object.  Then in our shader function we could write some code that could sample a texture to offset the mesh in that cell, to get some randomness (and even height).  The only thing it would be suited for is large quantity of objects that follow a sort of grid like pattern.  (3D grid would be even better).  Like foliage; city blocks and maybe even large swarms of enemies or insects that could be swapped in for an actual model the closer the player got to them - like a boid system.  I'm sure there are more uses.

I will write something like this myself if not.  I'm not as smart as you so it would take me more than 3 days. :D

 

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