LDraw.org Discussion Forums
Project "Transparent Envelope" as Help for virtual construction using MLCad - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: General (https://forums.ldraw.org/forum-12.html)
+--- Forum: Help (https://forums.ldraw.org/forum-13.html)
+--- Thread: Project "Transparent Envelope" as Help for virtual construction using MLCad (/thread-6623.html)



Project "Transparent Envelope" as Help for virtual construction using MLCad - Arthur Sigg - 2012-11-07

Available
Relative complex object which fits in a volume of about 20 x 20 x 20 cm

Target
Building this object from Lego in a scale of 1:2.5 (volume about 50 x 50 x 50 cm) using MLCad, LDView and LPub

Possible Solution
(1) Scanning the object
(2) Scaling Scan Data (1:2.5) and saving as object.stl File
(3) Converting object.stl to object.dat using program STL2DAT
(4) Integrating object.dat in LDraw Library (under Models)
(5) Temporary mod of LDConfig.ldr by adding a more transparent color "Trans_Clear_Clear" (just done)
(6) Positioning object.dat in MLCad and assigning the new transparency "Trans_Clear_Clear"
(7) Building the model inside the transparent envelope with best fit (checking with LDView)

Need Help
(1) I do not own a Laser Scanner and 123D does not delivery usable results so the object has to be scanned by a external Scan Service. What have I to observe placing the order ?
(2) What do you think - would the relatively old program STL2DAT be able to convert the STL file delivered by such a Scan Service using modern hard- and software ? I do not really understand the options I have to use with STL2DAT - how can I find out best values ?
(3) I added the more transparent color "Trans_Clear_Clear" temporarily to LDConfig.ldr by copying existing definition for "Trans_Clear" and changing CODE to 48 (unused color) and ALPHA from 128 to 100. It seems for me that ALPHA is a measure for the transparency - what is the usable (allowed) range of this value ? (e.g. 64 does not work)

Thank you for any recommendations,

Arthur


Re: Project "Transparent Envelope" as Help for virtual construction using MLCad - Roland Melkert - 2012-11-07

I'm not sure what you are trying here but I think there might be a major misunderstanding of what a stl2dat can do.

It will generate a single dat file with the whole object in it as a single part, nothing lego like about that. What you want though (I think) is something that 'Legoizes' the object in terms of bricks. This is by far more complex then just running it through a mesh converter. Even if you limit the number of useable bricks (e.g only 2x4 and 2x2, etc) it comes down to processing huge amounts of possibilities.

As for the alpha value, mlcad only does binary transparency I believe, so you wouldn't see the difference between 64 and 128.


Re: Project "Transparent Envelope" as Help for virtual construction using MLCad - Arthur Sigg - 2012-11-07

That's exactly what I expect - "a single dat file with the whole object in it as a single part" ! This delivers the transparent envelope as a "outer limit" of the object, only needed as a visual help for building the object in MLCad manually with best fitting parts :-).

Using 64 as ALPHA would result in a black part with distortions.


Re: Project "Transparent Envelope" as Help for virtual construction using MLCad - Roland Melkert - 2012-11-07

Ah ok I think I understand what you want here.

it might be easier to just take a picture from the front, left etc while including a ruler besides the object. And then use that (scaled) picture like a background. (or make a sticker like parts out of them and use those sorta like a sky box).

Not sure what's going on with the alpha value though.


Re: Project "Transparent Envelope" as Help for virtual construction using MLCad - Tim Gould - 2012-11-07

If you only want a build envelope I'd suggest working out the size (in LDU) of the best fit shape (eg. dome, cyli+dome, sphere, box) and using transparent primitives to form the envelope.

Unless you really do need the fine detail in which case I hope you have a lot of RAM and CPU spare Wink

Tim


Re: Project "Transparent Envelope" as Help for virtual construction using MLCad - Travis Cobbs - 2012-11-07

Arthur Sigg Wrote:(3) I added the more transparent color "Trans_Clear_Clear" temporarily to LDConfig.ldr by copying existing definition for "Trans_Clear" and changing CODE to 48 (unused color) and ALPHA from 128 to 100. It seems for me that ALPHA is a measure for the transparency - what is the usable (allowed) range of this value ? (e.g. 64 does not work)

LDView should accept any value. Values lower than 128 should be more transparent than the default, and values above 128 should be less transparent. (Note that this only works if the ldconfig.ldr option is enabled in LDView.) Since MLCAD uses 50/50 stipple pattern for transparency, I wouldn't really expect it to accurately support any other values.


Re: Project "Transparent Envelope" as Help for virtual construction using MLCad - Philippe Hurbain - 2012-11-08

Quote:(1) I do not own a Laser Scanner and 123D does not delivery usable results so the object has to be scanned by a external Scan Service. What have I to observe placing the order ?
Have you tried David 3D scanner? The free version is usable, as I show on my website (which is unfortunately down at the moment...). Otherwise, don't ask for a high resolution scan, as it is useless if you intend to approximate it with bricks, and files soon become very large...

Quote:(2) What do you think - would the relatively old program STL2DAT be able to convert the STL file delivered by such a Scan Service using modern hard- and software ? I do not really understand the options I have to use with STL2DAT - how can I find out best values ?
Yes, it's able to do that. Just use ascii stl file format, not binary one. Meshlab (free tool) can do the conversion if needed.
As for options, the best for this kind of work is the "raw" mode, wich simply converts triangles without trying to add edge or conditional lines. Remember also that you can use stl2dat through LETGUI (I even think that the most recent version of stl2dat is only available in LETGUI distribution).

Otherwise, do you know about LSculpt?


Re: Project "Transparent Envelope" as Help for virtual construction using MLCad - Arthur Sigg - 2012-11-09

Thanks to all for reading and answering !
Arthur


Re: Project "Transparent Envelope" as Help for virtual construction using MLCad - Matthew W. Noel - 2012-11-12

dunno about most of that, but in regards to your third question the alpha value should be anything from 0-255, 0 being completely transparent (invisible) and 255 being completely opaque. I'm not sure why 64 wouldn't work, perhaps it was just to transparent for you to see? also ALPHA = alpha blending, now you can google it Wink