Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - yan

Pages: [1]
Support / Re: TGS Set territory colours
« on: March 01, 2020, 04:49:37 AM »
are you saying that the surface has to be generated once for each color? Cell/TerritoryToggleRegionSurface generates the color surfaces and toggles between them?  How do you specify that a cached surface should be toggled to, as opposed to a new one generated? How do you access the cached surfaces to set them visible/invisible? It looks like having multiple cached surfaces visible at once is causing the z-fighting.

Support / Re: TGS Set territory colours
« on: February 29, 2020, 08:40:25 AM »
I do tgs.CellToggleRegionSurface() at Start to colorize my cells. Once I call tgs.CellToggleRegionSurface() at runtime to change a cell's color, there is serious z-fighting between the original and the new color. Calling tgs.CellHideRegionSurface() before setting the new color, does not affect this (color cleared, then same z-fighting between the old and new color after tgs.CellToggleRegionSurface() is called). Changing Overlay mode and GridElevation settings does not affect this either. Setting the refreshGeometry parameter to true, resolves the z-fighting/clears the old color, but introduces a 800ms delay at runtime, which is unacceptable. If I do not call tgs.CellToggleRegionSurface() at Start and only at runtime, this same 800ms delay occurs until the cell is colored, even with the refreshGeometry parameter set to false. Deep profiling shows TerrainGridSystem.GenerateRegionSurface to take all the time (see attached screenshots).

If I set tgs.colorizeTerritories = true at Start, random colors are assigned to the territories, which cause the same z-fighting issues when running tgs.TerritoryToggleRegionSurface() to set specific territory colors at Start or at runtime. If I don't call tgs.TerritoryToggleRegionSurface(), just use the default colors and call tgs.CellSetTerritory at runtime to change cell color according to parent territory, the same 800ms delay occurs as described above. As a side note, the refreshGeometry parameter cannot be called in tgs.TerritoryToggleRegionSurface(), without also setting a territory texture.

I don't mind using either cell or territory methods, but would really need to use one set to properly change cell colors at runtime without a delay. At start I generate a mesh-based terrain, add TerrainGridSystem class and set all parameters, including irregular topology. Mesh sizes from 1.5k to 30k tris all produce the same results.

Hope you can help with this.
Best regards

Support / Re: LWRP + Shader Graph support for TGS
« on: January 05, 2020, 05:49:26 AM »
here are some screenshots showing what I mean.

Support / Re: LWRP + Shader Graph support for TGS
« on: January 04, 2020, 05:22:56 PM »
Territory colors and borders do not render when I apply a terrain shader I built using shader graph. I do see the TGS parts that do not overlap with the terrain when I increase grid elevation. Any ideas what I am missing?


Support / LWRP + Shader Graph support for TGS
« on: January 04, 2020, 04:13:43 PM »
Is there any chance to get LWRP + Shader Graph support for TGS?

Best Regards

Support / Re: TGS Set territory colours
« on: December 22, 2019, 06:58:12 PM »
Calling CellSetTerritory at runtime seems to clear all cell colors. Subsequently iterating over territories to reset their color causes a ca. 0.5-1 second freeze. The same happens when setting the color for a single cell. Do you have any ideas what I could be overlooking?

Also, CellFlash, CellBlink, CellColorTemp and CellFadeOut all cause z-fighting, which I was not able to fix yet by changing Elevation, ElevationBase or DepthOffset values. Should the latter be called when building the gridgraph initially or at the same time the former are being called? Or is there some other fix for this?

Best regards and many thanks!

Feature Requests / Re: Use with procedurally generated mesh
« on: April 25, 2019, 07:23:32 AM »
I see. Thanks for the quick reply. Would it be a big leap to get it to work with a homogeneous projection on the entire sphere the way it is with the Hexasphere System? I would be very interested in this for the near future.

Best regards

Feature Requests / Re: Use with procedurally generated mesh
« on: April 25, 2019, 02:07:38 AM »
amazing work implementing this in the new update! I really appreciate this. I haven't had the chance to try it yet, but would it possible to make irregular topography work on globe/sphere meshes as well?

Best regards

Excellent! Thanks!

how do I access the territory associated with a cell in 3D space in script? I tried doing:

cellCenter = tgs.CellGetPosition(cellIndex);
Vector3 cellCenterInLocalSpaceOfTerrain = terrain.transform.InverseTransformPoint(cellCenter);
Vector2 cellCenterV2 = new Vector2(cellCenterInLocalSpaceOfTerrain.x, cellCenterInLocalSpaceOfTerrain.z);
...but figured tgs.TerritoryGetAtPosition() is only meant for 2D maps, since it was returning empty (not null). Is there something similar for 3D space or another way to get the territory that is associated with a cell or vice versa?

Developer's Corner / Re: Asset Request: Optimized RTS unit system
« on: March 15, 2019, 01:36:27 PM »
I'm sure you have the ECS on your radar by now. Would be great to see an easily accessible asset with a degree of ECS implementation!

Pages: [1]