Jump to content
  • Advertisement

PhillipClark

Member
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

119 Neutral

About PhillipClark

  • Rank
    Member
  1. Downloaded Asheron's Call. This is some weird stuff, man. 1999.
  2. Elizabeth Bailey and I just ordered an N64 with 7 games, ZOMG time to enjoy old times.
  3. Wow, those posts are way over my head inpus.pos is in world space (transformed in vertex shader), but the light_vector is just raw input, no transformations. Is that correct? Here are the lighting equations I'm using, from the book "Mathematics for 3D Game Programming and Computer Graphics": [eqn]\mathcal{K}_{diffuse} = \mathcal{DA} + \mathcal{D}(\sum_{i=1}^{n}\mathcal{C}_{i}max(\mathbf{N}\bigodot\mathbf{L}_{i},0))[/eqn] D = diffuse reflection color A = ambient intensity (should this be a float or a float3?) C = light attenuation * light_color N = surface normal L = normalized light vector [eqn]\mathcal{K}_{specular} = \mathcal{S}(\sum_{i=1}^{n}\mathcal{C}_{i}max( \mathbf{R} \bigodot \mathbf{V}_{i}, 0 )^m ( \mathbf{N} \bigodot \mathbf{L} > 0 ) )[/eqn] S = specular reflection color C = light attenuation * light_color R = 2*( N dot L )*N - L V = camera vector m = specular exponent N = surface normal L = normalized light vector Here is the dropbox link to the model: https://www.dropbox....pl6jls/kit2.obj
  4. So my light color, which is currently ( 1.0f, 1.0f, 1.0f ), needs to be something like ( 100.0f, 100.0f, 100.0f )? I tried this but it is still the same result. I am apparently missing some of the logic here. I'm not sure what you are talking about dividing by PI. I haven't seen any diffuse/specular calculations that use PI, unless you're talking about the actual physical model, not the real time phong model. I guess I should have specified Also my light position is at ( 5, 5, -5 ) so it's not a crazy distance away or anything. I have it coded so that I can move the light around so I should be able to move it close enough. I got the 3d model a while ago so I have no clue where it is online but I can upload it somewhere for you (no texture, just v/vn obj file). What's a good free upload place? Update: I can only get it to light the object if make the equation attenuation = 1.0f / ( d*d*0.00000075 ) or making the light color something ridiculous like ( 999999, 9999999, 99999999 ) but that's kind of silly, there has to be a better way right? Also, using that, I can't get the light to completely "fall off" no matter how far I move it away from the object.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!