L3DT development blog
Large 3D terrain generator

News for October 2007

October 9

Functions, lots and lots of functions...


We're presently waiting for some QA to finish for L3DT release 2.5b. In the mean-time, I've started work on some of the new goodies planned for L3DT release 2.6. Today I'll describe the changes relating to extension functions, and in particular, new calculation functions.

Firstly, in the next release there will be ~200 extension functions available in L3DT for use by plugin developers and script writers. Here's a screenshot of the FuncBrowser plugin, showing just the heightfield functions:

(click for larger view)

All of L3DT's heightfield functions are now there, including fluvial/thermal erosion, perlin, fractal, plateaux, etc, etc. This is all a plugin developer / script writer would need to make their own complex terrain algorithms such as L3DT's 'Design/Inflate' algorithm. Indeed, to make sure everything works properly, I'll be implementing some new terrain algorithms in plugins myself, including new versions of 'Design/Inflate'.

People with long memories may recall that I've been planning this feature (customisable heightfield algorithms) since L3DT release 2.3. There have been a few false starts, but I think we're well on the way to that goal now.

Still on the subject of extension functions; one new function that will be particularly useful for developers is 'calcman.RunCalcScript'. This function takes as an argument another script (as a string), and runs that script within L3DT's calculation manager thread. Here is an example of running the 'calc.HF.fractal' function in the CalcMan's thread to generate a new fractal heightfield:

calcman.RunCalcScript "calc.HF.Fractal <m:HF> 11 0.65 1000 false true"

By wrapping script calls in 'calcman.RunCalcScript', the script will not block L3DT's user interface until it completes - it will run in parallel like all of L3DT's core algorithms. The script will also be able to make use of L3DT's multithreaded progress dialog, allowing the user to 'cancel' the calculation, and also (optionally) providing decorations such as time estimates and result previews.

Anyway, it's going to take a little while for the full impact of these changes to be realised. I have yet to write all the documentation and examples to show plugin developers and script writers just how to use all these new tricks…and that might take a while. Nevertheless, things are in progress.


2011/01/13 07:34
l3dt/2007/oct.txt · Last modified: 2017/08/31 07:22 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
L3DT Development Blog RSS Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki