it’s a very stupid title of the topic, I know - But I don’t know how to describe it more precise.
Half a year ago, I stopped my little project in jMonkeyEngine because of my school exams - Now, that I’ve installed the latest nightly build, the textures of the terrain look really bad… I used normalmaps and a triplanar rendering, but the code is too long to post ist here - I’ll look, that I can shorten it to show you, what I’ve done. (The code is the same one that I used half a year ago)
This is how it looked in january:
(And I was very proud, that jME could create such cool textures )
Now, it looks like this:
I looked at the terrain examples in the jMETests, and I did everything just like they did - Has something changed in the rendering or was this old cool look just a bug, that has been fixed?
I hope, that you understand my problem,
You first picture has the textures stretched out, so it looks all sandy. The second picture is what your texture actually looks like. To stretch it again, use the “matTerrain.setFloat(“DiffuseMap_0_scale”, grassScale);” call on the material
You can add in a Depth of Field filter to blur the far away stuff to achieve a similar effect.
But there is something that needs to be added to the terrain material eventually: a way to blend detailed textures as you get farther away from them, so you don’t get the result that you have in picture #2. But that is not on the drawing board yet.
Hm… the stretching of the texture works, thanks for this. But it still looks like in Picture #2, because there aren’t these bright colours and shadows… (I didn’t change anything of the shadow rendering or the texture)
If I just stretch the texture, it looks like one color (brown).
you might have stretched it too far then. Play around with it a bit, or set a less detailed texture as the base texture and paint on more detailed textures in places
Ok, I think that I’ve got the right scaling now… But the shadows are still disappeard.
Do you know, if something of the shadow rendering has changed? (Picture #1 = shadows, Picture#2 = No shadows)
Anyway, thanks for your (quick) help!
EDIT: ShadowMode of the TerrainQuad is CastAndReceive…
You need a BasicShadowRenderer in your scene as well to cast shadows.
The code has changed a a decent amount in the time since you used it last. I suggest looking at the test examples again and add in pieces from them until you reach your desired look.
I could create a nearly same look, but I think, that this old shadows were just a little bug, that has been fixed. (Unfortunately :D)
Anyway, thanks for your help - Maybe, I’ll look over it tomorrow again, but now I’m too tired. Thanks.
You can try increasing the brightness of the light. Also consider adding an ambient light.
In the old versions of jME3, the ambient light was based on the regular lights and stacked up the more lights you added (which was incorrect). In the new version you can now explicitly add an ambient light to specify how much ambient you want.
Ok, with modified textures, it looks better now… But i still couldn’t cast shadows on the terrain.
The shadow mode of all nodes is CastAndReceive, there’s a BasicShadowRenderer, the light’s direction, strength and so on is alright - With a LightScatteringFilter, I can see, that the light is calculated allright. Even the other nodes (characters, objects) receive shadows, but they don’t cast shadows on the terrain…
EDIT: I’m trying to simplify my code, so that I can post it here… Sorry about that
Funny, now they’re there… But the shadows are very weak - Is there a way to create more “dark” shadows or to make them “stronger”?
(Sorry, no idea how to express that :D)
I think there’s a setShadowIntensity method …