Terragen -> Unity for a very basic game test.

Started by Jgone, February 07, 2018, 05:37:23 AM

Previous topic - Next topic

Jgone

Hello. Tried googling this but didn't find any recent posts about it so i decided to open one of my own.

I'm currently at school, we have few months of game development, we gotta create super super simple basic games to pass the class.

Anyone got experience how to import a simple terrain from terragen to Unity3D ? Or is it even possible ?
The class is super basic, and so is the game. So if it takes like 30 steps to import a scene to unity then it might not be worth it.

I'm sure there are some restrictions involved, but i've read that people can import skyboxes from terragen to Unity, but i guess that's a different story.

bobbystahr

Quote from: Jgone on February 07, 2018, 05:37:23 AM
Hello. Tried googling this but didn't find any recent posts about it so i decided to open one of my own.

I'm currently at school, we have few months of game development, we gotta create super super simple basic games to pass the class.

Anyone got experience how to import a simple terrain from terragen to Unity3D ? Or is it even possible ?
The class is super basic, and so is the game. So if it takes like 30 steps to import a scene to unity then it might not be worth it.

I'm sure there are some restrictions involved, but i've read that people can import skyboxes from terragen to Unity, but i guess that's a different story.

try this thread

http://www.planetside.co.uk/forums/index.php/topic,10716.msg110188.html#msg110188
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Jgone

Quote from: bobbystahr on February 07, 2018, 05:01:04 PM
Quote from: Jgone on February 07, 2018, 05:37:23 AM
Hello. Tried googling this but didn't find any recent posts about it so i decided to open one of my own.

I'm currently at school, we have few months of game development, we gotta create super super simple basic games to pass the class.

Anyone got experience how to import a simple terrain from terragen to Unity3D ? Or is it even possible ?
The class is super basic, and so is the game. So if it takes like 30 steps to import a scene to unity then it might not be worth it.

I'm sure there are some restrictions involved, but i've read that people can import skyboxes from terragen to Unity, but i guess that's a different story.

try this thread

http://www.planetside.co.uk/forums/index.php/topic,10716.msg110188.html#msg110188

Hey, thanks for the tip. The post didn't quite help me out, but it helped me to understand some things. :)
I tried importing an fbx (via micro importer) and opened it in Unity but it doesn't work.
I guess it must be more complex than i'm imagining  ???

cyphyr

I don't know Unity but I would imagine that it can import height maps that can displace the base Unity terrain.
You can generate a height map by plugging your terrain into  the shader input of either a "Heightfield generate" node or a "Heightfield from Shader" node. Then right click on the node and select Save as ... You will have the option of saving as either a .ter (terragens native terrain format) or an .exr. Choose the .exr. You can ten import this into Unity or edit it further in Photoshop.
Hope this helps
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

KlausK

#4
Hi
You might want to search the forum for the term "microexporter".
This is in no way meant as some kind of "rtfm" ;) but it will give you links to threads dealing with exporting terrains in a wide variety of scenarios.

And yes, the simplest way to export is using the microexporter and saving the resulting file as a *.obj.
Again, read up upon the microexporter and how it works.

I`ve attached a few pictures from a Unity scene where I imported a microexporter generated terrain as *.obj.
To microexport the terrain I used a spherical camera in TG (perhaps only available in the Pro-version - but ortho-
or perspective camera work well too), relatively high render quality settings of AA 6 and Micropoly detail of 0.6.
As I said camera=spherical and Far distance set to 1000m. This resulted in a *.obj of 612mb and roughly 1.8 mill polygons.
The TG Wiki explains how different render settings influence the microexporter.

Import into Unity was no problem (Import New Asset) but Unity split the object up into ~30 groups.
A obj imported is allowed to contain about 65000 polys or something, I think. That is what is in the attachments.

So, yes it is easy but you`ll have to do some clean up and figure out which degree of resolution you need in the game engine
before you export from TG. But I am by no means an avid user of Unity nor TG. Just curious to look into these kinds of problems
and find my way around :) Hope it helps a little.
CHeers, Klaus
/ ASUS WS Mainboard / Dual XEON E5-2640v3 / 64GB RAM / NVIDIA GeForce GTX 1070 TI / Win7 Ultimate . . . still (||-:-||)

agent unawares

I wouldn't use the microexporter because it involves all kinds of unnecessary cleanup. Generate a heightmap and use it with normal Unity terrain.

Jgone

Thanks a TON all of you. Now i feel confident that i'm able to produce something for our little game.
The users on this forum has got to be the most helpful ones out there.  ;D