accumulator and incostent winding

Started by
5 comments, last by yakovm 14 years ago
I have a mesh in which not all surfaces are winded consistently in same direction also I don't know the direction of any face if it is CW or CCW .In order to solve the problem I use accumulator buffer and two side lighting one time with false and then save it to accumulator and second time with "true" and send it to accumulator too. And finally return from it (I use following commands glLightModelf(GL_LIGHT_MODEL_TWO_SIDE glAccum(GL_ACCUM ) What you do think? What the possible pitfalls could be?
Advertisement
I am trying to use culling but It seem it didn't work
what do you think
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);glCullFace(GL_FRONT);glMaterialfv(GL_BACK, GL_DIFFUSE,matCol);//render here .....(back faces)glCullFace(GL_BACK);glMaterialfv(GL_FRONT, GL_DIFFUSE,matCol);//render her..(front faces)
Can you explain more why you are trying to do all of this?

If your models are not wound properly than I think you can just disable backface culling and use two sided lighting and you should be fine.

Why are you trying to render your front faces and then render your back faces separately?
[size=2]My Projects:
[size=2]Portfolio Map for Android - Free Visual Portfolio Tracker
[size=2]Electron Flux for Android - Free Puzzle/Logic Game
Part of the normals are directed incorrectly.(And I don`t know
which of them)I need to use two-sided lighting model to render these faces and(concurrently) render other (with correctly defined normals) in the regular way.
Potential dumb question: it's not possible to take the model back into whatever package it was created in and unify the surface normals so that they all face the right way?
Quote:Original post by faultymoose
Potential dumb question: it's not possible to take the model back into whatever package it was created in and unify the surface normals so that they all face the right way?

no,I can`t

Quote:Original post by karwosts
Can you explain more why you are trying to do all of this?

If your models are not wound properly than I think you can just disable backface culling and use two sided lighting and you should be fine.

Why are you trying to render your front faces and then render your back faces separately?


Because only part of the faces are wound incorrectly

This topic is closed to new replies.

Advertisement