I do not see that option in JME 3.0 and 3.1
Can you help . Thanks a lot.
Also I found other tools like SimArboreal-Editor and Forester.
Can anybody create a small 10 min video of how to use them in my project ?(I did not find documentation for them in wiki) .
I will really appreciate you .
Unfortunately there is no grass in 3.0 or 3.1. If I remember correctly, Forester’s documentation is slim to none and caused constant crashing with 0 functionality for me. Your best bet is to look around on the internet for how to create your own foliage system and write one from scratch. I’ve written a very very basic one, but it’s outdated and not well optimized. It’s not a hard feature to write, and if you’re proficient with GLSL, adding wind and other effects is also very straightforward with the vertex shader. Here’s a basic rundown on how I did mine.
Create a template mesh (a bunch of randomly scaled and rotated quads with random offset) and batch it into 1 mesh.
For every place you want grass (on a grid based on the size of the template mesh), attach the mesh. With 3.1 you may also be able to use instancing if your card supports it, but in 3.0, I used batching.
Instancing is bad for grass. Performance-wise this is somewhere between separate objects and one batched mesh… but closer to the several objects side. Instancing only makes sense when you have larger objects. (like trees)
Ah, well you learn something new every day! Batching was definitely a huge performance improvement when I wrote my own grass system last year. I just figured instancing would work well too, but I guess I don’t understand instancing as well as I thought.
Instancing is one draw call to the driver… but the driver itself still has to setup each object and render it one at a time. So yes, you do gain a lot of performance in something like JME because you lose the impact of JME’s per-object costs.
But it’s small in comparison to batching… and for grass where you can get away with three or four vertexes per object, batching is an easy win.
When I import the tree in jme which I made in TreeEdtior it says : error opening .j3o.
I put all textures in Texture folder.
Also when I try to link it to my scene it gives Error:
Oh… it is fantastic . thanks Paul .
It also imported wind animation. can you explain about how does this animation work?
because I do not see any bone in tree.
I am sorry if my question seams stupid . (I am a novice).
I’m pretty sure, that there are no bones needed. I think he did it with shaders. I just downloaded the source, but when you look into “assets/MatDefs”, there are a lot of *.vert and *.frag files. I think the reason for using shaders instead of bones is the much higher performance.
Take a look at “SimArboreal-master\assets\Textures”. In this folder you should see an file called “leaf-atlas.png”. I would swear that this is the location you may change the the leaf-texture. But keep in mind, I’m no expert in this, I just looked around in the source code.
EDIT: Forget it! Sorry, I wasn’t in the SimAboreal-Editor-file anymore. But I’ll take a look at it and give feedback, if I will be able to
EDIT 2: As far as I undestand at this moment, SimAboreal-Editor is using the “SimAboreal”-Library, which contains the above mentioned atlas-file. I’m currently not at home, so I can’t “install” both of them… maybe this evening. I think the editor uses the file from the library. If so, you could replace it with an alternative texture and check out how it works.
EDIT 3: Read the next posting! Paul should be the best person to answer this question
There is no official way to replace the leaves in the editor… but you can provide your own atlas texture to the material or I believe you can include your own (with the same name) in your own assets directory and it will override the one from the jar.
I have a request from dear core developers of JME.
Please document such cool things like GrassBanana and and IsoSurface and so many others in Wiki.
So it will make it easier for beginners to learn them and save a lot of time. Thanks
Just in case you get stuck with GrassyBanana, here a link with a working example at the end of the page: Thread
You just need to create a terrain with the build-in terrain-creator and link to it within the script.