Population Instance Caching
Population instance caching is a feature of the Populator v4 node (new in Terragen 3 ). Instance caching uses a file to store population instances instead of having to recalculate them, which can sometimes be a lengthy process.
The basic workflow for instance caching is to finalise the population and then save an instance cache file. The next time you load the project the instances will be read from the file instead of being recalculated.
Saving an Instance Cache File
When you have finalised your population you can save an instance cache file. This is very easy to do:
- Go to the populator node's parameter view and click the Cache Settings... button. This opens a Cache Settings window.
- Click the Save Cache button to save the cache file. Population instance cache files have a ".pop" extension.
The cache file reading related parameters are automatically set up to read the file you've just saved.
If the population needs repopulating that will be done before the cache file is saved. This makes sure the cache file accurately reflects the current settings of the populator.
Loading an Instance Cache File
It's easy to set up a populator to use a cache file:
- Go to the populator node's parameter view and click the "Cache Settings..." button. This opens a Cache Settings window.
- Check the "Use instance cache" checkbox.
- Click the file parameter button on the right to choose the cache file.
The populator will load the instances from the cache file.
Hints and Tips
If you move or rotate a population the cached instances will not move with it. The cached instances are fixed in the positions etc. they had when you saved the cache file. This is why you should wait until you have finished editing the population before you save a cache file.
Repopulating using the "Populate Now" button or the populate menu commands will turn off instance caching.
If you make a change to a population but want to go back to the cached instances make sure the Use instance cache parameter is checked and click the "Read Cache" button in the Cache Settings window.
Cache Settings Window
The Cache Settings window is opened using the "Cache Settings" button in the Populator v4 parameter view. It's where you save and load instance cache files. When the Cache Settings window is opened for the first time a Populator v4 Cache Settings node is created in the internal network of the populator node. You can also open the Cache Settings window via that node in the network view.
This is what the various controls do:
- Save Cache button: Click this button to save the instance cache file. If the population requires repopulating this is done before the file is saved.
- Use instance cache: Check this to enable loading instances from a cache file. You can choose the cache file using the parameters to the right.
- Read Cache button: This button will reload the instances from the cache file. You might want to do this if you've accidentally repopulated or something.
There is still some work to be done on the interaction between various Populator v4 params and the instance caching. For example some parameter changes would mean that if you repopulated the instances would no longer match those in the cache. This should turn off instance caching but currently that doesn't happen.
Deleted or modified instance information is not saved to the cache file yet. This is saved with the populator node in the project file. Modified instances are saved in the cache so you will see your modifications when using a cache, but not the information to reset them. That's part of the information saved to the project file.
Working with Populations
This page introduces you to populations and how to work with them.
Population Instance Editing
This guide describes how you can edit individual instances in a population to precisely control your scene.
Tutorial: Population Colour Tinting Techniques
This tutorial shows you how to use the tinting tools to change the colours of instances in lots of interesting ways.
Tutorial: Masking Populations with Inverted Fractals
This tutorial shows you some methods to create distinct bands of objects in overlapping populations.
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.
A parameter is an individual setting in a node parameter view which controls some aspect of the node.