[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: .obj question
On 13-Jan-2000 Steve Baker wrote:
> Erik wrote:
>> Hi, sorry to pollute the list with this stupid question :)
>> is there any convention for differentiating between frontface and backface
>> wavefronts .obj model format if normals aren't provided? (I have a couple
>> models with only vert lists and face lists, and my viewer is drawing half
>> polygons with the wrong face). All the pertinant links I could find were
>> dead or didn't go into detail :/ Any help would be greatly appreciated,
> I have heard (although I have no personal experience with .obj) that this
> is indeed a *fatal* problem with the format. There is no
> ordering convention - and also no normals. The renderer this format was
> intended to drive was a non-realtime raytracer kind of a thing - and
> backface culling was not an important feature.
there is a vn flag which specifies a vertex normal, unfortunantly the models I
have are sans normals.
> There was a long debate about ways to possibly work around this on the
> OPENGL-GAMEDEV list maybe a year ago.
which one? I was told to get on one for good convo and all they do is flame
everyone for being off topic (I'm not even sure what the topic is, but
apperantly it's not opengl and it's not gamedev even tho those words are in the
list name). opengl_gamedev_l is the one I see you talking in, so it's probly
that one :)
> There were various hare-brained schemes for presuming (or being told)
> that the 'object' you are loading is either a predominantly convex
> 'solid' thing (like a house-brick or a Thaaarg-Warrior) - or a predominantly
> concave 'hollow' thing like the inside of a room.
> Armed with that prior information, the tool would walk around the connected
> polygons, and figure out what is 'inside' and what is 'outside'. You can
> pick one polygon, and choose which direction it faces arbitarily. Now, you
> look at each edge in turn, find a polygon that shares that edge and if
> necessary, flip it to point the way as the first one. Applying that algorithm
> everywhere produces an object that is either 100% correct - or 100%
> It's a relatively simple matter to figure out which is which by counting the
> number of edges that are convex edges and the number that are concave - and
> ensuring that the majority of them are facing correctly.
> Of course this fails completely if the object is not fully connected - or
> if it has single disconnected polygons and stuff like that.
> I think the short answer is "don't do that".
I think some of the polys I have are double-faced, to boot. Like the rudders
and canards. Durnit, wasted days for picking the wrong format :) Thanks for the
> Steve Baker http://web2.airmail.net/sjbaker1
> firstname.lastname@example.org (home) http://www.woodsoup.org/~sbaker
> email@example.com (work)
> To unsubscribe, e-mail: firstname.lastname@example.org
> For additional commands, e-mail: email@example.com
-Erik <firstname.lastname@example.org> [http://math.smsu.edu/~br0ke]
The opinions expressed by me are not necessarily opinions. In all
probability, they are random rambling, and to be ignored. Failure to ignore
may result in severe boredom or confusion. Shake well before opening. Keep