LDraw.org Discussion Forums

Full Version: Looking a tutorial to make a custom part!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Guys i want to make a very simple custom part. its a rectangle with a png snapped on front with transparent background. its possible to make this? (EASY WAY)

 something like this. its to add into a model in a building instruction. that will be overlapped to a model

[Image: O45tmnb.png]
(2018-11-06, 11:59)tatubias Wrote: [ -> ]Guys i want to make a very simple custom part. its a rectangle with a png snapped on front with transparent background. its possible to make this? (EASY WAY)

 something like this. its to add into a model in a building instruction. that will be overlapped to a model
Probably the simplest is to use Roland's sticker generator http://www.melkert.net/test/stickerGen.html
(2018-11-06, 12:09)Philippe Hurbain Wrote: [ -> ]
(2018-11-06, 11:59)tatubias Wrote: [ -> ]Guys i want to make a very simple custom part. its a rectangle with a png snapped on front with transparent background. its possible to make this? (EASY WAY)

 something like this. its to add into a model in a building instruction. that will be overlapped to a model
Probably the simplest is to use Roland's sticker generator http://www.melkert.net/test/stickerGen.html

Thank you very much!!!!
its possible to make the square 100% transparent (invisible) i want only the sticker visible.

I have tested several colors transparents but i still see the rectangle that helds the sticker
(2018-11-06, 15:27)tatubias Wrote: [ -> ]its possible to make the square 100% transparent (invisible) i want only the sticker visible.
I have tested several colors transparents but i still see the rectangle that helds the sticker
Two solutions (if I understand correctly your configuration, a sticker placed on a rectangular part)
The simple one is to make background of sticker to be color 16 (main color) and use it in the same color as the rectangular part.
The other one is to use special color 0x7000000 which is "invisible".
(2018-11-06, 16:17)Philippe Hurbain Wrote: [ -> ]
(2018-11-06, 15:27)tatubias Wrote: [ -> ]its possible to make the square 100% transparent (invisible) i want only the sticker visible.
I have tested several colors transparents but i still see the rectangle that helds the sticker
Two solutions (if I understand correctly your configuration, a sticker placed on a rectangular part)
The simple one is to make background of sticker to be color 16 (main color) and use it in the same color as the rectangular part.
The other one is to use special color 0x7000000 which is "invisible".

what i want to make is: use the transparent background of the png so its not showed. i only want to show the ticker image only
Let me explain better with images.

1 i made a png image with transparent background, and save it as png with transparent background.


[Image: RKFTxI7.png]

then when i added as a TEXMAP  with your app i can change the background color but i cant make it disappear.

[Image: 5CuKet5.png]

if i use the 0x7000000 invisible color it makes transparent all the sticket and not the background.


Code:
0 My textured sticker
0 UNOFFICIAL PART
0 BFC CERTIFY CCW

1 16   0 -0.1 0   50 0 0   0 0.1 0   0 0 50   box5-12.dat

0 !TEXMAP START PLANAR   -50 -0.1 50   50 -0.1 50   -50 -0.1 -50   android.png
0 !: 4 1   -50 -0.1 50   -50 -0.1 -50   50 -0.1 -50   50 -0.1 50

0 !TEXMAP FALLBACK
4 16   -50 -0.1 50   -50 -0.1 -50   50 -0.1 -50   50 -0.1 50

0 !TEXMAP END
this is how it looks when i inser it into other model
[Image: lXxbsI1.png]
You might try commenting out the box5-12.dat line of your sticker part. (Add "0 ", without the quotes, to the beginning of the line.) Also, change the color of the textured quad to be invisible:

Code:
0 !: 4 0x7000000   -50 -0.1 50   -50 -0.1 -50   50 -0.1 -50   50 -0.1 50

In LDView, this does what you want:

[Image: ZNywY2l.png]
Not sure about LDCad, though. I think the LDraw texturing spec makes it ambiguous about what the correct behavior is for the above. If LDCad has the texture's opacity match the underlying geometry, it won't show anything. If LDCad makes the texture itself fully opaque, it should match LDView.

There is another solution, but it's much more elaborate, and won't necessarily work. You can actually specify the bricks behind the texture inside the textured region, instead of the single quad that is there now. This also requires calculating the correct scaled texture coordinates, which the existing sticker doesn't have. Also, the bricks will be textured on both sides, so if the backs of the bricks show, it won't really work. Finally, anywhere that there aren't any bricks, the texture will be missing. But, assuming you're trying to get the texture to show on the side of a vehicle, it would work, as long as you can't see the backs of the bricks.
(2018-11-06, 18:59)Travis Cobbs Wrote: [ -> ]You might try commenting out the box5-12.dat line of your sticker part. (Add "0 ", without the quotes, to the beginning of the line.) Also, change the color of the textured quad to be invisible:

Code:
0 !: 4 0x7000000   -50 -0.1 50   -50 -0.1 -50   50 -0.1 -50   50 -0.1 50

In LDView, this does what you want:

[Image: ZNywY2l.png]
Not sure about LDCad, though. I think the LDraw texturing spec makes it ambiguous about what the correct behavior is for the above. If LDCad has the texture's opacity match the underlying geometry, it won't show anything. If LDCad makes the texture itself fully opaque, it should match LDView.

There is another solution, but it's much more elaborate, and won't necessarily work. You can actually specify the bricks behind the texture inside the textured region, instead of the single quad that is there now. This also requires calculating the correct scaled texture coordinates, which the existing sticker doesn't have. Also, the bricks will be textured on both sides, so if the backs of the bricks show, it won't really work. Finally, anywhere that there aren't any bricks, the texture will be missing. But, assuming you're trying to get the texture to show on the side of a vehicle, it would work, as long as you can't see the backs of the bricks.

Thank you very much it did work as expected.


[img]blob:https://imgur.com/b19c8659-24c3-4219-947c-d26ba5480d79[/img][Image: yQdj2wb.png]


i did test your option before but only on ldcad. looks like the rendering is different than in ldview. ;Winkn ldview work ok and in ldcad the object its invisible.
(2018-11-06, 18:59)Travis Cobbs Wrote: [ -> ]Not sure about LDCad, though. I think the LDraw texturing spec makes it ambiguous about what the correct behavior is for the above. If LDCad has the texture's opacity match the underlying geometry, it won't show anything. If LDCad makes the texture itself fully opaque, it should match LDView.

The texture will become part of the underlying geometry, so it will indeed become invisible as a whole.

The ambiguity on this in the spec has come up before, but in practice I don't think you always want one or the other behavior. So we might need to make it an option somehow?

I'm not sure how to get the desired effect as wanted here using the fixed pipeline though, but I would certainly address it in the 2.0 engine.
Pages: 1 2 3 4