hi all, so a lot of you have been told by me already, with probably more detail than you cared to know, that i am writing a new renderer for the game
i have gotten things to a stage where its pretty much displaying things as it was, but now i have more control over the graphics pipeline and performance is more under control more things are possible. here's where things can get interesting
right now theres a diffuse colour that gets applied to everything based on environment settings in the map (outdoor maps are different diffuse colours per time of day, indoor is always bright), and a shader colour that gets applied by the shader objects you can place in maps. these shader objects allow you to either make things brighter, tint stuff, or make fake 'shadows' under things. this is tedious to set up though.
i'm looking at the possibility of a dynamic lighting mode where things are drawn with lighting done on the GPU, for people that don't want it the old method would be there and shader objects used to create the old lighting effects as a fallback.
how many lights would people really use? i'm looking at the possibility of needing like up to 128 point lights to illuminate a very large cave. outdoors you'd be able to set a morning, day and night light position and colour/intensity
the biggest part i need opinions on is an idea i have, to use something like half life 2's 'materials'. this sort of thing gets used in unreal engine 3 as well. basically, a material is texture + information about it. this could be what foot step sounds are used on it, what particle effect and sound it uses when bullets hit it, what shader effects to apply to it, its friction, all sorts of stuff
here's 2 hypothetical ones i came up with in the staff forum
this would let people set filtering and effects on things per material. a texture pack could swap materials, meaning your texture pack texture could make all sorts of changes to the texture
the animated water thing could be a material with 2 textures set to swap every second or something
so yeah, any suggestions, does this sound reasonable to everyone?
i have gotten things to a stage where its pretty much displaying things as it was, but now i have more control over the graphics pipeline and performance is more under control more things are possible. here's where things can get interesting
right now theres a diffuse colour that gets applied to everything based on environment settings in the map (outdoor maps are different diffuse colours per time of day, indoor is always bright), and a shader colour that gets applied by the shader objects you can place in maps. these shader objects allow you to either make things brighter, tint stuff, or make fake 'shadows' under things. this is tedious to set up though.
i'm looking at the possibility of a dynamic lighting mode where things are drawn with lighting done on the GPU, for people that don't want it the old method would be there and shader objects used to create the old lighting effects as a fallback.
how many lights would people really use? i'm looking at the possibility of needing like up to 128 point lights to illuminate a very large cave. outdoors you'd be able to set a morning, day and night light position and colour/intensity
the biggest part i need opinions on is an idea i have, to use something like half life 2's 'materials'. this sort of thing gets used in unreal engine 3 as well. basically, a material is texture + information about it. this could be what foot step sounds are used on it, what particle effect and sound it uses when bullets hit it, what shader effects to apply to it, its friction, all sorts of stuff
here's 2 hypothetical ones i came up with in the staff forum
basically my idea is instead of setting this in the entity, you set it in the material, then you set what material the entity uses.in content/textures there would be .dat files in there. for routes 96,16,16,16 with no lighting you could have
a dynamically lit translucent material with anistropic filtering and that refracts lightCode:{"Material"{MAT{{"TexturePath"{str[Routes]}}{"Texture"{rec[96,16,16,16]}}{"Filter"{int[0]}}{"Lighting"{int[0]}}{"ShaderParams"{str[]}}}
Code:{"Material"{MAT{{"TexturePath"{str[HypotheticalTexture]}}{"Texture"{rec[0,0,256,256]}}{"Filter"{int[3]}}{"Lighting"{int[1]}}{"ShaderParams"{str[AlphaTest,Refract|0.3]}}}
this would let people set filtering and effects on things per material. a texture pack could swap materials, meaning your texture pack texture could make all sorts of changes to the texture
the animated water thing could be a material with 2 textures set to swap every second or something
so yeah, any suggestions, does this sound reasonable to everyone?