You know what? There’s no problem anymore! I simply reopend the file, and it works!!! :D:D:D I remember that my graphics card asked for a driver update some days ago… But I cannot find out why the previous version was already outdated, as it had been installed very recently.
Benj, as result, I have’nt tried your code… Do I have to?
Thank you sooo much for helping/support! And sorry that the problem was so silly…
How do you get a normals png file out of blender after baking the mesh? Similar process to using the ortho cam render in the previous step to bake the mesh as a heightmap?
The mouse-controlled camera movement is stuttering even on a fairly recent 16GB AMD FX8320 (EVGA GTX 660 Ti 3GB) system despite the game engine maintaining 60fps. Whether this is a game engine issue or a script/logic problem in the .blend remains to be seen.
Hi,
This is amazing! But i just fall through the world when using physics. I have collisions set and everything. What else do i need to do?
Thanks loads,
Tommy
Just an idea, dynamic shadows could be made similarly to how the collision is made, and even use the same plane as the collision, since it is separated from the actual ground mesh, it could receive shadows, maybe?
I understand the function of the heigthmap, but not the textures and the stencils:
Ok, the stencils are the zones where the materials will be placed, like Mat Man addon (i’m not sure). So, if the materials have the textures… what is the function of the texture channel in the lod? Is not more simple and easy to make like MatMan addon, in each texture color, put the coordinates of each material?
And, where i had to put the height, texture and stencil maps? In the LOD mesh, or in the collision mesh?
EDIT: And how can i put the height and the normals in a same texture chanel? The same question for stencils, but here, i ask too: how can i convert three black and white textures to only one RGB texture?
It could be this way, like martinsh did, i think.
You put the textures in the LOD mesh of course
Dont know how to make height and normal in one single texture, if this is even possible.
To make the stencils in one single image, use nodes, add color ramps to each stencil, making them blue, red and green, then mix them in one texture. or better, add them to one pure black texture. i would do this way.
You take your normal map, and add a mask to it (in photoshop or gimp), then use the black and white height map for the mask. So that the dark areas are transparent, and the white areas are visible. The terrain and grass shader then read the alpha value and displace in the Z direction depending on the alpha.
The texturemap texture is just a sprite with the diffuse, specular and normal maps in one image to speed things up. Using custom textures you just need to create a sprite map similar to the one included, with the textures lined up in the same way.
The stencil map, just paint onto your height map with Red Green and Blue brushes to control where the textures appear. Red shows the first texture, Green shows the second …etc
Thanks for ask.
But, the texture channel in the LOD, are only for make the autoescalable textures, or is indispensable for the correct work of the LOD? If i don’t interested in the autoescalable textures, can i dispense with the texture channel?And, can i put the heights, normal and stencils maps in differents channels?
And, for finish, the size of the heightmaps and stencils are limited?
I just read through the thread and I am quite impressed with the progress. I will definitely be using this in several projects I am working on, which I will share after I complete my UAT. I hope to be able to use this with a spherical terrain map, but I don’t have any progress to show at the moment. If any subscribers out there have had any success implementing this on a sphere terrain, I would be interested to see your work.
@LFDA: klauser is right on the way to create the textures (photoshop/gimp -> mask, etc.). You have to keep the same order of texture is textures channel in order to make the shader work. So you cannot put the height, normals and stencils in differents channels that the ones originally used. But if you don’t want to create so much textures, you can put pure black instead of specular maps, pure white instead of diffuse, pure white instead of stencils, pure white instead of lightmap, and if you don’t want to create normal maps for each material just put the basic blue ( R=0.5/127 G=0.5/127 B= 1.0/255 ) instead.
And no, the size of textures are not limited (expect by the bge itself). I suggest to choose the size accordingly to the needs: a stencil map doesn’t need to be as detailed as the height map, etc.
@Captain Andrew: this system work like this: the python code move the mesh on the X/Y axis, then the shader moves the UVS to replace the textures and terrain deformation at the right place. So the detailed areas of the mesh is movable.
You could keep this same system but instead of moving the plane, you could rotate the sphere on 2 axis. Instead of using UVs, you’d rather use a basic spherical mapping, in order to change the longitude and latitude of the mapping, according to the rotation of the sphere. Make a sphere rotate by step to always show its most detailed area to the player is not that difficult, the main problem is in mapping the texture to make it match, in the GLSL shader. You should really look at this : http://en.wikibooks.org/wiki/GLSL_Programming/Blender/Textured_Spheres
I’m sorry that the texture creation process is complicated, but the custom shader is limited to 4 textures slots on many hardwares; so I had to put everything in only 4 files Please ask if you need any help!
I started to work on this again, on dynamic drop shadows! I used the idea from Thales Kruger: the collision mesh is used to receive the shadows. Here is what I have for now:
The shadow only appear near the player (dynamic shadow on all the map at the same time would be way too expensive).
The shadows smoothly fade out when the player walks away.
It’s still work in progress…
Aloha benj, thank you for the insight and of course welcome back. I am sure everyone else who is following this thread will be glad to have you working on it again. It looks like it could be plausible to implement this in my project, however it will be tricky. Thanks again for the additional feature, I will be testing and will post any significant developments.
First of all thanks so much for all the hard work and hours you have both spent on putting together an excellent terrain example in the BGE. I plan to actually use this for a work product to demonstrate the use of Game Engines as an instructional tool.
To weigh in quickly the system that I am running this from and will mainly be posting feedback from is as follows: Processor: Intel Core i7-3840QM Processor (8M Cache, up to 3.80 GHz) OS: Windows 7 (64 bit) Graphics Card: NVIDIA Quadro K2000M Graphics with 2GB DDR3 Memory Memory: 16 GB DDR3 - 1600MHz Blender: 2.67b
This is my first result, of course I need to tweak a few things but I wanted to post it and say thanks. Will be back with more results soon. Keep up the great work its amazing to see how far you have come. I read the whole thread, start to finish!