<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Arial",sans-serif;
        color:black;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:"Courier New";
        mso-fareast-language:DE;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:631902966;
        mso-list-type:hybrid;
        mso-list-template-ids:31390764 67567631 67567641 67567643 67567631 67567641 67567643 67567631 67567641 67567643;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi, <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I’m struggling around with some glitches. For the most situations my scene looks fine, but in some cases I got some side effects.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span lang="EN-US">It looks, that the transparent texture is always rendered on top. But from the used coordinates it is the last object behind all others.
<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span lang="EN-US">When I move close to the screen edge the transparency turns off, and the textured object turns black on top of all other objects.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Maybe a short description about the current scene.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I try to show some different overlapping objects: e.g. a colorized point cloud, some transparent and colorized shapes like triangles, and in the background (or better) near the ground plane a transparent texture. The
 transparent texture is moved into the opaque_bin… <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#BEC0C2;mso-fareast-language:DE">   
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#FF8080;mso-fareast-language:DE">osg</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:DE">::<span style="color:#FF8080">StateSet</span>*<span style="color:#BEC0C2">
</span><span style="color:#D6BB9A">stateSet</span><span style="color:#BEC0C2"> </span>
=<span style="color:#BEC0C2"> </span><span style="color:#D6BB9A">geo</span>->getOrCreateStateSet();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#BEC0C2;mso-fareast-language:DE">   
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#D6BB9A;mso-fareast-language:DE">stateSet-></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:DE">setMode(<span style="color:#BEC0C2">
</span><span style="color:#FF6AAD">GL_BLEND</span>,<span style="color:#BEC0C2"> </span>
<span style="color:#FF8080">osg</span>::<span style="color:#FF8080">StateAttribute</span>::<i><span style="color:#66A334">ON</span></i><span style="color:#BEC0C2">
</span>);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#BEC0C2;mso-fareast-language:DE">   
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#D6BB9A;mso-fareast-language:DE">stateSet</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:DE">->setTextureAttributeAndModes(<span style="color:#BEC0C2">
</span><span style="color:#8A602C">0</span>,<span style="color:#BEC0C2"> </span>m_texture,<span style="color:#BEC0C2">
</span><span style="color:#FF8080">osg</span>::<span style="color:#FF8080">StateAttribute</span>::<i><span style="color:#66A334">ON</span></i><span style="color:#BEC0C2">
</span>);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#BEC0C2;mso-fareast-language:DE">   
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#D6BB9A;mso-fareast-language:DE">stateSet</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:DE">->setRenderingHint(<span style="color:#BEC0C2">
</span><span style="color:#FF8080">osg</span>::<span style="color:#FF8080">StateSet</span>::<i><span style="color:#66A334">OPAQUE_BIN</span></i><span style="color:#BEC0C2">
</span>);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#BEC0C2;mso-fareast-language:DE">   
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#D6BB9A;mso-fareast-language:DE">stateSet</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";mso-fareast-language:DE">->setMode(<span style="color:#BEC0C2">
</span><span style="color:#FF6AAD">GL_DEPTH_TEST</span>,<span style="color:#BEC0C2">
</span><span style="color:#FF8080">osg</span>::<span style="color:#FF8080">StateAttribute</span>::<i><span style="color:#66A334">OFF</span></i><span style="color:#BEC0C2">
</span>);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#BEC0C2;mso-fareast-language:DE">        </span><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#D6BB9A;mso-fareast-language:DE">stateSet</span><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:DE">->setMode(<span style="color:#BEC0C2">
</span><span style="color:#FF6AAD">GL_LIGHTING</span>,<span style="color:#BEC0C2">
</span><span style="color:#FF8080">osg</span>::<span style="color:#FF8080">StateAttribute</span>::<i><span style="color:#66A334">OFF</span></i><span style="color:#BEC0C2">
</span>);</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">… when I try to put it to transparent_bin I got some smearing effects, but the described effect is still there.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Currently I’m not sure if I do not run into some other issues as well like clipping or something like that. Or maybe a shadow.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Maybe you have an hint or some further information, anything would be more than welcome ;)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Florian<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>