Question about Debug Modifier (#)

Question about Debug Modifier (#)

I really like the transparency that comes with the Debug Modifier (#) but I'm not sure I understand what determines its behavior. Some objects are rendered in transparent pink, others are not. I couldn't find anything in the documentation that explains what factors are at work.

If there's some other way of achieving transparency - so that I can see an object inside an object - please share it with me. I tried using the transparency argument in color() but that didn't work.

Re: Question about Debug Modifier (#)

Hi!

Use alpha

color

Displays the child elements using the specified RGB color + alpha
value. This is only used for the F5 preview as CGAL and STL (F6) do not
currently support color. The alpha value will default to 1.0 (opaque)
if not specified.

> I really like the transparency that comes with the Debug Modifier (#)
> but I'm not sure I understand what determines its behavior. Some
> objects are rendered in transparent pink, others are not. I couldn't
> find anything in the documentation that explains what factors are at
> work.
>
> If there's some other way of achieving transparency - so that I can
> see an object inside an object - please share it with me. I tried
> using the transparency argument in color() but that didn't work.
>
> Thanks!
>
>
>
> --
> View this message in context:
> http://forum.openscad.org/Question-about-Debug-Modifier-tp14384.html> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org>

Re: Question about Debug Modifier (#)

Displays the child elements using the specified RGB color + alpha
value. This is only used for the F5 preview as CGAL and STL (F6) do not
currently support color. The alpha value will default to 1.0 (opaque)
if not specified.

> I really like the transparency that comes with the Debug Modifier (#)
> but I'm not sure I understand what determines its behavior. Some
> objects are rendered in transparent pink, others are not. I couldn't
> find anything in the documentation that explains what factors are at
> work.
>
> If there's some other way of achieving transparency - so that I can
> see an object inside an object - please share it with me. I tried
> using the transparency argument in color() but that didn't work.
>
> Thanks!
>
>>
> --
> View this message in context:
> http://forum.openscad.org/Question-about-Debug-Modifier-tp14384.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>

Re: Question about Debug Modifier (#)

Am I right that the F5 renderer optimisation routine takes no care about
the colour/transparency of an object in the foreground and therefore
doesn't render the covered object, if it comes first in code?

Re: Question about Debug Modifier (#)

Administrator

> On Nov 12, 2015, at 05:32 AM, Peter Ragosch <[hidden email]> wrote:
>
> Am I right that the F5 renderer optimisation routine takes no care about
> the colour/transparency of an object in the foreground and therefore
> doesn't render the covered object, if it comes first in code?
>
Yes, that’s how it currently works. We haven’t focused on fixing such rendering issues, as the larger task is to move the rendering code to a real framework: https://github.com/openscad/openscad/wiki/Project%3A-Improve-OpenGL-rendering

Re: Question about Debug Modifier (#)

Thanks for all the comments. My take-away is that the order of operations matter but I'm still unclear how. The code example that nophead offered seems to preview exactly as I would expect.

Here's a trivialized example of the behavior that is confusing me: This code lights up in transparent red (which is what I want):
#difference() {
union() {
cube(size=[30, 30, 35]);
//cube(size=[5,5,40]);
}

translate(v=[-10, -10, 10]) cube(size=[20, 20, 20]);
}

and this does not (which is what is confusing me):
#difference() {
union() {
cube(size=[30, 30, 35]);
cube(size=[5,5,40]);
}

Re: Question about Debug Modifier (#)

Thanks for all the comments. My take-away is that the order of operations
matter but I'm still unclear how. The code example that nophead offered
seems to preview exactly as I would expect.

Here's a trivialized example of the behavior that is confusing me: This code
lights up in transparent red (which is what I want):
#difference() {
union() {
cube(size=[30, 30, 35]);
//cube(size=[5,5,40]);
}

translate(v=[-10, -10, 10]) cube(size=[20, 20, 20]);
}

and this does not (which is what is confusing me):
#difference() {
union() {
cube(size=[30, 30, 35]);
cube(size=[5,5,40]);
}