What is the best way to quickly create custom printed parts for ldraw?


What is the best way to quickly create custom printed parts for ldraw?
#1
I had a selection of 2x2 and 2x4 printed tiles made, and want to use them in my building instructions.  The images are in both PNG (bitmap) and AI (vector) formats.  

What is the easiest way to make these into custom printed parts for use in MLCad /LDraw, etc?  I would like to believe that there is an app that makes this trivial.

thanks,
---tom
Reply
RE: What is the best way to quickly create custom printed parts for ldraw?
#2
(2018-02-27, 22:49)tom alphin Wrote: I had a selection of 2x2 and 2x4 printed tiles made, and want to use them in my building instructions.  The images are in both PNG (bitmap) and AI (vector) formats.  

What is the easiest way to make these into custom printed parts for use in MLCad /LDraw, etc?  I would like to believe that there is an app that makes this trivial.

thanks,
---tom

Unless they are very simple checker patterns or something the easiest way would be to use "s\3068bs01.dat" with a textured rectangle on top of it.

But they will look like ordinary tiles in MLCad, they show up in lpub through LDView though.

Or use my LDCad to inspect the model first.
Reply
RE: What is the best way to quickly create custom printed parts for ldraw?
#3
(2018-02-28, 19:01)Roland Melkert Wrote: Unless they are very simple checker patterns or something the easiest way would be to use "s\3068bs01.dat" with a textured rectangle on top of it.

Looking for any excuse to test textured parts I wend and made one Smile

   

Code:
0 Tile  2 x  2 with ..... pattern
0 Name: tile.dat
0 Author: Roland Melkert [roland]

0 UNOFFICIAL PART
0 BFC CERTIFY CCW

1 16 0 0 0 1 0 0 0 1 0 0 0 1 s\3068bs01.dat

0 !TEXMAP START PLANAR  -20 0 20   20 0 20   -20 0 -20  tile.png
4 16  20 0 20   -20 0 20   -20 0 -20   20 0 -20
0 !TEXMAP END

Just rename tile.png to whatever png you've got, just be sure that png is square pixel wise.
Reply
RE: What is the best way to quickly create custom printed parts for ldraw?
#4
(2018-02-28, 19:47)Roland Melkert Wrote:
Code:
0 Tile  2 x  2 with ..... pattern
0 Name: tile.dat
0 Author: Roland Melkert [roland]

0 UNOFFICIAL PART
0 BFC CERTIFY CCW

1 16 0 0 0 1 0 0 0 1 0 0 0 1 s\3068bs01.dat

0 !TEXMAP START PLANAR  -20 0 20   20 0 20   -20 0 -20  tile.png
4 16  20 0 20   -20 0 20   -20 0 -20   20 0 -20
0 !TEXMAP END

Just rename tile.png to whatever png you've got, just be sure that png is square pixel wise.

I tried what you described, replacing tile.png with both a local filename (placing the .png file in the same folder as the .dat file) and I tried using complete path to the file, but neither approach resulted in the texturing appearing when the .dat file is loaded in LDraw. 

I'm sure I'm nearly there, but I'm definitely missing a step or something is working wrong.

help appreciated :-)

---tom
Reply
RE: What is the best way to quickly create custom printed parts for ldraw?
#5
[quote pid='27955' dateline='1519886504']
I tried what you described, replacing tile.png with both a local filename (placing the .png file in the same folder as the .dat file) and I tried using complete path to the file, but neither approach resulted in the texturing appearing when the .dat file is loaded in LDraw. 

I'm sure I'm nearly there, but I'm definitely missing a step or something is working wrong.
[/quote]

The .png name should be relative to the .dat

Not all editors/viewers support the relatively new texture mapping standard.

What program are you trying it in?

If it doesn't show up in e.g. LDView or LDCad then it could also be caused by a non supported png format. A simple png made by paint should be ok though.
Reply
RE: What is the best way to quickly create custom printed parts for ldraw?
#6
(2018-03-01, 18:48)Roland Melkert Wrote: Not all editors/viewers support the relatively new texture mapping standard.

I updated to the latest LDraw 4.3 release and it started working perfectly.  Thanks for the tip!

I was able to scale the images and modify the file for 2x4 tiles without much difficulty - just a little trial-and-error.

Thanks Again,
---tom
Reply
RE: What is the best way to quickly create custom printed parts for ldraw?
#7
(2018-03-02, 7:17)tom alphin Wrote: I updated to the latest LDraw 4.3 release and it started working perfectly.  Thanks for the tip!

Just to clarify, LDView is not "LDraw". There is no such thing as "LDraw 4.3". I'd try to explain what LDraw is, but the main ldraw.org page probably does it better:
Quote:What is LDraw?

LDraw™ is an open standard for LEGO CAD programs that allow the user to create virtual LEGO models and scenes. You can use it to document models you have physically built, create building instructions just like LEGO, render 3D photo realistic images of your virtual models and even make animations. The possibilities are endless. Unlike real LEGO bricks where you are limited by the number of parts and colors, in LDraw nothing is impossible.

LDView is a program to view LDraw files, and it supports texture maps. It is also one of the renderers supported by LPub and LPub3D, so if you use it as your renderer in one of those programs, instructions you create will show the textures. I believe that LDCad, LeoCAD, and BrickSmith all support textures, so if you want to see the textures in your LDraw-based CAD program, you need to use one of those. As Roland pointed out, MLCad definitely does not support them.
Reply
RE: What is the best way to quickly create custom printed parts for ldraw?
#8
(2018-03-02, 18:20)Travis Cobbs Wrote: [quote pid='27971' dateline='1519975078']
Just to clarify, LDView is not "LDraw". There is no such thing as "LDraw 4.3". I'd try to explain what LDraw is, but the main ldraw.org page probably does it better:

[/quote]
I'm aware of the distinction but forgot.  To be fair, the LDraw suite of tools are extremely useful and powerful, but they aren't all that easy to use, and the naming conventions are a mishmash at best.  I'd love to see more usability improvements, but this isn't all that likely as it's created by and for a small collection of geeky hobbyists.

I am personally a fan of MLCad, which worries me since it hasn't been updated in ages.  I'd love to see it get further attention as it's the most professionally capable & efficient tool I've found yet.

---tom
Reply
RE: What is the best way to quickly create custom printed parts for ldraw?
#9
I'm following the code and I'm understanding how this works, essentially but here's one thing I don't know...

Where the heck are the PNGs supposed to go?
Reply
RE: What is the best way to quickly create custom printed parts for ldraw?
#10
(2018-05-10, 5:44)Scott Moore Wrote: I'm following the code and I'm understanding how this works, essentially but here's one thing I don't know...

Where the heck are the PNGs supposed to go?

Easiest is to place them alongside the .dat
Reply
RE: What is the best way to quickly create custom printed parts for ldraw?
#11
where do you put the code in?
Reply
RE: What is the best way to quickly create custom printed parts for ldraw?
#12
(2020-08-13, 18:46)bricky Wrote: where do you put the code in?

You can follow this script to generate your custom flat rectangular LDraw sticker part using a png texture.

http://www.melkert.net/test/stickerGen.html
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 7 Guest(s)