Skip to main content
gamedev.net
🔒 Locked

.obj file format problem

Started by frankanbailin 1 reply 750+ views
Original Post
frankanbailin
frankanbailin
I have added a thread in the "Game Programming" hope this action fury nobody! Well, I try to load wavefront obj file(.obj) with opengl. after google for some src and docs, Nate Robins's glm code in "glut" lib demo is recommended here and there. but some problems came to me during loading the .obj file I exported from 3dmax7. after checking, I found that a symbol of "s SomeNumber" is not included in the process parsing obj file in glm.c code.Here is the example: "g objBLACK_TRIM s 2(here is the problem) f -454//-454 -453//-453 -452//-452 f -453//-453 -451//-451 -452//-452 f -451//-451 -450//-450 -452//-452 f -450//-450 -449//-449 -452//-452" is it something special? animation info or sth like that? puzzled. or add some code ot omitted this kind of symbol? thx in advance!
SteveXP
SteveXP
hi,

the "s" signals the shading groups. That means all faces with the same "s" should be smoothed in your normal calculation.
But if the code doesn't support "Shading Groups" there should be no Problem loading the file.

Normally obj-loaders which don't support "s" just smooth the whole Object.


See here for Obj-file format:
http://www.royriggs.com/obj.html


Hope that helped,
Steve
Sneftel
Sneftel
Please don't crosspost on these forums.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.