River Detection
Dec 17, 2014 19:09:46 GMT
Post by etoreo on Dec 17, 2014 19:09:46 GMT
This is a continuation from the Unity forums, so I will paste what was discussed so far:
We original question:
Reply:
Now my follow ups...
1. So a hex tile gives the 3d location of all its trees when asked for them, and can remove a specific tree?
2. Great!
3. That is a bummer. I'm not apposed to doing a little work myself, but I'm not sure I understood your suggestion... There is enough data in the generated terrain / hexes to determine the existence of a river between two nodes?
We original question:
I have a few questions before I buy this asset...
1) Can I remove individual trees from a title? I plan to build roads through tiles and will need to remove specific trees if the road collides with them.
2) Do trees get saved/loaded with the terrain or do they end up randomly generated on load? If they are saved and loaded, will it be compatible with removing a tree? Put another way: can I remove a tree, save the terrain, reload the train and see the exact state as I left it?
3) Is there a way to query the terrain/titles about where a river is (what sides of a hex tile they are "on")? I will need to build bridges over them AND work that into the cost structure of my path finding.
Thank you for your time. This looks like an amazing asset.
1) Can I remove individual trees from a title? I plan to build roads through tiles and will need to remove specific trees if the road collides with them.
2) Do trees get saved/loaded with the terrain or do they end up randomly generated on load? If they are saved and loaded, will it be compatible with removing a tree? Put another way: can I remove a tree, save the terrain, reload the train and see the exact state as I left it?
3) Is there a way to query the terrain/titles about where a river is (what sides of a hex tile they are "on")? I will need to build bridges over them AND work that into the cost structure of my path finding.
Thank you for your time. This looks like an amazing asset.
Hi!
1. Yes, you can find correct tree by asking hex owner. remove it and then do terrain rebuild. It will rebuild foreground mesh as well.
2. Trees are saved together with terrain, yes. So you can even do a seasons update for trees (green tree at summer and naked branches at winter) by updating tree type instead of position. You want to do this update with some loading screen though because it takes noticable amount of time (eg 0.2s, based on the device speed ) and mesh is destroyed for update process.
3. there is no data about rivers in hexes, which would have to be at some point. For now you have postprocessed river data in the world class directly. You may want to use preprocessed river data which is simply corners between 3 hexes.
Having this data you will want to go through the river nodes and check pairs of nodes (current and next) two hexes would be identical for both corners and one would be different. Those identical hexes are those separated by the river.
It is something what would end up in the code earlier or later but for now you will need to write yourself.
1. Yes, you can find correct tree by asking hex owner. remove it and then do terrain rebuild. It will rebuild foreground mesh as well.
2. Trees are saved together with terrain, yes. So you can even do a seasons update for trees (green tree at summer and naked branches at winter) by updating tree type instead of position. You want to do this update with some loading screen though because it takes noticable amount of time (eg 0.2s, based on the device speed ) and mesh is destroyed for update process.
3. there is no data about rivers in hexes, which would have to be at some point. For now you have postprocessed river data in the world class directly. You may want to use preprocessed river data which is simply corners between 3 hexes.
Having this data you will want to go through the river nodes and check pairs of nodes (current and next) two hexes would be identical for both corners and one would be different. Those identical hexes are those separated by the river.
It is something what would end up in the code earlier or later but for now you will need to write yourself.
Now my follow ups...
1. So a hex tile gives the 3d location of all its trees when asked for them, and can remove a specific tree?
2. Great!
3. That is a bummer. I'm not apposed to doing a little work myself, but I'm not sure I understood your suggestion... There is enough data in the generated terrain / hexes to determine the existence of a river between two nodes?