Jump to content

Recommended Posts

Posted

because i was asked on how to light out a prop static in hl2 i made an image on how the lighting works. so take a look on this first

how_vertexlights_work.jpg

1. image this sphere is a vertex OR a lightingorigin which you may place as an info_lighting in hammer (and link it to a prop_static)

there are 2 lights in the scene. one comes from the upper left and the other one from the lower right. the camera direction has no light. due to that there is a dark line on the sphere in the middle

2. i stuck a cube with harden edges in my sphere. as you can see it is lighted like the parts of the sphere you can still see. that's a result of the vertexnormals you have on every polygon mesh.

3. here you see those vertexnormals. each polygon has them on its vertices. the result: a vertex can have n>=1 vertexnormals (math N means integers bigger than 0; N = [1, 2, 3,...] while n is an element of N)

take a look on the upper polygon. its really bright yellow. all vertexnormals are orientied to the upside yellow sunlight. so they say "ok polygon as to be yellow at my side. -> yellow gradient on this polygon

same is valid for all other polygons and vertices. imagine that each vertex is this sphere i showed in the first image. place the vertexnormal on the spehere and place the lighting of this point in the sphere on your polygons vertex.

talkin unprofessional: the sphere is a projection to all vertices telling the polygons vertexnormal how to be lighted.

4. interesting: if you soften edges (or work with smoothing groups) your vertexnormals get merged. so they are not like the facenormals. due to that the edge i softened has a vertexnormal pointing away from all lights in my scene. result: we got a yellow lighting at the top polygon that fades to a black lighting (no lighting) and fades to a blue lighting at the bottom.

knowing these basics you should understand why prop statics are dangerous to use in outdoor scenes. example:

take a look on de_train. there train railings at the bottom have an extrem bright lighting that hardly cuts to a dark one.

that is the result of the fact that there are 2 models using 2 different lighting reference points (info_lighting) the one is in the sun the other one is in the dark area. alle vertices of the prop static are referenced to this lighting point.

so take care of how you work with statics and props. there might be ugly bright or dark models in versa lighting situations because this info_lighting is in a different room or position your vertices are.

greets

hessi

edit: here is an addition that might help to understand my crappy english

how_vertexlights_work2.jpg

Posted

to be really honest, i don't really understand that tutorial :o

so much technical expressions and only 2 different color shades on various simple object examples. would've helped me more personally if you'd used real ingame examples of vertex lighting e.g. the train railings you mentioned on de_train.

not to annoy you or anything, just sayin that a more practical use concentrated tutorial would have helped me better at understand what you're trying to submit to the tutorial readers :/

Posted

It is great of you to do this work for the community, but I must admit that your tutorial tends to be more confusing than informative. I know how vertexlighting works already, but even then this tutorial seems a little confusing.

Posted

just saying "i did not understand" isnt helpfull at all. mabye you could say WHAT yout did not understand.

@ acumen:

in the pdf file i posted you see some screenshots of de_train. there you see how the vertexlighting creates disgusting graphics like full bright steel under a waggon or you can see how light lits a cylinder shape waggon.

i intended to show you how the technique of vertexlighting works and what you have to care about while working with prop_statics (which are always vertexlit). for example not making a model too big or placing it in extrem light contrast situations so that one side is bright even though the environment is completly dark. thats what turtle rock worked around on de_train at the railings on the ground i made an screenshot from in my PDF file.

anyway: if you do not understand some parts please tell me which ones or give me a hint where to add screenshots.

Posted

Fairly sure I get that, but is there a way to get around it without having your smoothing look ass?

For instace, with square railings is there a way to project the lighting from a 'soft' version onto a model that has 'hard' edges so you get a smoother light gradient? Hope that makes sense. I'd provided images, but for some fucking reason mapcore doesn't work for me at home.

Posted

those vertexlight gradients are always linear gradients. if you want a "softer" version of this gradient you have to tessalate your surface. there is no exponential gradient in the source engines vertexlighting. (i even dont know any engine that works that way).

if i understood you correctly you compare a completly smoothed cubes vertexlighting with the vtxlighting of a smoothed 64 subdivisions sphere?!

the only tweak that could help you getting a better result in that case would be anormalmap to directly influence the shading of each textelnormal (that's why you shouldnt call normalmapping a heightmanipulating shading effect. it's changing normals! parallel polys have the same normals. result would be a completly 1 colored normalmap)

you can mail me a screenshot of your problem too (maybe i missunderstood you)

Posted

np, it was just a theorectical thing anyway, hammer doesn't work for me at present. Thanks for explianing though, that normalmapping thing might be useful.

  • Mapcore Supporters

    aphexjh       Badroenis       celery⭐      EGO DEATH ⭐      Freaky_Banana      FMPONE ⭐      Harry Godden      JimWood ⭐      JSadones      poLemin      Vaya

    Funds go towards hosting and license costs, Discord server boosts, and more. If you'd like to donate, check out our Patreon announcement.

×
×
  • Create New...