(September 2016) Monthly WIP screenshot thread

what started out as: not being happy with the current grass solutions… is turning into something quite interesting:

20 Likes

The ground texture looks a bit weird, but this grass is really sweet! Is it static or does it move in a sweet little breeze :stuck_out_tongue:

Just because I’m curious, what is it about the IsoSurfaceDemo’s approach to grass that you wish to rectify with your approach?

Yeah and what is actually your approach @thetoucher ? Almost looks like you have grass blades…

@SimonBedard the ground texture is ass, really low res, it’s not really important at this stage. the blades do sway in the breeze.

@pspeed TBH I didn’t look into IsoSurface’s grass, I’m sorry I meant no offence to other grass solutions, it was more a reflection on my own knowledge of grass techniques. Anything I’ve used in the past wont work, I don’t think anything billboard related will meet my unrealistic set of goals.

@nehon - geometry shader, there is a mesh of points that cover the ground where the grass is, the geometry shader adds a ‘clump’ of around 8 random individual blades at each point on the mesh.

There is zero optimisations atm, as a result, each of the around 400k individual 3d blades in the scene above is unique :open_mouth: … cool but not ideal.

2 Likes

(:ghost:) I’m a ghost (:ghost:)

Dat grass ! 420 ! Would blaze it !

More seriously, I’m really interested to know what’s your plan on this matter and how far you want to go ?

There is a solution to grass right now with the almighty @pspeed IsoSurface solution but it is not really integrated with TerraMonkey (If I’m not mistaken?)

You can take a look at my attempt to make a plugin integrated with TerraMonkey :warning: [here] (https://hub.jmonkeyengine.org/t/how-to-grass-reborn-the-forest) and there :warning:

It’s not impossible to do as my grass just plots on whatever mesh you want. I will never integrate it myself because I don’t like how JME terrain works. There are a handful of critical early decisions that I’d have picked the opposite approach and ran far in that direction. Not wrong in a general sense by definitely wrong to my own sensibilities. :slight_smile: (starting right with the 2x2 loaded grid…)

But anyway, the raw part of the code should be possible to extract and point to any mesh. The grass plotter just looks for up-facing triangles and checks the density of a noise function before plotting a grass “tuft” triangle.

Only thing I can show this week.

10 Likes

Testing the audio , animation and input synchronization of Jpony editor. This is my final phase of testing. I’m going into full development of my first game next week :smile:

6 Likes

Have you thought about rewriting jME’s terrain system yourself?

First, I have no time really. Second, the main component of JME’s terrain system is the editor in the SDK. Rewriting that is a pretty huge undertaking.

Third, if you supply your own terrain then I sort of already have. :slight_smile: It’s not difficult to adapt the IsoSurface stuff to height maps. I did it already for a back-burnered game project Dragonfly Odyssey.

7 Likes

The only reason i still work on classical terrain is that i never managed to implement that transvoxel algoroithm, or any other lod supporting voxel mesher…

Easy LOD is imho the one big advantage of classical heightmap with a grid mesh

If the voxels are based on a heightmap then the LODs are easy to generate.

The edge stitching that JME’s terrain does is completely unnecessary. Just dropping edge skirts is enough to seal the gaps at the LOD boundaries.

Even if IsoSurface isn’t used for the terrain generation, the paging library is already more flexible for plugging things in (like rocks, trees, grass, whatever… at different grid sizes) than JME’s terrain will ever be.

Plus, it is sensibly based on center cell + radius grid instead of the odd 2x2 choice that I remember JME’s terrain uses.

Edit: someday I may provide a traditional height mapped terrain generator. I almost did it for Dragonfly Odyssey (it does for the far terrain) but I liked the meshing of the voxel version better in the end.

2 Likes

Well, the big benefit of iso data based terrains are caves, overhangs and so on. If you plainly rely on heightmap data i think a simple grid based solution work better.

Yeah, i was not defending jmes terrain, i use a custom build grid with a global paging service.

writing on the phone so no long detailed answer…

For Dragonfly Odyssey, I did this at first because it was easy… but I went back to the IsoSurface version even though it’s just based on a heightmap because for some reason the mesh looked better. Nicer curves or something… I don’t remember exactly but having the vertical ‘cliffs’ subdivided was nice for some reason I don’t recall.

Try pizza terrain, (for even way easier lod) i had very good results with it (and it is damn fast) (i saved an orignal post from someone else in the internet here for future use)

http://i.imgur.com/H35PV.jpg

I think this approch with the newer tessealtion shaders could also work for a 3dtexture heightmap.
Do a cylinder instead of a slice, and modify all vertex position to the next fitting border (up or down) in the 3dmap.
Lod could be done nowadays by not using a fixed mesh with lowering density of vertices, but by using a tesselation shader.
The real advantage here is that you can directly scale the quality based on framerate and other factors, as no geomtry building phase is required.

3 Likes

The down side is that it becomes harder to accurately manage all of the other LOD’ed stuff like grass and trees… which will still likely need to be grid based at least.

Also, this may not still be true but I found vertex displacement in shader to be slower than simple meshes… a per frame cost versus a tile-boundary-crossing cost. Perhaps on modern cards the texture lookups in vertex shaders are fast enough and the pipeline issues that causes aren’t as big a deal.

core functionality:

  • Work on colour variation
  • move LOD calculations into the shader
  • make the grass propagate across an arbitrary mesh
  • improve wind - currently with only one random octave it looks more like an ocean

extend core for person project:

  • make it so the grass can be flattened, by say, a tank

future future :

  • include normal information and make it a fur shader
  • hijack the animation system and make a human hair shader

then

  • profit
6 Likes

video shows LOD debugging, zooming in to show difference between 3 levels of LOD :
0 - blue, closest, full detail
1 - yellow, medium, half detail, half density, double thickness
2 - green, far, quarter detail, quarter density, 4 x thickness

it’s not configured to look good from above, only really from ‘eye’ level, for now.

It also shows rotating around the grass, since its not camera aligned there is no weird spinning effect

17 Likes

Are you running SSAO as well?