 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Miss Elaine Eos Guest
|
Posted: Fri Mar 23, 2007 7:10 am Post subject: IndexedTriangleStripArray + NormalsGenerator (lighting probl |
|
|
Short vsn:
I can't get my lighting to "turn on" WRT to my IndexedTriangleStripArray
(a "mesh" style terrain) and NormalsGenerator.
Code snippet:
IndexedTriangleStripArray terrain =
new IndexedTriangleStripArray (vCount,
IndexedTriangleStripArray.COORDINATES,
iCount,
siCounts
);
// Set up coordinates
[snip]
// set up indecies
[snip]
GeometryInfo gi = new GeometryInfo (terrain);
NormalGenerator ng = new NormalGenerator();
ng.generateNormals (gi);
gi.recomputeIndices();
I've verified that lighting is on by placing a few spheres around the
terrain, and they light correctly. In addition, the terrain displays
correctly and, in fact, even textures nicely (different bit of code.)
Btw, for lighting-testing, I'm turning off textures, as that seems to
interfere with lighting on my test-spheres. (Different question :)
Any hints?
Thanks!
--
Please take off your pants or I won't read your e-mail.
I will not, no matter how "good" the deal, patronise any business which sends
unsolicited commercial e-mail or that advertises in discussion newsgroups. |
|
| Back to top |
|
 |
Miss Elaine Eos Guest
|
Posted: Fri Mar 23, 2007 7:10 am Post subject: Re: IndexedTriangleStripArray + NormalsGenerator (lighting p |
|
|
In article <Misc-2FC69A.21232922032007 (AT) newsclstr02 (DOT) news.prodigy.com>,
Miss Elaine Eos <Misc@your-pants.PlayNaked.com> wrote:
| Quote: | Short vsn:
I can't get my lighting to "turn on" WRT to my IndexedTriangleStripArray
(a "mesh" style terrain) and NormalsGenerator.
Code snippet:
|
Snip. Nevermind, I think I got it. For the 2nd time this week, the
secret seems to be to flail for a while, then ask. Less than an hour
after hitting send, the answer appears! :D
After I get my code cleaned up a bit, I'll post it as an example to
other n00bs with similar problems.
It had to do with getting the material & textureMode right (MODULATE).
--
Please take off your pants or I won't read your e-mail.
I will not, no matter how "good" the deal, patronise any business which sends
unsolicited commercial e-mail or that advertises in discussion newsgroups. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|