LDraw.org Discussion Forums
How I learned to stop worrying and love Ldraw. (Subtitle: questions for programmers) - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw Editors and Viewers (https://forums.ldraw.org/forum-11.html)
+--- Thread: How I learned to stop worrying and love Ldraw. (Subtitle: questions for programmers) (/thread-7286.html)

Pages: 1 2 3 4 5


Re: How I learned to stop worrying and love Ldraw. (Subtitle: questions for programmers) - Roland Melkert - 2012-12-18

Don't worry like most stuff in my software it will be optional / an extra tool only. Anyway I'm still in the 'thinking' / 'unsure how to' stage, that's why I'm currently working on flexparts (With those I exactly know what I want Smile )


Re: How I learned to stop worrying and love Ldraw. (Subtitle: questions for programmers) - Tim Gould - 2012-12-18

What you could do, is have a "check for clashes" button that scans the model and highlights any part that overlaps another part. That way you would be able to test for mistakes, without worrying about efficiency.

Tim


Re: How I learned to stop worrying and love Ldraw. (Subtitle: questions for programmers) - Paul Griffin - 2012-12-19

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).

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).
Well I don't mean to brag...Tongue JK.

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.


Re: How I learned to stop worrying and love Ldraw. (Subtitle: questions for programmers) - Paul Griffin - 2012-12-19

And I was just being lazy by flagging a piece as uncertified as soon as I ran into an offending command...

I'm still not sure if I should do the polygon duplication. I failed at it once (I forgot to duplicate subfile polygons), but it seems to only increase the total number of polygons rendered in the scene by 3-3.6% (based on the 8460/8800, 800-1k piece models). I'll have to think of what other side effects it could have.

I've been only checking uncertified parts for bowtied quads...guess I'll decide later if I should use that info to "un"certify a part.

Edit: I know next to nothing about shaders...all my work has been ES 1.1 work.


Re: How I learned to stop worrying and love Ldraw. (Subtitle: questions for programmers) - Paul Griffin - 2012-12-19

Well I'll most definitely talk with the steerco before I sell something that automatically consumes 20 MB of this site's bandwidth. Y'know, "don't bite the hand that feeds you"-kind of stuff.

I am aware that The Lego Group might not have stepped in *yet* because of the limited fan base and general availability of free versions (including their own LDD). And I highly doubt that my software will have the appeal of "Tyco" or "Mega Blocks". But I will have an LLC set up before anything gets sold.


Re: How I learned to stop worrying and love Ldraw. (Subtitle: questions for programmers) - Travis Cobbs - 2012-12-19

Paul Griffin Wrote:Edit: I know next to nothing about shaders...all my work has been ES 1.1 work.

I actually don't know anything about shaders either; LDView doesn't use any, and I haven't had the opportunity to learn. It seems that most new projects use them, so I suspected you might. I don't think ES 1.1 supports two-sided lighting (although I could be wrong about that).


Re: How I learned to stop worrying and love Ldraw. (Subtitle: questions for programmers) - Willy Tschager - 2012-12-19

Paul Griffin Wrote:-Legally: Can "The Lego Group" prevent me from selling an app I make (provided that I do not use their trademark)? If I want to use the ldraw parts library, what's the recommended way to share it? It seems that, aside from parts/756.dat parts/s/2336s35.dat, I could distribute the zip myself. (Edit: nevermind per #2. I see there's a link for CCAL-compliant parts).

Please read:

http://www.ldraw.org/article/281.html#2_05_charging_for_a_program

and also:

http://www.ldraw.org/article/227.html

On a personal note I'd like to add, that you might author a simple part (there are plenty to pick from Duplo) and get it certified through the PT before you start charging for an app - just to get a feeling how much effort the 100+ part authors have put into the creation of a 5000+ parts library offered for free. Or read the last sentence on this page.

w.


Re: How I learned to stop worrying and love Ldraw. (Subtitle: questions for programmers) - Travis Cobbs - 2012-12-19

Note that BrickPad currently costs $0.99, and as far as I know Ken followed the above guidelines.


Re: How I learned to stop worrying and love Ldraw. (Subtitle: questions for programmers) - Ken Drew - 2012-12-19

Travis Cobbs Wrote:Note that BrickPad currently costs $0.99, and as far as I know Ken followed the above guidelines.

And if I haven't, please let me know.


Re: How I learned to stop worrying and love Ldraw. (Subtitle: questions for programmers) - Steffen - 2012-12-19

I am feeling like Willy here:
Creating your program of course is some effort, and of course you can charge for it,
but you're building your "cash generator" onto our volunteer work...
hmmmmmm........ What about a donation to ldraw.org? Like 50% of all earnings?
The money is needed for server space...
However, this could immediately create the impression that ldraw.org is a commercial product,
and this immediately would call TLG to action...