Re: How I learned to stop worrying and love Ldraw. (Subtitle: questions for programmers)
2012-12-19, 0:51
2012-12-19, 0:51
Roland Melkert Wrote:I also use vbo per highlevel part in my software, the main downside of that is some models use mirroring of (sub)models which will mess up the normals. You can compensate for that by ether switching winding or flipping normals.
Personally I (for the time being) choose to NOT support that kind of modelling (it's not possible in real LEGO too) in order to prevent all the extra state changes and or realtime corrections etc.
Anyhow this might be what's messing up that rear wheel.
Ah hah! Bloody normals. I assumed that with double-sided lighting on, I would simply need to change which face I cull. It turns out I needed to change OpenGL's preference on winding! Thanks!
Roland Melkert Wrote:On the auto click/snapping issue, I've been preparing myself to add such functionality too my software for awhile now. The main reason I haven't yet is I too want it too be as much automatic as possible. Although I have had some ideas which seem workable in the end I still often end up needing some extra information (which can partly be generated from primitives though).Well I don't mean to brag... JK.
So unless you are some kind of math genius I don't think 100% mesh based connection handling is feasible (especially on current tablet hardware).
I will attempt it, but time will only tell what kind of divide and conquer algorithm is needed to avoid an O(n^2) when n (our average polygon count) is 1000. Not to mention that's for collision detection, not snapping...
Roland Melkert Wrote:Having said that things might change if ALL parts would be BFC compliant (IMHO determine what's inside and outside is a big thing in generating connection information).
Indeed. You would be able to calculate the overlap and "push" the pieces to their proper fit positions. The information wouldn't be as good with two-sided faces.