Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java 3D > IndexedTriangle...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 740 of 818
Post > Topic >>

IndexedTriangleStripArray + NormalsGenerator (lighting problems)

by Miss Elaine Eos <Misc@[EMAIL PROTECTED] > Mar 23, 2007 at 04:22 AM

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.




 2 Posts in Topic:
IndexedTriangleStripArray + NormalsGenerator (lighting problems)
Miss Elaine Eos <Misc@  2007-03-23 04:22:23 
Re: IndexedTriangleStripArray + NormalsGenerator (lighting probl
Miss Elaine Eos <Misc@  2007-03-23 06:35:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 13:31:47 CDT 2008.