obj does parse quad faces and splits them as 2 faces but it doesn't support more than 4 vertices per face definition.
you might need to triangulate/translate as mesh before save as obj. also note that obj loader for lite is not in trunk but in lite dev branch, this means you choose for adventurous coding/dangerous concepts/might never see the light cases/high risc branches :)) basically do not expect official support here. Of course you could bug Katopz on this issue... Fabrice On May 18, 2010, at 5:28 PM, Reinorvak wrote: > If such is the case where faces make the best for running a smoother > game. Then there seems to be a problem with .obj loader then. As it > can't import a circular face, but only the first three vertexes of the > circle. > > On May 18, 10:03 am, Rob Bateman <[email protected]> wrote: >> Hey Shawn >> >> Reinorvak is right is saying that triangles are generally used for rendering >> because of their simplicity. this is true whether you use quads in Lite or >> not - geometry will always be subdivided to tris for rendering purposes. >> However, quads are useful when generating geometry in Lite because they can >> halve the amount of faces needs to draw a primitive - which leads to less >> data and faster sorting, moouse events etc. a quad is momentarily converted >> to two tris on rendering, but keeping the persistent data as a quad has >> processing benefits that make it worthwhile if your geometry will allow it. >> would be interested to hear the results of any tests you've been doing. >> >> Rob >> >> On Mon, May 17, 2010 at 6:17 PM, Reinorvak <[email protected]>wrote: >> >> >> >>> I'm not sure what Away3D would do in the background, I would suggest >>> trying a simple test to see which is better, I imagine Triangles will >>> win, but why guess when we have the opportunity to test it out. Try >>> drawing some excessive amount of squares on screen, lets say 500? Do >>> one test with triangles one with quads and have them all rotate. That >>> should give you a good idea on how everything is working in the >>> background. >> >>> Not sure how to make it interrupt to make the triangle faces into quad >>> faces, but best of luck. >> >>> On May 17, 11:57 am, Shawn McInerney <[email protected]> wrote: >>>> Hi Reinorvak, >> >>>> Thanks for the info! The reason I am considering using quads for >>> *certain* >>>> pieces of geometry is that they end up being half the number of faces. >>> For >>>> example a primitive cube created with quads can have a minimum of 6 >>> faces. >>>> But away3Dlite's cube primitive automatically triangulates each face so >>> that >>>> there is a minimum of 12 faces. >> >>>> In the specific case of away3Dlite and primitives, I *think* away3Dlite >>>> really only does 3 things (although they are 3 incredibly useful >>> things!): >> >>>> 1. Draws the faces in 2d with correct perspective to emulate 3d (using >>>> Flash's built in 3d tools). >>>> 2. Figures out the uv data so that we can put bitmaps on the primitives. >>>> 3. Figures out what is in front of what with respect to the camera (z >>>> sorting, culling). >> >>>> If I am correct, I don't see any advantage to triangles in this specific >>>> particular instance. In fact, drawing 12 faces instead of 6 should be >>>> slower. Again, please correct me if I am wrong :) I am no expert.. just >>>> trying to figure this all out. >> >>>> Best, >>>> Shawn >> >>>> On Mon, May 17, 2010 at 8:28 AM, Reinorvak <[email protected] >>>> wrote: >> >>>>> Where as its true that triangles speed up the process for lighting and >>>>> shading, there is a 2nd reason why most to all games use triangles, >>>>> which I believe Away3D overlooks being a flash program. I'm not sure >>>>> if Flash can render quads easier then triangles, but for the most part >>>>> the triangle is selected because its the simplest amount of >>>>> information to push over to the graphics card, and what most graphic >>>>> cards are built to handle. >> >>>>> At least for any game that involves a large amount of 3D objects, all >>>>> models created should be triangulated. Also if you want to obtain any >>>>> curved surfaces you'd need triangles, I don't believe Quads can do >>>>> this as effectively. >> >>>>> Again, I don't know if flash compensates for the quads being in a >>>>> different type of system, but for any game built entirely for 3D, >>>>> triangles are the geometry you want. >> >>>>> On May 16, 6:35 pm, Shawn <[email protected]> wrote: >>>>>> I meant backface culling.. not light culling >> >>>>>> On May 16, 3:27 pm, Shawn <[email protected]> wrote: >> >>>>>>> It is my understanding that the main advantage of triangular faces, >>> as >>>>>>> opposed to quad faces, is that tri's ensure planarity so that >>> things >>>>>>> like shading and lighting can be calculated properly (Please >>> correct >>>>>>> me if I am wrong). But since lite does not have shading or >>> lighting, >>>>>>> is there any speed advantage to using quads? Would I be screwing up >>>>>>> other existing away3Dlite such as light culling and z-sorting? >> >>>>>>> Also, are quad faces still an option with lite? I read in this >>> post: >>>>>>> <http://groups.google.com/group/away3d-dev/msg/dc6ab0c9a98504d9> >>> that >>>>>>> quad faces could be created in Away3DLite by doing the following: >> >>>>>>> "About quads, you can take a look at the primitives' >>>>>>> buildPrimitive() function. You just need to push >>>>>>> the 4 faces' indices into the _indices vector, >>>>>>> and then flag those values as a quad by pushing >>>>>>> into _faceLengths the value 4. >> >>>>>>> e.g., if you want to create a face from a quad : >> >>>>>>> push the four indices values into _indices : >>>>>>> _indices.push(a, b, c, d); >> >>>>>>> then push the value 4 into _faceLengths >>>>>>> to flag it as a quad: >>>>>>> _faceLengths.push(4); >> >>>>>>> don't forget you must call buildFaces() >>>>>>> afterwards to create the faces from >>>>>>> the data you've entered!" >> >>>>>>> But I can't figure out how to implement this technique in the >>>>>>> primitives' buildPrimitive(). I am using the latest trunk revision, >>>>>>> Revision 2520 of away3DLite. >> >>>>>>> Thanks in advance, >>>>>>> Shawn >> >>>> -- >>>> Shawn McInerney >>>> MooseMouse Media, Inc.http://moosemouse.com >>>> [email protected] >> >> -- >> Rob Bateman >> Flash Development & Consultancy >> >> [email protected]
