Pericolos0 Posted February 1, 2009 Report Share Posted February 1, 2009 So I hear that source now supports proper per-vertexlighting with self shadowing in static props, like unreal basically. Has anyone been able to get this to work? I can't find any answers on it, yet i know it has to work, i've seen it in episode 2. I'm trying to create some rock models and get them to light properly, but they just seem to take light from their origin point, like in old versions of source. enabling or disabling "disablevertexlighting" and "disableselfshadowing" doesnt seem to make any difference. Anyone have any clues? Quote Link to comment Share on other sites More sharing options...
Erratic Posted February 1, 2009 Report Share Posted February 1, 2009 Put, -staticproppolys -staticproplighting in the $light_exe path of expert compile mode. Those values in the prop_static don't have any affect unless these two lines are ran in the compile. Also, make sure they go before -game. Should do it. Why this isn't done by default yet is strange. Quote Link to comment Share on other sites More sharing options...
Pericolos0 Posted February 1, 2009 Author Report Share Posted February 1, 2009 thanks, but it doesn't seem to make much difference though . Is it possible that it just doesnt work with a light_environment? It seems to be working with a point light entitiy i placed, but im not sure.. heres a pic of my current situation: you can see i placed an orange light entity in the shadow area, it seems to be lighting the rocks and rockets nicely, but the environment light doesnt have any effect on the props self shadowing.. All these models have pretty high tesselation so they should have nice vertexlighting. Quote Link to comment Share on other sites More sharing options...
Erratic Posted February 1, 2009 Report Share Posted February 1, 2009 I wonder if source randomly chooses to take the lighting from one light source. Or maybe the environment light does just take precedence over the point light... Quote Link to comment Share on other sites More sharing options...
AlexM Posted February 1, 2009 Report Share Posted February 1, 2009 As I understand it there's an ambient cube generated every unit or so in the map (1x1x1 envmap with a color on each side for directional lighting) that is a combination of the sum of all the light sources at that point in space. The model is lit according to the closest ambient cube to the pivot of the model. -StaticPropLighting should override the pivot lighting method and make all the models per-vertex lit (you should see an extra phase for it in VRAD if it worked). -StaticPropPolys is supposed to get rad to use the model itself for shadows rather than the bounding box, render time go way up when you use this. valve wiki descriptions here http://developer.valvesoftware.com/wiki/Vrad Quote Link to comment Share on other sites More sharing options...
Pericolos0 Posted February 1, 2009 Author Report Share Posted February 1, 2009 I got it to work now. I turned off the normal map in the material file, and it worked properly. Seems like the source engine is still really really ancient. Unless there is a special material setting that makes normal maps work with vertex lighting, I'm going to have to use my oldskool texturing skills to make these rocks look cool ;o. But I guess normal maps+static lighting will always be a problem, it's still a big issue in unreal3 aswell.. Thanks erratic and spicytanuki =)! If anyone more info on this or tips, would be appreciated very much! Does it work with lodsteps? Quote Link to comment Share on other sites More sharing options...
AlexM Posted February 1, 2009 Report Share Posted February 1, 2009 can you post a pic so we can see the difference? Quote Link to comment Share on other sites More sharing options...
Pericolos0 Posted February 1, 2009 Author Report Share Posted February 1, 2009 yeah sure without normalmaps: with: you can see in the first picture the lighting is correct, with shadows in the rock creases and rock casting shadow on rock. In the second picture, backfaces are lit, and the meshes just take their lighting info from their origin point. It looks kinda nice in the first pic, just a shame theres no normal maps.. source is really showing its age. I think i have some tricks up my sleeve though to make the rocks look kinda "nextgen" =) Quote Link to comment Share on other sites More sharing options...
AlexM Posted February 2, 2009 Report Share Posted February 2, 2009 I never noticed that before! Well at least now I no longer regret not adding normal maps to some props I thought I should have Quote Link to comment Share on other sites More sharing options...
robert.briscoe Posted February 2, 2009 Report Share Posted February 2, 2009 That was an interesting find, I personally never use normal maps in Source just due to the lack of compression on them and that they just dont look that good in the engine either. I personally think your rocks look much better without them anyway! Quote Link to comment Share on other sites More sharing options...
Pericolos0 Posted February 2, 2009 Author Report Share Posted February 2, 2009 That was an interesting find, I personally never use normal maps in Source just due to the lack of compression on them and that they just dont look that good in the engine either. I think you can get good looking results now with the added phong shading, but it only really works in certain situations and with certain materials, like metal. And it needs to be on a prop without shadows ofcourse . And yeah the lack of compression is a pain, 4mb(!) for a 1024*1024 nm. There has to be a way to compress them better in source. Quote Link to comment Share on other sites More sharing options...
Minos Posted February 2, 2009 Report Share Posted February 2, 2009 hmm I save all my normal maps with the same template I save my diffuses (compressed texture) ;o Quote Link to comment Share on other sites More sharing options...
e-freak Posted February 2, 2009 Report Share Posted February 2, 2009 afaik the normalmapping selfshadowing only works on dynamic light sources, such as the flashlight. there are no "real" normalmaps used in ep2 but normal-holding textures with directional ambient occlusion to render out the perspective shadow drawing implied by one or more dynamical lightsources. kinda strange the standard lightning doesn't work out in this case though but I'm sure there's a workaround for this as well. On the texture size problem: you can easily compress the textures, as mino mentioned, with the standard compression methods of vtex.exe. Quote Link to comment Share on other sites More sharing options...
Synthesizer Posted February 2, 2009 Report Share Posted February 2, 2009 I used to use this http://developer.valvesoftware.com/wiki/360g which added some compression to the normal maps. It generally looked quite artifacted however.... Quote Link to comment Share on other sites More sharing options...
AlexM Posted February 2, 2009 Report Share Posted February 2, 2009 hmm I save all my normal maps with the same template I save my diffuses (compressed texture) ;o It does kind of mess them up, not super bad but a few times I've done that and seen something that looks like jpeg compression cubes in my normals. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.