fake lighting

Blitz3D Forums/Blitz3D Beginners Area/fake lighting

Steven Noyce(Posted 2006) [#1]
For a school project, I am trying to make my own way to light a mesh. I know that this is way easy to get this effect, but I am trying to understand how blitz works and make my own function. I have tried, and got it to sort of work, but it still has issues that are confusing me a lot. Here is what I have so far. Please help me figure out how to get this working!

http://www.freewebs.com/blitznerd/lighting/lighting.zip
My lighting attempt


Steven Noyce(Posted 2006) [#2]
I am seriously getting anoyed with my links not working. I have copied and pasted the code from the FAQ and replaced the website and link name with what I want to call it, but none of my links ever work! Why not?

Anyway, just copy and paste the top one into your browser and it should work fine.


Sir Gak(Posted 2006) [#3]
Your links just take me back to this very page. Deja vu all over again.


Steven Noyce(Posted 2006) [#4]
I know! That is what is frustrating me!
But anyway, as I said before, just copy and paste the first one into your browser and it works!


b32(Posted 2006) [#5]
That is because freewebs does not allow any direct links to files, because people would miss out on the banner. Right-click it and choose "Save target as" to get the file, or link to a page containing the (file)link.


Ross C(Posted 2006) [#6]
With blitz lights, basically, dx lights, the vertices are lit, in accordance with the vertex normals of the mesh. The distance from the light also comes into consideration here too. What exactly are you trying to achieve? Are you wanting to light the vertices yourself?


Ross C(Posted 2006) [#7]
Ah, i see. I'm sorry i'm not much good at comprehending dot products (or spelling for that matter :D ) I see what you mean though. Try inverting the Y vector?


Ross C(Posted 2006) [#8]
I reckon it's your mesh. You code seems to work fine on a sphere.


Steven Noyce(Posted 2006) [#9]
Cool! Thanks for the help! I made the mesh in blender by subdividing a plane and adding noise. I guess that didn't work so well, so I will need a new mesh.