Page 1 of 1

Plugin idea - doable?

PostPosted: Tue May 08, 2007 6:22 pm
by holtt
I've written a piece of software that paints terrain with little "trees" as part of a research project here at Oregon State University called GNNViz. The trees density is determined by real tree density data (represented by grayscale tree density masks.

I was thinking it would be interesting to have it work in L3DT as a plugin, either using the attributes map to determine where trees go, or an external tree density mask (which is what I have). The current program is written in C using the "GD" graphics library, primarily to just do image merges of little tree pictures on top of a base image.

I see that the API has pixel-level get/put functions. Are they an efficient way to copy/merge sub-images into a larger terrain texture image when there are literally hundreds of thousands of little tree images to be placed?

Here's a small (512x512) version of what kind of image I'm talking about....

Image

Here is a sub-sample of the full scale image...

Image

You can view the much larger and much finer detail version at http://www.fsl.orst.edu/lemma/gnnviz/im ... posite.jpg

PostPosted: Fri May 11, 2007 1:07 am
by Aaron
Hi Tim,

At the moment there is no nice API feature to composite images this way, but it will be fairly trivial for me to add this as an extension function. Are your tree overlays RGBA images?

Best regards,
Aaron.

PostPosted: Mon May 14, 2007 3:42 pm
by holtt
aaron wrote:Hi Tim,

At the moment there is no nice API feature to composite images this way, but it will be fairly trivial for me to add this as an extension function. Are your tree overlays RGBA images?

Best regards,
Aaron.


Correct, just RGBA, with A being used as a mask for transparency.

PostPosted: Mon May 14, 2007 7:29 pm
by metalliandy
Hey all,
Sorry to change the subject a little...
@holtt
I noticed you are using the Torque engine for your project...the trees are amazing....Are they all pre built models or generated in real time?
It would be great if you made the code available to everyone :)
What are the plans for the software? open source?
maybe you could make a plug-in/content pack for torque too.
It would save allot of people allot of work as getting many trees in game with good FPS is a hard job...How did you do it?
Please email or PM if you dont want to respond here...I am really interested. :)
My email is metalliandy666@[removethis]tiscali.co.uk
Again sorry for the hijack :S

PostPosted: Mon Jun 11, 2007 6:46 am
by Shealladh
Hiya Tim, this look very nice indeed.

How is this coming along?

PostPosted: Mon Jun 11, 2007 11:06 am
by Aaron
Hi Shealladh,

I think the state of play is that we're waiting on me to write a plugin that exposes a 'nice' extension function for overlaying images using alpha transparency. Not really hard, just hours in the day... (it's on the to-do list)

Cheers,
Aaron.

PostPosted: Mon Jun 11, 2007 9:47 pm
by Alexander
I really like the look of that first shot. It would be interesting to combine this with "vegetation maps" so that actual trees are placed along with their corresponding images.

PostPosted: Fri Jul 13, 2007 1:18 am
by Aaron
Hi All,

Just a quick update: I've started on the plugin to do image-blending, and I'll include it in a dev build of L3DT Pro in the next week or so. Note that the plugin won't have a user interface as such; to overlay images you will have to use the appropriate script calls, and I will post examples of how to do this when the plugin is released.

Cheerio,
Aaron.