LDraw.org Discussion Forums
Texture mapping - 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: Texture mapping (/thread-22213.html)

Pages: 1 2 3 4 5 6 7 8


RE: Texture mapping - Jaco van der Molen - 2017-06-29

(2017-06-29, 7:59)Merlijn Wissink Wrote: Cool. You can find the other ones here, once I've scanned them Smile

Thanks! I'll keep it going.
Can you give me permission on that Google folder to drop the PNG files in?
That way, we can share them there and if we decide to actually make the parts, we can easily upload them to the PT?


RE: Texture mapping - Merlijn Wissink - 2017-06-29

(2017-06-29, 8:26)Jaco van der Molen Wrote:
(2017-06-29, 8:24)Merlijn Wissink Wrote: Btw, were you also planning to create vector images for the (many) SDCC exclusive Brickheadz? Because, then I could use those to (try) to create my own stickers. That way I can try to make my collection complete, the cheap way  Rolleyes No way I'm gonna spent thousand(s) of dollars to buy the real versions.

If I get good images, pictures or scans from those parts, I can do that. No problem.

Yeah... That's a bit of a thing... I don't know anybody who has those sets, let alone someone who actually openend the sets (I mean, probably 90% of the buyers just buy it for the resell value  Dodgy ). Well, I'll see if I can find anyone.


RE: Texture mapping - Merlijn Wissink - 2017-06-29

(2017-06-29, 8:27)Jaco van der Molen Wrote:
(2017-06-29, 7:59)Merlijn Wissink Wrote: Cool. You can find the other ones here, once I've scanned them Smile

Thanks! I'll keep it going.
Can you give me permission on that Google folder to drop the PNG files in?
That way, we can share them there and if we decide to actually make the parts, we can easily upload them to the PT?

Sure, if you can PM me your Google email I can add you to the folder. I'd rather not make it editable for everyone, that's just opening a can of worms on the internet.


RE: Texture mapping - Jaco van der Molen - 2017-06-29

(2017-06-29, 8:43)Merlijn Wissink Wrote:
(2017-06-29, 8:27)Jaco van der Molen Wrote: Thanks! I'll keep it going.
Can you give me permission on that Google folder to drop the PNG files in?
That way, we can share them there and if we decide to actually make the parts, we can easily upload them to the PT?

Sure, if you can PM me your Google email I can add you to the folder. I'd rather not make it editable for everyone, that's just opening a can of worms on the internet.

I've sent you an e-mail, but will PM you too.


RE: Texture mapping - Travis Cobbs - 2017-06-29

(2017-06-29, 7:59)Jaco van der Molen Wrote: The logo on the brick is 4000x1200 pixels.
The belt is 4000x1000.
These should represent the dimensions of the planes on which they must be mapped.
Brick 1x4 is 80x24 LDU, Tile 1x4 80x20 LDU.

For use with your own custom stickers, this is fine. However, for use in an actual part, it is not a good way to do things. The texture mapping parameters can be adjusted to make the texture map smaller than the geometry it is mapped over. So texture images in official files should always be cropped to not contain any empty space around the edges.


RE: Texture mapping - Travis Cobbs - 2017-06-29

(2017-06-29, 17:41)Travis Cobbs Wrote:
(2017-06-29, 7:59)Jaco van der Molen Wrote: The logo on the brick is 4000x1200 pixels.
The belt is 4000x1000.
These should represent the dimensions of the planes on which they must be mapped.
Brick 1x4 is 80x24 LDU, Tile 1x4 80x20 LDU.

For use with your own custom stickers, this is fine. However, for use in an actual part, it is not a good way to do things. The texture mapping parameters can be adjusted to make the texture map smaller than the geometry it is mapped over. So texture images in official files should always be cropped to not contain any empty space around the edges.

On other thing. The belt texture should be black and transparent. When making a texture, you generally only want to include the part of the printed pattern that is actually printed. In this case, that is just the black lines, since the yellow comes from the underlying part. This guarantees that no matter what exact colors are used for the part, there won't be a mismatch. (It also allows the part to be used in completely different colors from the original, as long as whatever color is chosen contrasts sufficiently with the black to allow the pattern to be visible.)

On the batman logo texture, you would want the bat to be black instead of transparent, even though that section presumably isn't printed on the actual part. That's because that part really is supposed to be black, and not "whatever's underneath".


RE: Texture mapping - Jaco van der Molen - 2017-06-29

(2017-06-29, 17:41)Travis Cobbs Wrote:
(2017-06-29, 7:59)Jaco van der Molen Wrote: The logo on the brick is 4000x1200 pixels.
The belt is 4000x1000.
These should represent the dimensions of the planes on which they must be mapped.
Brick 1x4 is 80x24 LDU, Tile 1x4 80x20 LDU.

For use with your own custom stickers, this is fine. However, for use in an actual part, it is not a good way to do things. The texture mapping parameters can be adjusted to make the texture map smaller than the geometry it is mapped over. So texture images in official files should always be cropped to not contain any empty space around the edges.

I don't understand this. If I scale 4000x1200 pixels tot 80x24 LDU it is a perfect fit. Not?


RE: Texture mapping - Jaco van der Molen - 2017-06-29

(2017-06-29, 17:47)Travis Cobbs Wrote:
(2017-06-29, 17:41)Travis Cobbs Wrote: For use with your own custom stickers, this is fine. However, for use in an actual part, it is not a good way to do things. The texture mapping parameters can be adjusted to make the texture map smaller than the geometry it is mapped over. So texture images in official files should always be cropped to not contain any empty space around the edges.

On other thing. The belt texture should be black and transparent. When making a texture, you generally only want to include the part of the printed pattern that is actually printed. In this case, that is just the black lines, since the yellow comes from the underlying part. This guarantees that no matter what exact colors are used for the part, there won't be a mismatch. (It also allows the part to be used in completely different colors from the original, as long as whatever color is chosen contrasts sufficiently with the black to allow the pattern to be visible.)

On the batman logo texture, you would want the bat to be black instead of transparent, even though that section presumably isn't printed on the actual part. That's because that part really is supposed to be black, and not "whatever's underneath".

OK, I made the belt with black lines and transparent background. The yellow background was just to show.
Concerning the bat, I think it should indeed be black on yellow and background transparent. You can map it on a 1x4 brick to then use in any color.

I made a few other PNG patterns for other parts from Brickheadz. I'll upload those to my website and make the parts on which they are used.

[EDIT] The PNG files I created so far are already in the shared Google folder Merlijn provided:
https://drive.google.com/drive/u/1/folders/0B8QdmRf3PAyldzBxTS1MZnVEWDg
These do not have the correct dimensions like Travis pointed out.

I think we should consider taking more effort in making patterned parts using texture mapping.
As long as the textures are correct and represent the part we can create patterned parts more rapidly and easily.
Making patterns using LDraw geometry is very time consuming and labour intensive.
And since the prints on patterned parts are getting more complex there comes a time when a pattern cannot be made with LDraw geometry.
Since most modern new generation LDraw programs support texture mapping, I think this is the way we need to go?

At least for purpose I use it: to create models and building instructions using LDCad and LPub3D using LDView as renderer.


RE: Texture mapping - Travis Cobbs - 2017-06-29

(2017-06-29, 20:40)Jaco van der Molen Wrote:
(2017-06-29, 17:41)Travis Cobbs Wrote: For use with your own custom stickers, this is fine. However, for use in an actual part, it is not a good way to do things. The texture mapping parameters can be adjusted to make the texture map smaller than the geometry it is mapped over. So texture images in official files should always be cropped to not contain any empty space around the edges.

I don't understand this. If I scale 4000x1200 pixels tot 80x24 LDU it is a perfect fit. Not?

You're forcing the app to load a 4000x1200 texture, which then must be loaded into the graphics hardware, even though only a small fraction of that is actually used. So in a typical scenario, this image would require over 24MB of graphics memory in a situation where most of it is wasted space.

Textures often get loaded using a technique called MIP-mapping, which loads multiple progressively smaller versions of the same image. All the MIP-map levels add up to roughly 133% as much memory as the main texture alone would require. 4000 x 1200 x (4 bytes per pixel) x 1.33 = 25,536,000 bytes. Cropped, the image is 1768x879. The same calculation from above yields 8,267,663 bytes, which is just under 1/3 as many. So, since it uses less than 1/3 the memory, but produces identical end results, it's worth it to go that route when creating an official part.


RE: Texture mapping - Jaco van der Molen - 2017-06-29

(2017-06-29, 8:42)Merlijn Wissink Wrote:
(2017-06-29, 8:26)Jaco van der Molen Wrote: If I get good images, pictures or scans from those parts, I can do that. No problem.

Yeah... That's a bit of a thing... I don't know anybody who has those sets, let alone someone who actually openend the sets (I mean, probably 90% of the buyers just buy it for the resell value  Dodgy ). Well, I'll see if I can find anyone.

LOL  Big Grin