Planetside Software Forums

Support => Terragen Support => Topic started by: Sami on June 01, 2008, 08:52:45 AM

Title: How to program a terragen plugin?
Post by: Sami on June 01, 2008, 08:52:45 AM
Hi,
   
  My name is Samuel Didier and I should use Terragen to generate skyboxes and terrains into my game created with the Torque Game Engine Advanced.
 
  I should program a DLL plugin (.tgp) for Terragen to help me in this job. We have some stuff to automate for the exporting.

  But I cannot find any source code or documentation about that. But I just find release plugins.

  So, I will very happy if somebody can give some informations around this problem.

  Thanks you very much.

Best Regards
Title: Re: How to program a terragen plugin?
Post by: Oshyan on June 05, 2008, 11:25:37 PM
Hello Sami,

The SDK for Terragen 0.9 was never publicly released so unfortunately you will not be able to create a plugin for your needs. An SDK for TG2 will eventually be available, however this will not be for a while yet.

Perhaps the functions you need would not require a plugin? Can you describe more specifically what you are trying to accomplish?

- Oshyan
Title: Re: How to program a terragen plugin?
Post by: Sami on June 06, 2008, 12:01:34 PM
Hi Oshyan,

  At first, I should generate a skybox. I found a Terragen script to help me for this case. But in the same time, I should generate a .dml file. It's a file used to load the skybox in Torque Game Engine.

  At second, I should export the terrain into Atlas system specific file format at Torque.
    The process :
      - Export a heighmap
      * for an unique terrain texture :
         - Export a terrain texture
      * for a terrain with blended textures :
         - Export the ground textures.
         - Export an opacity map.
         - Export a detail texture.
         - Export a lightmap.
      - Generate the Torque Script and run the Torque Game Engine to generate the Atlas files.

  The exporting steps can be done manually in Terragen.

  Can I create a program to run Terragen to do these steps?

Best Regards
Title: Re: How to program a terragen plugin?
Post by: Oshyan on June 06, 2008, 10:05:02 PM
I would think you could use a 3rd party automation tool like AutoHotKey (http://www.autohotkey.com/) to perform something like this, since it is possible to do manually in Terragen already. There are other scripting-based automation tools that may be even more appropriate. If you are familiar with coding you may already know of some.

- Oshyan
Title: Re: How to program a terragen plugin?
Post by: Sami on June 07, 2008, 05:50:08 AM
Hi Oshyan,

   Thanks you for your help.
   I didn't use a tool like AutoHotKey. But it will more faster to create a script than to program a plugin in C++ or VB.

Best Regards