Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-11-2012, 03:16 PM
PiB
Fire Beetle
 
Join Date: Aug 2012
Posts: 15
Default

First poster here, also working on re-creating a EQ client using OpenGL. Seems to be a popular pastime here

PixelEngineer, are you using backface culling? I have tried to turn it on but this removes a lot of faces that should be visible:



When backface culling is disabled:



Looks like the normals and winding order of many faces are wrong in the s3d files. Or maybe there's some flag to invert them that I overlooked? In Blender, the normals of the Pedestal are pointing down instead of up:



I could just leave it disabled but this sometimes causes z-fighting (look at the water in the second image).
Reply With Quote
  #2  
Old 09-11-2012, 03:34 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

If you know the order of the vertices you can just calculate your own normals (hint: you do!) which is what we do in azone for .map files.
Reply With Quote
  #3  
Old 09-12-2012, 04:17 AM
PiB
Fire Beetle
 
Join Date: Aug 2012
Posts: 15
Default

I know how to calculate face normals, but I think the order of the vertices in the file is wrong. Half of the faces use clockwise order (first picture) while the other half use anti-clockwise order (second picture).

The reason I mentioned the normals is that, if all the normals were pointing in the right direction I could detect which faces have the wrong order and change it. Unfortunately it seems faces specified clockwise have wrong normals and vice versa.



Reply With Quote
  #4  
Old 09-12-2012, 10:58 AM
PiB
Fire Beetle
 
Join Date: Aug 2012
Posts: 15
Default

My bad, I was looking at the faces from the wrong direction. Looks like they are all specified in clockwise order. Asking OpenGL to cull front faces did the trick. D'oh!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:26 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3