Looking a tutorial to make a custom part!


Looking a tutorial to make a custom part!
#1
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]
Reply
RE: Looking a tutorial to make a custom part!
#2
(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
Reply
RE: Looking a tutorial to make a custom part!
#3
(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!!!!
Reply
RE: Looking a tutorial to make a custom part!
#4
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
Reply
RE: Looking a tutorial to make a custom part!
#5
(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".
Reply
RE: Looking a tutorial to make a custom part!
#6
(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
Reply
RE: Looking a tutorial to make a custom part!
#7
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]
Reply
RE: Looking a tutorial to make a custom part!
#8
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.
Reply
RE: Looking a tutorial to make a custom part!
#9
(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.
Reply
RE: Looking a tutorial to make a custom part!
#10
(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.
Reply
RE: Looking a tutorial to make a custom part!
#11
(2018-11-06, 20:54)Roland Melkert Wrote:
(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.

I agree that being able to set the transparency of the texture independently of the transparency of the underlying geometry would be useful. LDView uses two passes to draw textures (which sometimes leads to texture static). The first pass draws the textured geometry in whatever color it might be, and the second draws just the texture. The texture pass uses the opacity from the alpha channel of the PNG file, but doesn't pay attention to the underlying geometry's transparency.

This is obviously not ideal, but even before LDView worked with textures on transparent geometry, that was the only way I could figure out to support both lit and unlit textures.
Reply
RE: Looking a tutorial to make a custom part!
#12
(2018-11-07, 5:06)Travis Cobbs Wrote: I agree that being able to set the transparency of the texture independently of the transparency of the underlying geometry would be useful.

Actually, as I think about this more, I don't think it would be a good idea to make the texture's transparency an option. I think it would be better if the spec said that all textures should be applied fully opaque, and only allow partial transparency via the alpha channel in the texture. So if you have a sticker that is partially transparent, then the transparent pixels in the texture should be partially transparent.

Of course, you already said that LDCad would have trouble having the texture be opaque when the underlying geometry is transparent, so I'm not sure that clarifying the spec in this way is really fair to you.
Reply
RE: Looking a tutorial to make a custom part!
#13
(2018-11-08, 5:38)Travis Cobbs Wrote:
(2018-11-07, 5:06)Travis Cobbs Wrote: I agree that being able to set the transparency of the texture independently of the transparency of the underlying geometry would be useful.

Actually, as I think about this more, I don't think it would be a good idea to make the texture's transparency an option. I think it would be better if the spec said that all textures should be applied fully opaque, and only allow partial transparency via the alpha channel in the texture. So if you have a sticker that is partially transparent, then the transparent pixels in the texture should be partially transparent.

Of course, you already said that LDCad would have trouble having the texture be opaque when the underlying geometry is transparent, so I'm not sure that clarifying the spec in this way is really fair to you.

I was wondering about real life situations where the sticker should be transparent (like its handled in LDCad now), and couldn't think of any to be honest.

Using alpha<1.0 to make distinctions would be easy in shaders, but not in the fixed pipeline so it has to wait on 2.0 Smile
Reply
RE: Looking a tutorial to make a custom part!
#14
(2018-11-09, 19:44)Roland Melkert Wrote:
(2018-11-08, 5:38)Travis Cobbs Wrote: Actually, as I think about this more, I don't think it would be a good idea to make the texture's transparency an option. I think it would be better if the spec said that all textures should be applied fully opaque, and only allow partial transparency via the alpha channel in the texture. So if you have a sticker that is partially transparent, then the transparent pixels in the texture should be partially transparent.

Of course, you already said that LDCad would have trouble having the texture be opaque when the underlying geometry is transparent, so I'm not sure that clarifying the spec in this way is really fair to you.

I was wondering about real life situations where the sticker should be transparent (like its handled in LDCad now), and couldn't think of any to be honest.

Using alpha<1.0 to make distinctions would be easy in shaders, but not in the fixed pipeline so it has to wait on 2.0 Smile


Im thinking in 2 options.

1 let ldcad automatically render alpha channel of the png files. and let those parts transparent.
2 they can modify the 0 !TEXMAP START PLANAR and add an extra parameter that gives you the alpha channel level from 0 opaque to 100 transpatrent.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 2 Guest(s)
Forum Jump:


Users browsing this thread: 2 Guest(s)