L3DT users' community
Large 3D terrain generator

Plugin idea - doable?

Correspondence concerning plugins and scripts; development, use, bugs and ideas.

Plugin idea - doable?

Postby holtt » Tue May 08, 2007 6:22 pm

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
holtt
New member
 
Posts: 8
Joined: Mon May 07, 2007 11:50 pm

Postby Aaron » Fri May 11, 2007 1:07 am

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.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby holtt » Mon May 14, 2007 3:42 pm

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.
holtt
New member
 
Posts: 8
Joined: Mon May 07, 2007 11:50 pm

Postby metalliandy » Mon May 14, 2007 7:29 pm

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
metalliandy
Doyen
 
Posts: 103
Joined: Tue Mar 20, 2007 11:28 am

Postby Shealladh » Mon Jun 11, 2007 6:46 am

Hiya Tim, this look very nice indeed.

How is this coming along?
I take solice from the fact that I know nothing...compared to the rest of the world.
Shealladh
Contributing member
 
Posts: 49
Joined: Fri Sep 29, 2006 1:52 pm
Location: Melbourne, Australia

Postby Aaron » Mon Jun 11, 2007 11:06 am

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.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Alexander » Mon Jun 11, 2007 9:47 pm

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.
Alexander
New member
 
Posts: 2
Joined: Thu May 24, 2007 12:44 pm

Postby Aaron » Fri Jul 13, 2007 1:18 am

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.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia


Return to Plugins and scripts

Who is online

Users browsing this forum: No registered users and 2 guests

cron