@pspeed said:
Respectfully...
The problem is that there are about 4 or 5 things you can do to mess up transparency. We don’t know if you’ve failed to put something in the transparent bucket. We don’t know if you’ve failed to set blending, etc… all of which are easy hits if you search the forum for “transparency”.
If you’d shown us what you tried already then we could have zeroed right in on what to tell you rather than repeating advice that already appears on the forum every two days.
My guess was that you never put the object in the transparent bucket. Already you’ve gotten one response that assumed you had already done that and were seeing problems from it. You see how this looping gets pretty confusing after a while.
I just want to make clear that you’ve already given me much needed advice so I’m only posting this to clarify things if you have any further suggestions, this was already somewhat helpful.
The thing is, I have no code set up (well, of course I do for the general project I’m developing, but not for this specific task).
I was asking so I could get advice in the form of “how to” (or a suggestion).
If I DO want to put my question into “code”, it is something like this:
[java]
Box b = new Box(Vector3f.ZERO, 1f, 1f, 1f);
Geometry g = new Geometry(“Image”, b);
Material mat = new Material(assetManager, UNSHADED);
mat.setColor(“Color”, ColorRGBA.Green);
g.setMaterial(mat);
rootNode.attachChild(g);
Box b2 = new Box(Vector3f.ZERO, 1f, 1f, 1f);
Geometry g2 = new Geometry(“Image”, b2);
Material mat2 = new Material(assetManager, UNSHADED);
mat2.setColor(“Color”, ColorRGBA.Red);
g2.setMaterial(mat2);
g2.move(1f,0f,0.5f);
rootNode.attachChild(g2);
Box b3 = new Box(Vector3f.ZERO, 1f, 1f, 1f);
Geometry g3 = new Geometry(“Image”, b3);
Material mat3 = new Material(assetManager, UNSHADED);
mat3.setColor(“Color”, ColorRGBA.Blue);
g3.setMaterial(mat3);
g3.move(1f,0f,-2f);
rootNode.attachChild(g3);
[/java]
(I’ve added a picture in the end that shows exactly what I want if the text isn’t clear).
There is no transparency here (I know) - If you imagine the scene, it’ll have three boxes: a blue one further away on the Z-axis (to the rear), then a green box, then closest to us would be a red box. The red box only “covers” (from out point of view) a part of the box with the image behind it, while we don’t see the blue box at all, since it is in the back. What I want to do is this: I don’t care about the “color” of the red box at all, but I do want the part of the green box behind the red box to “disappear”, showing the blue box behind, or the background (where there is no blue box). Naturally the red box would have to be transparent to do that (just add it to the bucket, it’s no problem), but the hard part is not the transparency but making such a thing happen.
I’m adding an image to help clarify the issue:
Explanation
Just to explain myself better 