Im currently deep into my game project at the moment.
Ive just finished setting up a dynamic lighting, dynamic loading system & Level of Detail on distant objects for Poly count and animation optimising.
anyways at the moment im coding a Day Night Cycle and can change the lighting positions & settings, the skybox color & mesh. But im getting a little annoyed at animating mist.
Yeh you guessed it GLSL because we are in the year 2013. I know the commands are broken for changing anything to do with it. But one thing ive noticed on these forums that people have acknowledged the problem, but nobody has presented any viable alternatives or solutions.
The Yo Frankie method of using Nodes on every single material seems to me a bit excessive just for fog or distant haze. Im not even sure you can even adjust the color in realtime. (this is a must)
Are there any GLSL Vert/Frag 2D filters that can utilize the Z depth of the scene or maybe a Ray sensor attached to the camera. Can anyone offer any solutions?
How viable would it be, and what advantages are there to completely text coding materials in GLSL other than using nodes & material editor.
2D (screen) filters can access the depth texture, so you should be able to get the Z depth of the scene and fade objects out easily that way.
Text shaders gives you more control, while nodes are easier to set up and visualize. Obviously, you can’t do everything with nodes, but you can do a surprising amount with them. Text shaders also overwrite the material setup, so you’ll have to set up everything from scratch (including shadows), whereas node materials can be built on top of other materials.
Solar you have given me an idea to try, im going to intergrate Object Color and alpha into the LOD module and basically use an action to fade in/out either the color or alpha according to distance from the camera. : E2a Doesn’t work
As for Terrain and Planes/sky im still trying a few things.
Thanks, thats just what im looking for. I don’t mind extra work or code for nicer results as you can see.
This stage is definately the most intensive, but affects how the rest of the game will function.
For indoors im using Zones for different rooms and once triggered lights & objects are replaced according to location.
i had some issues with libload and lighting but basically made a script that allows them to be swapped easily.
for the levels themselves trees, grass, rocks are linked into the level, the level is libloaded into a master blend along with The player, HUD & Weapon.
I’m getting closer, at the bottom of the blender wiki page linked below does it the Yo Frankie way as ive decided to choke up and use it for every object. With linking datablocks from scenes its not so bad.
last thing i need to do is find a way of manipulating elements of the Node group so i can adjust distance and color Realtime.
if i find a way i’ll let you know.
Edit: B2.65.8 Word of warning dont link materials and shader nodes too much from file to file, my tree asset and entire level blend has become currupted. I lost a few hours work.