• Advertisement

Archived

This topic is now archived and is closed to further replies.

Is there a .x Developer in the house???

This topic is 5903 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, let me try to explain this. I have a problem right now (ok, more than one, but one that I care about and nothing else a therapist or Church wont fix): I have used Truespace 5 to export a mesh using a version of TrueX that was out there as a plugin because everyone knows Truespace has an awful x file creator. When I try to add a point light to the scene I''ve created, everything but the ground lights up when i move around. I''m trying to get the light to stay with the camera to get a "walking around in the dark type of effect." The funny thing is, that if I hit a corner, the ground lights up and if i walk away from a corner, it is dark again. This happens on every corner of the flat plane. I raised my height above the ground to make sure that the light wasnt under the geometry, and it still didnt light the ground. The scene has 3 textures and it all looks ok in the x file itself. Anyone know what might be wrong? I can post some code if needed. Thanks, Paladin

Share this post


Link to post
Share on other sites
Advertisement
Not sure, but try looking at some of the triangles from the floor and making sure that the normals are pointing up toward the light source (maybe they got flipped?).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I''m no D3D expert, but I think I read something in some other post that might help you. Everything I say is not necessarily true, it is just my best guess.
Is your ground plane just 2 triangles? The way D3D does lights is it checks the vertices to see how lit they should be, and then makes a gradient between them. So, your light will only affect the ground if you are near a vertex (the corner), otherwise the corners are too far away to light the vertices and the whole thing appears dark.
A fix for this is to make your ground have more vertices (i.e. a grid of triangles rather than just two).
I think.

Share this post


Link to post
Share on other sites
I did check the normals and they were ok. You could see through the floor on the other side, but the 2nd post was right. I only had 2 triangles for the plane and i added a few more and that fixed my problem. Thank you so much for your time.

Paladin

Share this post


Link to post
Share on other sites
One other thing I learned from this event for other newbies out there:

If your light''s range is less than the distance between each polygon, you will have the same problem, so make sure your floor and light range match up. If this is wrong, then please correct me, but that is what seems to be the case. Now, if I can only get vertex fog working right.... . But that''s another post.

Paladin

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by SirPaladin
the 2nd post was right. I only had 2 triangles for the plane and i added a few more and that fixed my problem.

I was right?
Sweet

Share this post


Link to post
Share on other sites

  • Advertisement