Jump to content

GeNa Terrain Decorator in Headless build


TakeruGrima

Recommended Posts

Hello,

 

I tried to use the GeNa Terrain Decorator to flatten the terrain and it works perfectly in editor. Yesterday I try to build the game like so :

  • Headless Build for Server
  • Windows build for Client

 

It worked perfectly when running on my computer, but today I try to run the server in our distant computer that we use to host our server and it gives me those errors :

 

RenderTexture.Create failed: format unsupported for random writes - R16 UNorm (21).
RenderTexture.Create failed: format unsupported for random writes - R16 UNorm (21).
RenderTexture.Create failed: format unsupported for random writes - R16 UNorm (21).
Invalid pass number (0) for Graphics.Blit (Material "Procedural Worlds/GeNa/PaintHeight" with 0 passes)
Kernel 'Paint' not found
System.ArgumentException: Kernel 'Paint' not found.
  at (wrapper managed-to-native) UnityEngine.ComputeShader.FindKernel(UnityEngine.ComputeShader,string)
  at GeNa.Core.GeNaCompute.EKCKNCFGIJA () [0x00018] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at GeNa.Core.GeNaCompute.ACACCABOCGN (System.String[] FLGMLIAOFMP) [0x00009] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at GeNa.Core.GeNaCompute..ctor (System.String directory, System.String[] kernels) [0x0001b] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at GeNa.Core.TerrainTools.get_Computes () [0x0000f] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at GeNa.Core.TerrainTools.PaintTerrain (GeNa.Core.EffectType effectType, UnityEngine.RenderTexture brushTexture, GeNa.Core.TerrainEntity modification, System.Single flattenHeight, System.Single strength) [0x00001] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at GeNa.Core.TerrainTools.GenerateTerrainEntity (GeNa.Core.TerrainModifier terrainModifier) [0x0017d] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at GeNa.Core.TerrainModifier.GenerateTerrainEntity () [0x0002a] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at GeNa.Core.GeNaTerrainDecorator+<OnSelfSpawned>d__10.MoveNext () [0x00047] in <086dfb1ce315492884cc62e63c5b0cf0>:0 
  at GeNa.Core.GeNaSpawnerInternal+DBPCEHDEBEC.MoveNext () [0x006af] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at GeNa.Core.GeNaSpawnerInternal+DBPCEHDEBEC.MoveNext () [0x00a3e] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at GeNa.Core.GeNaSpawnerInternal+NEAMEABBEKM.MoveNext () [0x00185] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at GeNa.Core.GeNaSpawnerInternal+HIBJOEEOGEC.MoveNext () [0x00fc0] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at GeNa.Core.GeNaSpawnerInternal.Spawn (GeNa.Core.GeNaSpawner geNaSpawner, UnityEngine.Transform target, UnityEngine.Transform ground, UnityEngine.Vector3 position) [0x00070] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at GeNa.Core.GeNaSpawnerInternal.Spawn (GeNa.Core.GeNaSpawner geNaSpawner, UnityEngine.Vector3 position) [0x0003d] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at GeNa.Core.GeNaSpawner.Spawn (UnityEngine.Vector3 position) [0x00000] in <5ce970bbe05c4aa981e11a77c0e750ab>:0 
  at MapBuildings.ProcEnemyBuildingSpawner.OnAgentsGroupSpawned (UnityEngine.Vector3 position) [0x00066] in <086dfb1ce315492884cc62e63c5b0cf0>:0 

 


This error is really blocking, the server does not start anymore. I have a feeling it is related to the use of the GPU in the GeNa Terrain Decorator.

Link to comment
Share on other sites

  • 2 weeks later...

Hello @TakeruGrima, and sorry for the late reply - it looks like we missed your request over the holidays. I assume the headless server does not use a GPU? If yes, this is a similar issue as discussed in this thread: https://canopy.procedural-worlds.com/forums/topic/1238-gena-runtime-does-not-work-in-build
Some features of GeNa / Unity require a GPU to function correctly. The terrain decorator also uses the GPU where possible for speed. We currently do not plan to support CPU-based terrain editing as this would create quite some effort in creation and maintenance of the tool.

 

Link to comment
Share on other sites

Oh I see, that's too bad because we planned in our game to randomly spawn goblin dungeons and because they are really big structure we can't just place it somewhere and hope that it fit the terrain...

Is there a way we can do that with the current implementation with the headless build ?

Link to comment
Share on other sites

  • 4 weeks later...
On 1/2/2023 at 12:13 PM, TakeruGrima said:

Oh I see, that's too bad because we planned in our game to randomly spawn goblin dungeons and because they are really big structure we can't just place it somewhere and hope that it fit the terrain...

Is there a way we can do that with the current implementation with the headless build ?

You can switch it to CPU now I was happy that happen .   I had this issue, which caused me to use Gena 2 for awhile for headless, same issue happen if you had dedicated servers . 

 

You can spawn locally, and use CPU , vs GPU..  This was added

 

As far as terrain, I just made flatten many years before Gena pro was made with Gena 2 spawning.

 

, I recommend, just to make your own, I know it sucks super easy to do.. 

 

another option. its updated to 2021, I just checked. 

 

There is a free asset called  Terrain Former, THAT does flatten too, that I know a few friends used with Headless... 

 

 

Sadly alot of assets don't work with multi player games, or certain features won't . This is the give and take, that can happen with some assets, which will require us, need us to edit source..

 

If your a programmer, I would talk to PW, about buying source...  for multi player games, its a must ...when you run into issues like this.. Or you can do what I suggested above those two options...  I love Gena pro, but with my current game, my kids are making we had to use Gena 2 to edit some things. 

 

You can still leverage both , if need be, but you will need to rename some things in Gena 2, I just renamed Gena 2 all together , so if you want to use Gena 2 and Gena pro... That is another option.

 

 

You could use Unity terrain tools to flatten , and make a stamp, and have it flatten the area that you want ... So flatten honestly is fairly easy to do.  Make a quick runtime method for what ever building you want to spawn.  

 

 

For got to add, 

 

Remember to, make sure you run Game-related code on the client... 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...