Lusher Foliage
Blitz3D Forums/Blitz3D Beginners Area/Lusher Foliage
| ||
Yep. And I'm aware of and have used the grass and trees packages already. I'm not looking for sprites/billboards per-se... What I'm more interested in is a 'tall grass' effect. I mean that it would be hard to see. And a better LAWN effect instead of clumps or texture map. Am I asking the impossible? I, myself, am not sure how it could be done in a single renderworld. I guess since I've never seen it, I can't describe it, and maybe it's unreasonable/impossible in real-time. You guys like challenges. You all worked pretty hard on water. How 'bout this? I scoured the archives already and saw the wavy grass. Pretty good. Got better? |
| ||
I think the hard part is the transition from regular environment to being IN the tallgrass. And most of my regular lawn is a bitmap and is crap. |
| ||
Please draw a little illustration of what you want so that we can better see what you mean. |
| ||
Ok I fingered my iphone. Sorry ![]() |
| ||
Having done that... Hm. Maybe not so impossible with possibly 1 masked quad... But like I said- the transition into it might be clunky. And my lawn still stinks. |
| ||
Yes it is doable with either textured quads or with colored mesh shapes, but you need to make it with only a few surfaces or it will be to slow to render. Take a look at this : http://www.blitzbasic.com/Community/posts.php?topic=102163 |
| ||
I had commented on that very post. Yep. But I was thinking maybe it could just follow the camera and jump left and right every time we moved. This would provide the illusion of being 'in it'. Then it would only be 1 quad. |
| ||
or you could use some grasses made with vertices and triangles and animate them by moving their vertices (only one surface) |
| ||
Hm. Yyyyeah. If it were windy. How about lawn now? |
| ||
A good combination would be to combine a colors texture applied on the terrain where each texel is of the same color than a grass (1 texel each 0.5unit ? 1 texel each 0.25 unit ?) and have a fixed number of prebuilt grasses that you position around player depending on his orientation and movement. similar to this but also make it faster and also add different texel colors : http://www.youtube.com/watch?v=VFhOI-SB18s The idea is to determine where the player is going (with his orientation and movement), turn move the player, check which grasses are too far from player, reposition reoriente these grasses far enough from player on the side where he is going. The important thing to understand is that there is no need to be grasses meshes far away because their shapes will not be seen anyway... Only a pixel will be seen. So detailed shapes are necessary only around the player (it also depends where the camera is put, first person view ? third person view ? perspective view ? side view ? top down view ?) |
| ||
Here is another grass demo in Blitzmax+miniB3D http://www.blitzbasic.com/Community/post.php?topic=92844&post=1156387 and here the source of it: ORCSbillboard.zip As far as I remember it is very important that the grass texture color(s) must match the ground texture color exactly which gives a nice transition in distance. |
| ||
Hello, friend Krischan, his creations always leave impressed me and make me feel bad because I do not have the ability to do that. The question is: is possible to do something like this in Blitz3D, I mean the grass |
| ||
Krischan is a wizard. :-) But I think it's possible. I've given it a couple of tries and works fine for just walking/running over terrain. However I have different needs: besides walking/running I want a terrain o on which one can also jump/fly without it looking funny from different heights/angles. That's a real challenge and also where billboards suck imho. As usual I want too much. |
| ||
RemiD solved my grass issue in the youtube video. Possibly tall grass issue also. Is that b3d code available as a sample sir? (Please please please please!) |
| ||
Code in B3D. @Krischan There is a program to create textures SkyDome ?? |
| ||
Yes, please- first person view! |
| ||
Skydome? My BlitzSky Engine uses a dynamic skydome. In the ORCS demo, the skydome texture is somewhere from the internet, I don't remember. But it looks like a fisheye lense projection, I don't know how to create it. But I'm sure it has something to do with Sinus and Cosinus ;-) > Krischan is a wizard. Thanks. But I can assure you that I've only had enough time to figure some things out, there is no magic or witchcraft behind my code, rather dull mathematics :-D |
| ||
I honestly am very bad at math, I what I like is that you have a great talent for blending of environments and I am very nice colors the landscape of the demo. A greeting. |
| ||
RemiD? |
| ||
What ? oh this question was for me : Is that b3d code available as a sample It is not my code/demo or video, but you can find the link to the code/demo in the description of the video. But the result is slow for what it is, that's why i explained the concept with words. |
| ||
Thank you! That's promising grass, I must investigate and research this further. I noted 10K tris in the example. Too much for me. He says that loading grass might be space-consumptive, but I thought about cluster markers in a saved map that might allow a hybrid grass engine (also with some culling by distance) so that the level artist saves the grass markers instead of algorithmic generation being the rule. Perhaps cull also by which direction the player is facing. I may post a sample of some sort if I actually succeed. |
| ||
I observed that Krischan's statement regarding grass color being a close match to ground color is very accurate. It seems all-important to avoiding the criss-cross polygons being visible when looking straight down at them. Other designers than myself may avoid the issue by limiting the view angle of the player, but this problem doesn't go away if the player is standing next to a tall hill and turns to look at it. Interesting. Second point: Grass resolution. Large blades vs. small blades will also dramatically change the 'feel' of the grass 'roughness'. When I changed the bitmap of the demo to a set of masked lines, there was an instant change in the appearance of the whole countryside. The old grass then looked very different (coarse, like swamp grass) when I switched back. This is more an aesthetic issue. 3rd point: Yet to be researched for me is the effect of localization and reduction of polygons, along with polygon shape. My sprites, I mean. |
| ||
You should consider single-surface meshes with dynamic quads instead of sprites. My demo runs at a good speed using this technique (press "V" to turn Vsync off for maximum FPS and 1-8 to turn scene objects on/off). Only the visible vertices are manipulated at runtime and the grass patches are only updated once every 30ms. For blending, the grass texture should use alpha fading at the bottom near the ground. Masked textures would be faster but must be cut perfect. I chose alpha blending as it looks even nicer :-) |
| ||
You're absolutely right! Motion is SO important. I wasn't thinking straight. But I'll start stationary for testing. The blending may or may not be necessary for MY own application. Also someone had posted something about alpha object issues, and masked objects as I have observed have no such problem. This does explain why all the grass materials I'd found seemed to be masked pngs or tgas. I feel I should go through this carefully. All input is welcome. |
| ||
Here's all I want to show of how very pleased with the masked quad method I used. It only took 200 tris in my scene to create lush growth. I had to rewrite everything to work with my engine. I'm storing grass objects on my map directly. It wasn't so huge. I have NOT begun to wave my grass in the wind yet - but I plan to. ![]() Incidentally - It's not that I'm afraid of copyright issues (although that CAN be a problem), it's just that my engine is simple and not designed to look super-high quality. This is my choice as a graphic artist. I do not plan on publishing any of my work because it is of a personal nature. Ah! But don't be dissapointed - results of my research in the form of sample code will eventually be forthcomming - and amusing! Rule 1: I think everyone knows and can see how important color- matching any foliage to the ground is. I opted not to fade my grass because solid-colored grass can be matched close enough to hide the quads criss-cross pattern when you look straight down. By using this 1 bit masked bitmap, I avoid any depth-buffer conflicts in my scene. My past experience showed plenty of trouble with graduated masked images, so I kind of avoid them mostly and use just full-bright, masked, and alpha flags on my maps. Black is transparent, white is solid, and I use the brush color to control the color of my object. In this manner, the dynamic lighting I use affects them not at all. Very simple. |
| ||
Can't wait to see it in action/code. I have a particular interest in the subject as I made it a bit of quest to find the perfect grass. Uh.. let me rephrase that: perfect foliage code. :-) |
| ||
Well, I've had good luck with 3ds max 5 and saving grass as a single object to my maps thus far... It will now be only a matter of counting vertexes and greating a 'simplified dumb tau' formula to save our frame rate from degradation. We WILL also want the option of multiple grass meshes that can be culled By visibility! I will supply several example scenes with several example maps. OTHER than grass and plants, the bitmaps may kinda stink. Sorry in advance. My own program has built-in weather. I'll supply a simplified wind segment in the sample. Those interested will also want the max scripts to make their own .b3d maps. I will include those as well. You'd want to utilize the 'b3d pipeline' for max also. I have NUMEROUS maxscript tools that I use. Anybody with old max 5 with questions? I may be able to help you. Max can be troublesome. |
| ||
Wow.. That really sounds interesting. Now I'm really curious. I heard some one here mentioning .3ds is an unsuitable format for buildings cos doesn't create sharp edges. Any idea if this true? |
| ||
3D Studio Max is a purchase application for windows by Autodesk. It is for 3D what photoshop is to 2D. Some prefer Maya. These are expensive applications. I never use .3ds format. I store all my work in native .max files. The b3d pipeline exporter for 3ds max (by pudding) produces nice, neat .b3d files for my scenes. I can choose to eliminate smoothing from my meshes in max. http://www.onigirl.com/pipeline/B3dPipeline.zip http://www.onigirl.com/pipeline/Max6_patch.zip hm... http://www.maxplugins.de/r9_files/chouls/Max9_Patch.zip Theoretically up to Max2008 Not 64 bit. Information on its usage is readily available: http://playerfactory.proboards.com/board/1/b3d-pipeline I have a fair .b3d importer thing also. pipeline works up to max 9. It is EXCELLENT. Handles bone meshes and complex scene heirarchies. I wrote a level exporter wrapper maxscript too. Here's my 1st sample. More may take a long time... https://sites.google.com/site/mikorians/Foliage%20Demo.zip?attredirects=0&d=1 Wow, the site with the .zips is disolving. I hope pudding will fix things. All that's there is the one .zip. The patch for max 6 7 8 is missing. The forum is a new, good link though. This tool is ESSENTIAL to getting objects out of max and into blitz! Without it, you've got squat. |
| ||
Trying to grass. they think?![]() ![]() Demo Here: https://db.tt/p7Abu7Zm |
| ||
LOVELY demo, Yue! Good job! :) |
| ||
Yes, it's very nice! But I'm trying to minimalize polygon count not bump it up to 33k. |
| ||
I was trying somekind of grassy thing too and works, sort of.. but the more dense the lower the FPS of course, so not very useful for slow systems. See here: http://www.blitzbasic.com/Community/posts.php?topic=102163#1236577 |
| ||
Did you see my amusing wheat field? :D |
| ||
Yup, I was expecting the police to come bustin in any second. ;-) |