also had fps issue, but merged all particles from blender into one mesh.
also i replaced .gltf material generated via blender that was looking like above screenshots in sdk, but ingame was issues. so replaced with j3m created file, so it look nice ingame too.
what do you think? (i think there will will be issue with things like flashlight but now its not visible)
To be honest, I’m kind of guessing at the issues each time because you just show a picture but don’t mention what’s wrong. So I try to guess by what looks wrong to me… but I don’t know what it’s supposed to look like.
So I’m guessing you are complaining about the shadows of the early tree being quad shaped? I’ve never tried semi-transparent textures with PBR and shadows so maybe it’s broken.
overall this topic is about how to best do leaves in JME.
i explained i did double-faced quads. so i had issue in SDK preview that backfaces were Black.
so next i checked this ingame, but had fps issues anyway, so like said i merged all quads into one mesh to optimize and i re-applied default blender .gltf imported material with created one(first it was PBR and was dark, for some reason, but i dont complain about it, but about “shadows” on mountain - arround tree, that should not be there ):
Material My Material : Common/MatDefs/Light/Lighting.j3md {
MaterialParameters {
NormalMap : Repeat "Models/common/nature/trees/3/leafs1Normal.png"
DiffuseMap : Repeat "Models/common/nature/trees/3/leafs1BaseColorTransparent.png"
}
AdditionalRenderState {
}
}
so once i used lighting material, the issue with shadows on mountain no more exist.
please note this shadows that were arround tree looks like some PBR transparency issue? because its not default light shadow there.
anyway still this topic is about same. it is: what is the best way to achieve nice looking optimized tree with leaves in JME
is your tree generator using PBR material, or Phong?
Also you use double-sized quads there? or dupplicated quads with opposite normals(or maybe its some very low-poly tree)
as i remember mythruna had a nice trees (dont remember now if blocky leaves)
how many tris you think one tree should have? (for better(not best) video cards) .
1500?
but i thought it will look odd. Your videos proved me that it can look really good.
once it always look in camera, there even dont need to be many of this quads.
also its much easier to animate them.
i think your solution is very good
why i did my solution this way, is that as you can notice. i got one branch that i dupplicate using tree normals of particles in blender (so root of branch always start from tree)
so trees look really nice.
but your solution without using branches, just a leaves, looks really nice too, and can be dynamic, animated easly.
so now i have headache what to choose
edit:
haha, i used “leafs” in every post thinking its proper word, while i should use leaves
There is an updated PBR shader that you can get if you use JmonkeyBuilder with the Simarboreal plugin, I use it for my trees and am happy with the results.
Just to quickly share my input, using Simarboreal for my trees has definitely been the best way I could find - and I’ve even reused the simarboreal shaders on some of my other foilage models for the nice wind effects
I just watched a video on trees that basically explains how to generate them procedurally. If you haven’t already subscribed to this guy you probably should.
He draws them in 2D. In my head it starts with a cylinder of n vertices and you work your way up, reducing the radius with each recursion. A bit of noise here and there and you’ve got yourself a tree generator.
You just described SimArboreal, actually. But I based my code on stuff I read about fractals and L-systems in the 90s so it’s probably no surprise.
I also separated SimArboreal into two layers. There is the simple L-system that generates the branch structure and then there is the layer that turns that into a mesh. So anyone wanting to write a more complicated full-feature L-system could feed the output into the mesh generator.
(Which also lets one specify a very specific tree structure if they want to.)
I’ve used your tree editor quite a few times. With some careful tweaking it can create some really nice trees with reasonable vert count. The LOD control is really cool. Often times, though, I find myself wanting to know “how it works” and end up writing my own just to understand it more than anything. It’s an annoying trait.