Jump to content

Terrain mesh painting


Alienhead
 Share

Recommended Posts

To be extended to surface painting, no reason why we should be limited to painting mesh objects on terrain surfaces only? I would like to paint to any surface the brush tool comes in contract with. 

  • Like 1

I'm only happy when I'm coding, I'm only coding when I'm happy.

Link to comment
Share on other sites

If we take a deeper look to the shader code (MeshLayer/Vertex.glsl) the reason is, that the mesh layers rely on the heightmap and terrain resolution. 
The instances are passed all at height 0 and the height and alignment is calculated in the vertex shader on the fly.

this way the in editor painting is fast (no picking involved), but i agree that this would be a nice feature.

Maybe a more detailed sample why this would be a nice feature:

the nature of heightmap terrains is that they don't allow overhangs etc. so to add those, we need to add meshes to simulate them. With the current meshlayer system we need to place custom instances of the foliage ourselves on these meshes. (including syncing lod settings) This  will (at least until the new  culling is introduced) be a potential bottleneck for detailed terrain maps, or pure mesh based levels.

My idea would be to introduce a new paint mode (maybe a checkbox called include meshes) if this is on, a pick is done and the height and normal is stored in a seperate texture or taken directly from the meshlayer instance when the height is != 0.

  • Like 1
  • Upvote 1
  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

The foliage system does not store the position of any objects instances in memory. Each instance is placed according to a procedural equation that is duplicated in the main thread, physics thread, and on the GPU in the shaders. One aspect of this, as mentioned, is the layout is basically 2D with a vertical offset.

It could be possible to make a separate "model painting" tool that would distribute instances of a model across the scene, but it would be creating normal entities, and would be a totally different tool.

  • Like 1

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

Yes this is what i was originally referring to.. Being able to paint mesh across normal mesh surfaces.  Or really even an object dropper.  Set a layer of objects and paint them across surfaces, perhaps physics and height for dropping, then save the outcome.  Or have a raised the difficulty of the original question ?

I'm only happy when I'm coding, I'm only coding when I'm happy.

Link to comment
Share on other sites

It's not that difficult, but I am just clarifying why would be a new feature that has nothing to do with the terrain foliage system. :) 

  • Like 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

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