Using Unity Terrain with DOTS workflow

Yes, that is possible and it sounds like that’s what hauwing had to do, but as DesertGhost said in the initial thread post, that workflow is less than ideal. It’s why I came here… because it would be nice to use the terrain tools without having to export a mesh every time I make a tiny change.

Any news on the DOTS terrain engine??

I’m using the DOTS terrain collider conversion script from this thread.

Unfortunately, when I use CollisionMethod.VertexSamples it messed up my pathfinding - the agents go crazy and half the time they can’t get to where they need to go. When I use CollisionMethod.Triangles, more often than not, my bullets collide with the ground before they hit their target. When I manually converted my terrain to a mesh I didn’t have either of those problems, but it was a really lame workflow having to export and import a mesh every time I wanted to make a tiny change to the terrain.

I’m having trouble figuring out why both collision methods are behaving poorly. So I thought I’d try adding the PhysicsDebugDisplay script to an object in the scene and see if I can visualize why everything is going wonky. Well that script seems pretty cool and useful, but unfortunately it doesn’t display the outline for the terrain collider (it works for all the other colliders though). When I check the “Draw Colliders” checkbox it sorta shows something but it’s all glitchy and I’m not exactly sure what I’m seeing. It makes a bunch of gray squares that look like this:

I’m hoping maybe someone knows a way to either visualize the terrain collider, or even better, maybe someone knows how to create a terrain collider from a unity terrain that works properly. Or… best of all… maybe the DOTS terrain engine is finally out???

@lclemens

Duplicate your terrain object, remove terrain component but keep the terrain collider component.
Add DOTSTerrainCollider.
Assign terrain collider to it.
Move this terrain object into subscene.
Done.

Whenever you modify your terrain, hit reimport button of the subscene to regenerate terrain colliders.

7357349–895775–DOTSTerrainCollider.cs (1.97 KB)

1 Like

That is the same method that everyone in this thread has been messing with ( @daschatten , @Lukas_Kastern , @Arnold_2013 ). Like your class, they’re all based on the Unity.Physics.TerrainCollider.Create() function, which has a lot of problems like the ones myself and others have described in this thread.

Is there anywhere we can go to see the current status of this dots terrain engine?

3 Likes

Any update about DOTS terrain engine?! It has been almost two years now (is the team not working on it now?!)

6 Likes

Is this what we are all looking for? https://portal.productboard.com/dzcznunfgebtky7ipmhrc22z/c/494-mobile-optimized-gpu-terrain-scriptable-renderer

That’s pretty cool… but no, it has almost nothing to do with what we’re talking about.

Yeah, I was thinking maybe it’s on the same page of a DOTS terrain engine @Joachim_Ante_1 was mentioning, even though nothing is mentioned about DOTS there!

Is this supported in 0.50?

4 Likes

For this to work in 0.50 you need to add a PhysicsWorldIndex shared component in the authoring component for the terrain. Thank you [TRS6123]( Experimental Entities 0.50 is Available page-2#post-7978434) and [Iclemens]( Experimental Entities 0.50 is Available page-2#post-7979517).

5 Likes

Yes, our hack works if we add PhysicsWorldIndex (and make sure the terrain isn’t in a subscene anymore because AddHybridComponent() was removed).

The question I am asking is - if there is a dedicated dots terrain engine in 0.50 since Joachim said they were working on it in October 2019 (2.5 years ago). If there is, I haven’t found it or figured out how to use it yet.

3 Likes

I am also curious to know the status of the DOT terrain engine. Maybe it’s part of 1.0 (seems very useful for open world games)?

3 Likes

Create your world with a terrain editor, then split and convert it to standard meshes that you can hybrid-render. This way you don’t have to wait years for Unity to do something about it.

Also, Unity does have a card on their roadmap about scene streaming and sectioning, just no mention of terrains.

I’m curious about what they are showing at GDC as they had multiple sessions on DOTS yesterday and are revealing a new URP sample as well as a mysterious flashship demo on Thursday.

2 Likes

It’s not mysterious :smile:
https://unity.com/demos/enemies

https://www.youtube.com/watch?v=eXYUNrgqWUU

2 Likes

hello! Can you please tell me how to convert terrain to standard mesh?
Can i use this script? Do you think its safe and legit? Thanks in advance!

https://www.youtube.com/watch?v=k2X_Q3mqb2Q

We use https://assetstore.unity.com/packages/tools/terrain/terrain-to-mesh-2021-195349 . For the script you’re pointing, simply look at the .cs content. I don’t think there can be any danger in that.

How would you rate the workflow for that? Say for example you want to flatten a small area in the terrain or paint it… how much work is it to do that and then rebuild the mesh whenever you need to make a change to the terrain?

If its anything like github I used to do, PITA and would only do it prior to build for platforms

Would like to know a status on conversion for terrains. Currently I have GO terrain, along side the DOTS world with hacked collider from this thread. I understand DOTS team are busy. What is the scope of the DOTS terrain? Will it be an authoring port of existing gameobject terrain or something more, that can stream / better performance?

Same question for the vegetation detail rendering with terrains, will this be accelerated with hybrid renderer? Just a few questions to anticipate, not asking when ofc ; )

11 Likes