About the plugin.
I would like to use the terrain editor with the plugin to place trees and grass, and I hope I get time to sit down and do it some time. The plugin is just a plugin to make the jar easier to access, like Normen said, and its basically just a placeholder at this point (until later this week when i get the javadoc ready). And even then it will just be the core paging engine, not the grass or trees.
I’ve been talking with some people at the university here where I live, gonna check if i can get more people in on the project to speed things up. They have school projects and stuff. Nothing been decided yet tho.
Also I had some problems today. I was gonna commit, but subversion didn’t think anything had changed so it refused. I have re-built the nbm and I have changed the jar and library (and also checked to update version automatically), but it did not think anything had changed. Gonna have to look into that.
Excellent that you want to look into imposter generation with normal maps and all. I dont think you need to bother much with specular maps unless your trees are made of gold. I have thought about trying out simple quad based imposters where I have the object rendered from four sides for each side of two crossed imposters (one facing the z axis and another the x) and fade/dissolve the quads depending on angle to the viewer. Perhaps the effect would be too glitchy though.
As for grass and tree foilage I have been studying both Oblivion and Skyrim and see a big difference between these. Oblivion uses camerafacing impostors and you get rather funny effects when you stand under a tree and rotate around. The impostors are centered so every leafimage turns around rather funnily. Naturally, this is very cheap and they can add many of these on any single tree to make it look good and detailed, when playing you normally dont notice this so it works brilliantly. In Skyrim they are using many more quads and they are fixed on the trees. As for grass I see they make patches of several quads that cross intersect with each other to create some volume. I am sure these are turned into single quad impostors at a certain distance also. They cover the ground very well so that tiling in the landscape is not very visible, although when you get up in height like a mountain or a tall building, the tiling of the textures on the terrain becomes rather obvious. I guess some rocks and pebbles might also use impostors although I guess you can get far with simple LOD on these to reduce the number of faces. Oh and yes, Skyrim looks fantastic.
@johncl
Ok, this is some good news actually. Being that those games are known for their awesome graphics I am happy to report that the grass-system I’ll be using (which is pretty much the same as in the original paged geometry) is very similar to theirs. The grass mesh can be chosen to be a cross-quad or a regular quad or billboards, but I’m not gonna bother with billboards (neither for tree-foliage nor grass quads).
Also, for vegetation like small bushes and stuff, and rocks, the treeloader can be used just as well. I guess the grassloader is mostly for vast amounts of small grass covering a significant portion of the ground.
My first idea was to use the original system and let people choose between using a mesh with either quads or crossquads, then fade grass out a a certain chosen distance, but I guess i could use 2 detail levels like with the trees, using a single quad mesh after a certain distance and fading between the two. The system for fading and the two different mesh types are already supported anyways, so implementing it is trivial.
Fading isn’t that expensive really with the “stippling” method, since it doesn’t use alpha, so i guess its no need to shy away from it for performance reasons. I guess I’ll include a single detail-level, single-quad mesh alternative for a low graphics option.
When it comes to shadowing, I’m considering adding the shadow system similar to that described in Gpu gems 2. It needs to be real time shadowing, so you can have like an environment with day and night etc. Raycasting to the main lightsource i guess will have to be used somehow.
This sounds like a lot of stuff to be done, but most of it is finished already. The fading is already in place, the mesh generation and density map stuff is already in. Shadowing is the bottleneck, i suppose. But I will release it shadow-less at first.
By the way @Sploreg and me have been extending TerrainGrid over the last days so that the instance that creates new TerrainQuad’s can easily be replaced, a first version is a TileLoader that loads the TerrainQuads from j3o files. This could easily be used for computing other things like grass etc as well, especially as its already multithreaded. The new TerrainGridTileLoader interface might get a small change still but apart from that it all works nicely already. Next step is adding this to the Terrain Editor… Combined with your geometry paging system large detailed worlds will be possible :o
@normen
Sounds great. It would be nice to integrate this stuff even further, especially since terrain and terrain-height values are so important.
Of course the grass and trees should also be possible to store as j3o objects once they’re generated and all. Though it is possible to remove trees and grass etc and regenerate meshes etc, and do everything procedurally, I guess it would be good to have that option. I know i most certainly will use it myself.
I committed the core engine now, again. I think it was updated. Keep in mind its just the core engine atm. and its basically just to try the process out, see that it works, and that stuff end up where its supposed to, etc.
Should be documentation now. Both on the classes and the methods.
Did I miss the repository location? Is it in the jmp plugins? No clue…
@ghoust
I’m sorry but there seems to be some problem with it still. I am still figuring out how to get it to work 100%. Also tbh it may be some weirdness cause they just went into beta and had to fix some stuff, but its probably just something wrong with how i add it.
Anyways, this plugin isn’t much yet, only the paging engine, so honestly I wouldn’t bother getting it at this point, and also I will write that in the module info when it is working again. You could say the paging engine plugin is sort of a dry run for the actual grass & tree generator.
I have big plans for the paging engine as a stand alone module as well tho. One thing i will make a video of later is about partitioning a world into zones and sub-zones in which areas can be defined by arbitrary curves. That could be used, for instance, to structure a large mmo type game, or maybe to set up a proper soundscape (like change the walking-sounds depending on what kind of ground you’re walking on etc).
Working hard on the grass now. It’s currently being generated as a crossed quad mesh close by, and a single quad mesh at some distance with fading in between the two levels of detail. There’s some issue with visibility now I’m working on. Seems to be bounding box related. When that’s fixed I guess I will wrap up the “forester” code (that’s the working name), and make a module. Grass first, then trees being added later.
@ghoust
Hmm I see it under the “downloaded” section of my update window. Maybe that’s just me though because I sit on a copy by default.
It ought to be available, with info and licence, and javadoc. If it is not feel free to post here, I will fix any problems.
Put up a new video of the grass. Its almost done now.
Oohh nice. Wind animations working now.
Doing one last push now before releasing the plugin.
Wrapping the grass up, doing some final tweaks, writing some documentation etc.
Re-enabling multi-threaded loading. It’s not a lot of work, the api is “wired” for it already, but I turned it of while debugging.
Created a facade, with factory methods etc. It’s gonna be the link between the lib and the rest of the application. Wrapping things up there as well.
Gonna make a net beans module, a (real) demonstration video and a log entry when its done. I think it will take about 1-2 weeks, but I’ll probably put it up in a couple of days, then make a few subsequent updates.
I pulled the grid stuff out of the paging engine now. Pages does not have to be geometry pages anymore. Gonna update the plugin.
Multi-threading is back in, but it’s still pretty crude and “blocky”. The batching class in particular needs some work. I think I’m gonna experiment with using a separate mutex for each of the mesh buffers, rather then using the lock of the mesh itself. That and some other stuff.
Anyways, updating the grass and tree stuff now after the changes.
All these posts are tempting. Can you please post a video?
Yes I cannot wait to see it in action
I guess you’ll all be able to just install the plug and run an example class very soon
the grass vid in the first post is from just a few days ago, but i will make a proper demo video for when its “released”.
Looking good!
haven’t really decided on how to toggle the physics objects in the treeloader. guess an alternative to use only the objects in the same page as the camera should be available, as well as an option to have physics available for all visible objects. Or maybe it should be possible to set it to any number of pages within visible range.
Made all methods of the FastRandom class non-static. The class is just 1 long variable + a few methods, better just instantiate it where its needed.