Looking for "BlueScreen" trees

Blitz3D Forums/Blitz3D Programming/Looking for "BlueScreen" trees

Jack(Posted 2005) [#1]
Does anyone know of a place on the net where I might get pictures of trees and plants with a "blue-screen" type background.I've done much looking with no success.Plenty of pictures but everything has multi-colored backgrounds.

I really don't want to go into PSP or something and do the steps necessary to get the background to a zero color for transparency.I never seem to get really nice edges when I do that.

Obviously I want to make sprites with these.Anyone with some good thoughts?

Thanks


Uber Lieutenant(Posted 2005) [#2]
Make a tree model in TreeMagik or something, open it in a model viewer with a single-colored background and take a screenshot. It's a cheap shortcut, but it should do the job.


Barliesque(Posted 2005) [#3]
I think rather than an actual blue background, you're after a transparent background. Try using tree[d] by Fredborg. It allows you to save a snapshot of a tree with transparency.

http://www.frecle.net/treed/


Jack(Posted 2005) [#4]
Uber - Treemagik is not detailed enough.No Pine Trees for one thing.I explored using the models themselves also.Same deal.

Barliesque - Yes I want transparency but in order to get it the background needs to be all one color.I don't care if it is pink,orange or blue.However I'll check tree(d) and see if it provides this.

Thanks guys.


Jack(Posted 2005) [#5]
I went to Tree(d) and got the file but I'm always a little leary
of files from unknow places.

The site only showed some type picture with very little info.

Do you know anything about what exactly this code,or application,does? I hate to install it without knowing something about it.

Thanks


Tracer(Posted 2005) [#6]
Tree[D] .. well, maybe, just maybe, you never know, it MAY just make uhm... 3d trees?

Tracer


jfk EO-11110(Posted 2005) [#7]
Many companies are trying to sell them.
Here are a few:
http://astronomy.swin.edu.au/~pbourke/texture/tree/index1.html
http://www.alusion-fr.com/an1tex6.htm

BTW if you have a black background (or blue), then you maybe want to paint the RGB of the transparency color to something that looks better, because when you leave it black, the tree will have some kind of black outline (due to filtering).

So first you load it with the mask flag. Then you check all Pixels with readpixelfast. If it's a green tree you may want to use a green background color. Byside using any beloved background color all you need to do is set the highest Byte to Zero when it's a masked pixel, and to 255 when it's not, eg:

...
rgb=readpixelfast(i,j) and $FFFFFF
if rgb=mask then
 writepixelfast i,j,nice_bg_color and $FFFFFF
else
 writepixelfast i,j, rgb or $FF000000
endif
...



Jack(Posted 2005) [#8]
Tracer -Eh - Did I say I wanted 3d trees ???????????????????

jfk - It is not hard to make the background any color you want in PainShop as long as you start with a single color it is just one click.Thanks.

jfk - went to the listed site but they do not have enough selection.Also ,those trees do not look very real.They very well may be but something just didn't look good.


jfk EO-11110(Posted 2005) [#9]
Actually I wasn't talking about the difficulty of repainting a color, but about the need to use black as transparency color in masked textures unless you want to set the alpha byte manually, while black as mask color also results in a black outline. But if you gonna use them as textures, the sooner or the later you'll know what I meant.

Didn't find any better trees BTW, tho I searched for an hour or so. At least not for free. turbosquid and gamasutra.com may have better ones, for $$.


Jack(Posted 2005) [#10]
jfk - Thanks much for your efforts.


sswift(Posted 2005) [#11]
Jack:
Go to Turbosquid.com. Type trees. I'm sure there's some that are suitable there.


Wayne(Posted 2005) [#12]
http://vterrain.org/Hawaii/Flora/textures/index.html


Barliesque(Posted 2005) [#13]
Tree[D] .. well, maybe, just maybe, you never know, it MAY just make uhm... 3d trees?

Well done, Tracer. Yes, that's right: tree[d] makes 3D trees. ...As I said, there is a feature in tree[d] that will let you take a snapshot of your 3D tree. That would give you an image... a 2D image.

@Jack:
I don't understand why you need a colored backdrop. Are you aware that it is possible to create an 8-bit alpha channel for your transparency? This is by far the highest quality approach. By using a color mask, you don't get anti-aliasing. Or if you do use anti-aliasing, the mask color will appear around the edges of the image.

Do you know anything about what exactly this code,or application,does? I hate to install it without knowing something about it.

The author is a fellow Blitz3D programmer: Mikkel Fredborg --highly respected for various excellent code snippets you can find in the archive, and the finest lightmapping utility available: gile[s]. tree[d] is actually a plugin he wrote to allow the creation of trees within gile[s]---though it also functions as a stand-alone application. If you plan to create a lightmapped 3D environment, I highly recommend gile[s]. Check out the demo. Here's Fredborg's main site: http://www.frecle.net/giles/home.htm

To make a tree image with tree[d], run the application, play with the settings until you've constructed a tree you like, and the click on: File >> Render to File... Use the scroll bars to adjust to the desired angle, and click on Auto Crop. Make sure Output Mode: Alpha is selected (unless you're really sure that color masking is what you want). Then save, selecting PNG or TGA for the file format -- JPG doesn't support an alpha channel (can't recall whether BMP's do, but they're unnecessarily huge files).

Here's an example image saved from tree[d]...




Mustang(Posted 2005) [#14]
http://store.got3d.com/index.html

These are good.


Jack(Posted 2005) [#15]
Thanks much guys.

Something at one of those places should fly.

The problem with using "pictures" of 3d trees is that they just don't stack-up to pictures of real trees.Sprites are not a top flight choice for trees but 3d jobs are cycle-eaters when you use 100-200 trees.

As for the "bluescreen" deal maybe there is something I don't know about masking.If you take a regular picture of a tree on a lawn,for instance,the background will have so many shades close to the tree how do you go about masking,without taking forever? I hope I am missing something and with some info I could figure this out.

By the way - that Turbosquid site looks like it has some good stuff.


jfk EO-11110(Posted 2005) [#16]
I have released a background masking utility in the code archives some time ago. You can set RGB and a tolerance value and watch the result in realtime. of course, the backgrounf color should be at least kind of one color tone. Example given: a blue sky with diffrent shades of blue and maybe some clouds. The mask utility will ba capabl of masking it. It won't work with backgrounds that have other trees on it (green on green etc.).

And yes, now you still have the antialiased contours of the tree, that cannot be masked automaticly unless you use some kind of color tone recognition and replacement. It can be done, but it still needs some parameters. Let's asume your background is a blue sky: now (after the main masking process) ckeck all pixels RGB. if Blue is bigger than red and bigger than green, it must be some kind of blue sky tone, most likely a contour pixel. in this case simply swap blue and green to get a greenish contour pixel with the same brightness, so you can save the antialiasing.

But basicly you need good photo material. Sometimes it's useful to mask some parts manually before you use automatic tools (like masking the horizon etc.). But for pines it's also important to use a photo with the correct perspective since they are large (well, NO perspective at all, just a sideview would be best).

It seems like a simple job, but it's not.


Jack(Posted 2005) [#17]
jfk - thanks.

What you indicate is exactly the problem.There are not many pictures of a tree with no other trees or ground cover in the background.

I have done the masking in psp which does as you explain but it is difficult to finish without having a "blob" effect in certain areas.

Guess spending an hour or so per tree is the only way to get REALLY nice ones.Ugh.


wizzlefish(Posted 2005) [#18]
Tree[d] can only make three different types of trees, though.


sswift(Posted 2005) [#19]
So something like this is not acceptable?
http://www.turbosquid.com/FullPreview/Index.cfm/ID/211996/SID/249053/blFP/1

There's lots of products like this on Turbosquid. Just type in "trees". Many are expensive, but some like this aren't too expensive.

Of course, there's one other hurdle to be considered once you find some you like, and that is whether you can distribute said trees with your game. Many 3D asset makers don't allow you to distribute the products, making them useless for games. Some will allow it if you encrypt them though.


Jack(Posted 2005) [#20]
sswift - yes those are nice but $50 for 10 trees is REALLY expensive considering Treemagik can be bought for the same price and you can make what you want.I need about 100 different types.

Why don't I get Treemagik you say ? Because the don't support making "pine trees" of all things.They import nicely into blitz and look good but I probably need pines more than anything.

And they can be distributed too.So if I go with 3D I'll just wait till pines are added and we will complete the remainder of the project.


fredborg(Posted 2005) [#21]
Tree[d] can only make three different types of trees, though.
Erm, it can make an infinite variety of trees.


Tracer(Posted 2005) [#22]
Indeed it can.. just load different textures and you can have it make whatever type of tree you want... one of the artists i work with used it to make some seriously screwed up alien looking 'trees'.

Tracer