Creating and Importing Objects

From Terragen Documentation from Planetside Software
Revision as of 02:20, 11 January 2014 by Matt (talk | contribs) (fixed a link)
Jump to: navigation, search
Work in progress.jpg

Introduction[edit]

This page talks about creating and importing objects. Terragen has a number of built-in objects and can also import object files in several formats. There is also a description of what happens when an object is created and how to access its settings. Finally there is a section on troubleshooting imported objects.

Importing Objects[edit]

TG supports importing several object files:

  • Terragen Object (.tgo)
    Terragen Objects or TGOs are TG's native object file format. This is the format which is best supported by TG but no other applications support it. You can find objects in this format, the best example of which are the Xfrog plants. TGOs include geometry plus texturing and materials, including procedural texturing.
  • Wavefront OBJ (.obj)
    Wavefront OBJ is a popular object file format. This is the best option for importing objects into TG, if they aren't available in TGO format. OBJs include geometry as well as image map based textures and materials.

  • Lightwave LWO (.lwo)
    Lightwave LWOs are objects in the LightWave format. This format is the least well supported is deprecated. You should use the OBJ format instead.

Although TG3 does support the FBX format it doesn't yet support importing objects/geometry via FBX.

You can find more detailed information about the supported object formats in the Import-Export Reference.

It's easy to import objects into TG. There are a number of ways you can do it:

  • The File Menu
    The File menu has two items for importing objects. The first is the "Import Object" item. This has a submenu which allows you to choose the format you want to import. You can also choose to import the object as a population. When you choose one of these items an Open File dialog opens so you can choose the file to import. The second menu item is "Import Object from Library...". Choosing this will open the Library window so you can browse through objects to import.
  • The Objects node list
    When you click the "Objects" button in the main window tool bar the Objects node list is shown in the top left. At the top left corner of that you'll find the "Add Objects" button. Clicking this button pops up a menu that has several items. The first item is "From Library..." and choosing this will open the Library window allowing you to browse objects to import.

    The next item is the "Objects" item. This item has a submenu which allows you choose an object type to create. This submenu also contains TG's built-in objects, such as the Grass Clump and Rock. To import an object you need to choose one of the "Reader" objects. For example if you want to import an OBJ file you should choose "Obj reader". Choosing an item from this menu creates a single object, as opposed to a population.

    The last item in the menu is the "Population" item. This works just the same as the "Objects" item except that a population is created for the object.

  • The Library window
    The Library window allows you to browse through objects and choose which one you want to create. You can open it from the File Menu or "Add Objects" button as described above. You can also open it from the View menu or the "Library" button in the main window toolbar. You can find more information about using the Library here.

  • The Node Palette
    You can also import objects by using the Node Palette. You can create individual objects and populations this way, although it's not quite as easy as using the other methods.

Creating Built-in Objects[edit]

TG has a number of built-in objects. These objects range from simple geometric objects such as planes and spheres to more complex objects such as the grass clump and rock. You can create all of these as individual objects and many (though not all) of them can also be populated. You can see all the built-in objects in the Node Reference.

The easiest way to create the built-in objects is to use the "Add Objects" button in the Objects node list, as described in the previous section.

Another way to create these objects is to use the Node Palette.

An Object is Created, What's Next?[edit]

When an object is created or imported one or more nodes are created for it. If you're creating an individual object then at least one node for the object itself will be created. When you create a population a Populator v4 node is created, along with the node for the object itself. If the object has materials and textures then nodes for those are also created. All the nodes that are created are connected together so your object is ready to go.

You can access the object node parameters by selecting the node in the Objects node list. If you've created a population then both the population node and the object node are accessible in the top level of the Objects node list. You can tell the difference between the nodes either by their names or by looking at the icons for the list item. An object node icon looks like a single box. A population node icon looks like a stack of three boxes.

You can also access object node parameters using the network view. Double click the node to open its parameter view.

Some nodes which are created for objects are created in the internal networks of other nodes. For example when you create a population the object node is placed in the internal network of the populator node. Another example of this is that nodes created for object textures are placed in the internal network of object nodes. This is why you will normally only see one node added to the Network view even though many nodes may have been created. You can tell if a node in the Network view has nodes in its internal network because the node will have a plus sign drawn on its right end.

To find out more about working with populations please see the Populator Guide.

Objects will be visible in the 3D Preview. For more information about viewing objects in the 3D Preview please read the Object Display in the 3D Preview page.

Troubleshooting Imported Objects[edit]

An object appears to be lying on its side
This is most likely to happen with the OBJ Reader. Some 3D apps use the Z axis as the "up" axis, whereas TG uses the Y axis for "up". To fix this go to the parameter view for the node and switch to the "OBJ Options" tab. Now check (or uncheck) the Source Z up parameter. This will cause the object to be reloaded with the correct orientation.

An object seems like it's the wrong size
TG uses metres as its unit of measurement. If the model is using different units you may need to scale the model appropriately in TG using the Scale parameter of the object node. If the model is one you've created you can also export it using metres from your 3D app.

The OBJ Reader node has a special setting if your model uses centimetres. Check the Source in cm setting in the "OBJ Options" tab. This will reload the model with the units converted from centimetres to metres. This parameter was added with Xfrog vegetation models in mind.

An object is sitting too low/high on the terrain
Objects are positioned based on their origin. This origin will have been set in the app used to create the original object. For objects used in TG it might be worth setting the origin so the object sits on the terrain nicely. For example you might have a tree model with roots. If the origin was at the bottom of the object, below the roots, then the roots would be sitting above the terrain and the tree would look like it was floating. If the origin was placed where ground level would normally be, near the top of the roots, then the tree will sit on the terrain much better.

A LWO object isn't showing any textures
TG doesn't support loading textures for LWO objects. We strongly recommend using the OBJ format instead.


Back to Working with Objects

Deprecated items are still supported and available to use but their use is not recommended. Such items will be removed at some point in the future. In most cases an alternative is recommended and that should be used instead.

The Node List is a part of the Terragen interface that shows a list of nodes along the left side of the application window. The Node List generally shows only those nodes that are relevant to the current Layout (e.g. Terrain, Atmosphere). It sometimes includes buttons or other controls that are specific to a particular Layout as well. The Node List is hierarchical and each level is collapsible.

In a graphical user interface (GUI) on a computer a toolbar is a row, column, or block of onscreen buttons or icons that, when clicked, activate certain functions of the program.

A parameter is an individual setting in a node parameter view which controls some aspect of the node.

A single object or device in the node network which generates or modifies data and may accept input data or create output data or both, depending on its function. Nodes usually have their own settings which control the data they create or how they modify data passing through them. Nodes are connected together in a network to perform work in a network-based user interface. In Terragen 2 nodes are connected together to describe a scene.