TEXMAP extension thoughts and findings.


RE: TEXMAP extension thoughts and findings.
#20
(2014-08-07, 23:27)Roland Melkert Wrote: I've been working on the cylindrical implementation and I noticed some minor confusing things about the current TEXMAP  spec.

The planar projection uses top/left orientation while the cylindrical one uses center bottom. This isn't a real big problem but the text states the v coordinate should be based on the distance to the base plane. This will cause the picture to be up side down.

So unless I misunderstood something (else) I think it should be the distance to the cylinder top plane.

Using that correction this:

Code:
0 Cyl texmap test minifig head
0 UNOFFICIAL PART
0 BFC CERTIFY CCW

1 16 0 0 0 1 0 0 0 1 0 0 0 1 s\3626bs02.dat
1 16 0 4 0 13 0 0 0 13 0 0 0 -13 1-8cyli.dat
1 16 0 4 0 -13 0 0 0 13 0 0 0 -13 1-8cyli.dat
1 16 0 4 0 13 0 0 0 13 0 0 0 13 2-4cyli.dat
1 16 0 4 0 0 0 8 0 -6.4 0 8 0 0 t04o6250.dat
1 16 0 4 0 -8 0 0 0 -6.4 0 0 0 8 t04o6250.dat
1 16 0 17 0 0 0 -8 0 6.4 0 8 0 0 t04o6250.dat
1 16 0 17 0 8 0 0 0 6.4 0 0 0 8 t04o6250.dat
1 16 0 4 0 0 0 -8 0 -6.4 0 -8 0 0 t04o6250.dat
1 16 0 4 0 8 0 0 0 -6.4 0 0 0 -8 t04o6250.dat
1 16 0 17 0 0 0 8 0 6.4 0 -8 0 0 t04o6250.dat
1 16 0 17 0 -8 0 0 0 6.4 0 0 0 -8 t04o6250.dat

0 !TEXMAP START CYLINDRICAL 0 17 0  0 4 0   0 17 -13 90 smile.png
0 !: 1 16 0 17 0  13 0 0  0 -13 0  0 0 -13  s\minifighead-hlp.dat
0 !TEXMAP FALLBACK
1 16 0 17 0  13 0 0  0 -13 0  0 0 -13  s\minifighead-hlp.dat
0 !TEXMAP END

will render like:



If people agree, we need to correct the spec text.

If I'm understanding correctly, the spec would not change from a user perspective, only the technical discussion talking about how the u-v are calculated?  The user specifies the base "center" of the wrapped texture around the cylinder, and the renderer will correct for the fact that this doesn't line up with expectations for PLANAR, or are you saying the user should specify P3 as the top middle point of the texture application?

--------

BTW, I think it's interesting the way you're using FALLBACK above.  FALLBACK was intended to allow "dual-use" decorated parts.  The existing geometric designs (we called this Design By Architecture) would go in the FALLBACK section, and the new, often-less-complicated geometry would appear in 0 !: lines.  The intent being that TEXMAP parts could be issued in the wild that would not break existing implementations (such as MLCAD).
Following the spec, your last example should work just as well with the less-work-intensive:
...
0 !TEXMAP START CYLINDRICAL 0 17 0  0 4 0   0 17 -13 90 smile.png
1 16 0 17 0  13 0 0  0 -13 0  0 0 -13  s\minifighead-hlp.dat
0 !TEXMAP END

That would continue to work in older renderers, while the new ones would actually texture something there.  There should be no requirement to specify the same geometry inside a FALLBACK section.

______

I'm also a HUGE fan of the fact that you double-space between triplets.  We do this in all of our experiments, Foundry actually outputs LDR files in that format.  It makes things SO much easier to follow.  If I had my way (ha), it would be a required standard of LDRAW official files.  Alas... Smile

     -- joshua
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: TEXMAP extension thoughts and findings. - by Joshua Delahunty - 2018-01-12, 18:31

Forum Jump:


Users browsing this thread: 1 Guest(s)