Planetside Software Forums

General => Terragen Discussion => Topic started by: Phanindra Nath N on July 11, 2016, 03:04:16 AM

Title: How to reduce Terrain size which is exported
Post by: Phanindra Nath N on July 11, 2016, 03:04:16 AM
Hi,

I have create a terrain using Terragen4 Beta, when I import the same into maya, I found it to be enlarged, How to reduce the size, Kindly help me out with this.

Please find the bellow steps I have followed

I have try to export the terrain using the process of "Terragen Import-Export Reference" http://planetside.co.uk/wiki/index.php?title=Terragen_Import-Export_Reference (http://planetside.co.uk/wiki/index.php?title=Terragen_Import-Export_Reference), Please find the bellow screenshots

PIC - 001
(http://itvibes2.com/maya/Terragen4/TRR-01.png)

I have exported the file in ".obj" format
PIC -002
(http://itvibes2.com/maya/Terragen4/TRR-02.png)

I import the terrain into Maya, it came big(Please watch this our screen share video https://youtu.be/cUd68ZRiucU (https://youtu.be/cUd68ZRiucU))
PIC -003
(http://itvibes2.com/maya/Terragen4/TRR-03.png)


Title: Re: How to reduce Terrain size which is exported
Post by: Hetzen on July 11, 2016, 08:20:16 AM
I would imagine Maya has system units set up for cm. Terragen exports in meters.
Title: Re: How to reduce Terrain size which is exported
Post by: Phanindra Nath N on July 11, 2016, 08:55:10 AM
Kindly Let me know the solution to reduce the size. Before Exporting
Title: Re: How to reduce Terrain size which is exported
Post by: Hetzen on July 11, 2016, 09:22:23 AM
To reduce the file size, you decrease the image size in pixels on render. This affects how many polygons are produced in the obj export.

To reduce the scale in Maya, either set up system units to meters, or reduce your mesh in Maya by 100% if 1 unit is 1 cm.
Title: Re: How to reduce Terrain size which is exported
Post by: Oshyan on July 11, 2016, 04:58:00 PM
To know how to help you, we need to know what you mean by "size". Do you mean *file size*, density/amount of geometry (polygons/triangles), or do you mean *area* or *spatial size*? In other words are you talking about how big it looks when it imports into Maya, or that the file size is too big to deal with?

Terragen works in Meters, there is no way to change the units that are used. So spatial scaling must be done in your destination application (Maya in this case).

- Oshyan
Title: Re: How to reduce Terrain size which is exported
Post by: Phanindra Nath N on July 11, 2016, 11:01:12 PM
Thank you for the response

We would like to let you know the issue  in brief:

1) We are trying to animate the characters in terrain and exporting to maya
2) we are able to get the desired output using terragen4 beta
3) when we import the same into maya , the output is displayed in triangular view
, and the dimensions are huge (we mean spatial size, look wise  ) , the output captured according to
the camera's view

Conclusion:

4) We need the terrain, that can be customised according to our dimensions, It may be in square, rectangle with specified area dimensions

Kindly need help on this
Title: Re: How to reduce Terrain size which is exported
Post by: Oshyan on July 12, 2016, 03:33:45 PM
Move your camera to a top-down view and use the Orthographic Camera (this setting is in the Camera node's options). You can specify the area of view in Meters, either Width or Height. Then use this as your render camera for the micro-exporter and render with square output dimensions. This will give you a square area of terrain with a specific dimension in meters and a consistent level of detail.

- Oshyan
Title: Re: How to reduce Terrain size which is exported
Post by: digitalguru on July 12, 2016, 08:08:11 PM
Hey Phanindra,

As Oshyan says rendering the micro exporter via top down orthographic camera is the way to go. Rendering from a perspective camera is limiting unless your camera is locked down, but then you don't have the flexibilty to move it later if you need to.

You should also turn off texture coordinates in the micro exporter before you bake it out. You will have to re-UV the mesh in Maya anyway (as the text coords in Terragen are not projected down on the mesh, but along the x axis) and this wil lreduce the file size on disk.

The resultant mesh also has every vertex duplicated and those should be cleaned before importing (halving the mesh file size again!) . Maya is very crap at cleaning dup verts on huge meshes output from Terragen, so I use a free prog called mesh lab to de-dup ebfore loading in to Maya. (http://sourceforge.net/projects/meshlab/files/meshlab/)

I'm just finishing up on a Maya script I'm writing that handles most of the issues you'll come across working with Terragen and Maya (deals with all the scale issues and can import / export nimation to and fro from Terragen)

Keep watching this topic, and I'll post it in the next couple of days.

p.s if you really have to render via a persp camera then the "farthest distance" parameter in the micro exporter might clip the mesh a reasonable distance from the camera.
Title: Re: How to reduce Terrain size which is exported
Post by: Phanindra Nath N on July 13, 2016, 10:19:03 AM
Thank you so much for your response.

I will try the steps that you specified, And let you know
Title: Re: How to reduce Terrain size which is exported
Post by: KyL on July 13, 2016, 05:52:06 PM
Try exporting a fbx instead.... simply change the extension to .fbx and export.


It spits out much much smaller files!  ;)
Title: Re: How to reduce Terrain size which is exported
Post by: Phanindra Nath N on July 16, 2016, 03:22:20 AM
Hi,

First of all, Thank you Oshyan Digitalguru and Kyl.

I have tried the steps that you specified.

Oshyan: I have set the Render camera in top view and I exported. The output terrain comes square, But If i using Orthographic Camera(In the camera nodes), The Terrain comes flat in the maya, But the using Perspective camera gives Terrain correctly.

Digitalguru: Thank you for your script(I get this script from thi link: http://www.planetside.co.uk/forums/index.php?action=search2 (http://www.planetside.co.uk/forums/index.php?action=search2)). I have tried to integrate the Terramen to Maya. In this tutorial(https://www.youtube.com/watch?v=IlxcmCoX82I (https://www.youtube.com/watch?v=IlxcmCoX82I)) you have specified to exporting from Maya animation to Terragen 3, But I have tried to create crowd animation in Maya, So how to export Terrain Texture(shaders) and lighting and Atmosphere from Terragen 4 to Maya.

Kyl: Thank you. .fbx format is really reducing the file size
Title: Re: How to reduce Terrain size which is exported
Post by: digitalguru on July 16, 2016, 05:36:56 AM
QuoteBut If i using Orthographic Camera(In the camera nodes), The Terrain comes flat in the maya

Shouldn't do, is your Orthographic camera positioned over the right area?

My script does export animation from Maya to Terragen, but it has limits. It won't export crowd animation or deforming geometry. It will export animated geometry with certain caveats (see the help file with the script).

It also can't import Terragen shaders / lighting / atmosphere into Maya. There would be little point when Terragen does it so well.

What it is set up to do is to enable camera animations to be synced up between Maya and Terragen. You can then render your landscape in Terragen, and character or hard surface animation in Maya, and composite the two, which plays to the strengths of both packages.

In fact I would only use an object animation exported from Maya to render shadows on the terrain in Terragen. The example of the biplane in the tutorial is really only to demonstate that it is possible to get some kind of semi-complex animation into Terragen.