RE: Discussion - proposal to extend !TEXMAP specification
2026-02-12, 21:07 (This post was last modified: 2026-02-12, 21:08 by Roland Melkert.)
2026-02-12, 21:07 (This post was last modified: 2026-02-12, 21:08 by Roland Melkert.)
Been thinking about implementing a proof of concept in a special build of LDCad.
Needed:
- Projection (probably best to let the spec define a static one like Ortho looking at the z direction)
- Internal texture dimensions in ldu (the 'png' width/height, or supplied by a texture meta extension)
- Texture resolution (pixels per LDU=> probably best as an internal setting or render quality depended).
- Lighting settings (probably best to use none)
- Texture background color (probably best to always use 'transparent')
So imho the whole thing could work using a meta like:
Which would let renderer decide the size of the texture based on the source's min/max x/y coordinates.
or something more flexible:
Where the ldraw source x/y coordinates will be added to ofsX,ofsY within a base surface of WxH (ldu). This could be applied to png's too but using pixels instead of ldu.
Thoughts?
Needed:
- Projection (probably best to let the spec define a static one like Ortho looking at the z direction)
- Internal texture dimensions in ldu (the 'png' width/height, or supplied by a texture meta extension)
- Texture resolution (pixels per LDU=> probably best as an internal setting or render quality depended).
- Lighting settings (probably best to use none)
- Texture background color (probably best to always use 'transparent')
So imho the whole thing could work using a meta like:
Code:
0 !TEXMAP (START | NEXT) <method> <parameters> <pngfile|ldrawFile> [GLOSSMAP pngfile]Which would let renderer decide the size of the texture based on the source's min/max x/y coordinates.
or something more flexible:
Code:
0 !TEXMAP (START | NEXT) <method> <parameters> <pngfile|ldrawFile> [GLOSSMAP pngfile] [SURFACE W H ofsX ofsY]Where the ldraw source x/y coordinates will be added to ofsX,ofsY within a base surface of WxH (ldu). This could be applied to png's too but using pixels instead of ldu.
Thoughts?