<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Polygon::HasMaterialTexture vs Polygon::HasPolygonTexture vs MeshBody::GetTexture() in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Polygon-HasMaterialTexture-vs-Polygon-HasPolygonTexture-vs/m-p/279880#M2159</link>
    <description>Thanks for the clarification.&lt;BR /&gt;
&lt;BR /&gt;
So then, I should interpret the HasPolygonTexture to mean that the polygon still uses the material, but overrides the texture portion of the material?</description>
    <pubDate>Mon, 05 Jul 2021 03:06:49 GMT</pubDate>
    <dc:creator>drjustice</dc:creator>
    <dc:date>2021-07-05T03:06:49Z</dc:date>
    <item>
      <title>Polygon::HasMaterialTexture vs Polygon::HasPolygonTexture vs MeshBody::GetTexture()</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Polygon-HasMaterialTexture-vs-Polygon-HasPolygonTexture-vs/m-p/279878#M2157</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi.&lt;BR /&gt;&lt;BR /&gt;It seems there are different ways of getting textures while iterating through the mesh bodies of an element.&lt;BR /&gt;&lt;BR /&gt;There's: &lt;BR /&gt;- MeshBody::GetTexture( &amp;amp;texture );&lt;BR /&gt;&lt;BR /&gt;- MeshBody::GetMaterial( &amp;amp;material ); material.HasTexture() and then material.GetTexture( &amp;amp;texture )&lt;BR /&gt;&lt;BR /&gt;- MeshBody::GetPolygon(ipolygon, &amp;amp;polygon); polygon.HasPolygonTexture(); polygon.GetTexture( &amp;amp;texture );&lt;BR /&gt;&lt;BR /&gt;- MeshBody::GetPolygon(ipolygon, &amp;amp;polygon); polygon.HasMaterialTexture(); polygon.GetTexture( &amp;amp;texture );&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So....&lt;BR /&gt;&lt;BR /&gt;- Is it guaranteed that a mesh body will have only a single texture?&lt;BR /&gt;&lt;BR /&gt;- Is there a possibility that a polygon in a mesh body gets overridden with texture other than the one of the mesh body?&lt;BR /&gt;&lt;BR /&gt;- What's the difference between Polygon::HasPolygonTexture() and Polygon::HasMaterialTexture() ?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:29:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Polygon-HasMaterialTexture-vs-Polygon-HasPolygonTexture-vs/m-p/279878#M2157</guid>
      <dc:creator>drjustice</dc:creator>
      <dc:date>2021-09-14T07:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon::HasMaterialTexture vs Polygon::HasPolygonTexture vs MeshBody::GetTexture()</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Polygon-HasMaterialTexture-vs-Polygon-HasPolygonTexture-vs/m-p/279879#M2158</link>
      <description>That's a tricky one. Basically Modeler API returns the parameters used by the OpenGL rendering engine. It means every polygon can have at most 1 texture.&lt;BR /&gt;
&lt;BR /&gt;
The texture and the material is assigned to polygons and not meshes, so there can be different materials and textures in one mesh body.&lt;BR /&gt;
&lt;BR /&gt;
There are two ways to assign textures to a polygon:&lt;BR /&gt;

&lt;UL&gt;&lt;LI&gt;The polygon refers to a material that refers to a texture. This is the case in 99% of the time. In this case it's the best if you access texture from the material.&lt;/LI&gt;&lt;/UL&gt;
&lt;UL&gt;&lt;LI&gt;The polygon refers to a texture directly. This case can be detected by the &lt;B&gt;HasPolygonTexture&lt;/B&gt; call. In this case the texture doesn't come from the material, but directly assigned to the polygon.&lt;/LI&gt;&lt;/UL&gt;

To test the second case use the Carpet object from the Library.</description>
      <pubDate>Fri, 02 Jul 2021 09:34:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Polygon-HasMaterialTexture-vs-Polygon-HasPolygonTexture-vs/m-p/279879#M2158</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2021-07-02T09:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon::HasMaterialTexture vs Polygon::HasPolygonTexture vs MeshBody::GetTexture()</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Polygon-HasMaterialTexture-vs-Polygon-HasPolygonTexture-vs/m-p/279880#M2159</link>
      <description>Thanks for the clarification.&lt;BR /&gt;
&lt;BR /&gt;
So then, I should interpret the HasPolygonTexture to mean that the polygon still uses the material, but overrides the texture portion of the material?</description>
      <pubDate>Mon, 05 Jul 2021 03:06:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Polygon-HasMaterialTexture-vs-Polygon-HasPolygonTexture-vs/m-p/279880#M2159</guid>
      <dc:creator>drjustice</dc:creator>
      <dc:date>2021-07-05T03:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon::HasMaterialTexture vs Polygon::HasPolygonTexture vs MeshBody::GetTexture()</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Polygon-HasMaterialTexture-vs-Polygon-HasPolygonTexture-vs/m-p/279881#M2160</link>
      <description>&lt;BLOCKQUOTE&gt;Viktor wrote:&lt;BR /&gt;
Basically Modeler API returns the parameters used by the OpenGL rendering engine. It means every polygon can have at most 1 texture.&lt;/BLOCKQUOTE&gt;

So, what approach would you suggest I use if I want to obtain the non-basic material/texture properties, in order to do better than the standard OpenGL properties?&lt;BR /&gt;
&lt;BR /&gt;
Right now with that single texture of the basic renderer, I can generate a normal map from alpha intensity (or from rgb intensity if alpha is uniform or not present), Premultiplied RGB and RGBA maps, in order to simulate the alpha transparency effects of the basic renderer.  The net effect actually looks pretty decent, if I may say so, and with my rendering model I'm not sure how much I would actually gain by reading those c4d properties, unless they are much higher resolution vs the stock textures.&lt;BR /&gt;
&lt;BR /&gt;
Is there a way to easily enumerate the C4D rendering properties? Do all objects/materials suppport C4D rendering and properties?</description>
      <pubDate>Mon, 05 Jul 2021 03:20:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Polygon-HasMaterialTexture-vs-Polygon-HasPolygonTexture-vs/m-p/279881#M2160</guid>
      <dc:creator>drjustice</dc:creator>
      <dc:date>2021-07-05T03:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon::HasMaterialTexture vs Polygon::HasPolygonTexture vs MeshBody::GetTexture()</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Polygon-HasMaterialTexture-vs-Polygon-HasPolygonTexture-vs/m-p/279882#M2161</link>
      <description>&lt;BLOCKQUOTE&gt;drjustice wrote:&lt;BR /&gt;
Thanks for the clarification.&lt;BR /&gt;
&lt;BR /&gt;
So then, I should interpret the HasPolygonTexture to mean that the polygon still uses the material, but overrides the texture portion of the material?
&lt;/BLOCKQUOTE&gt;

Yes, that's right.</description>
      <pubDate>Tue, 06 Jul 2021 09:52:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Polygon-HasMaterialTexture-vs-Polygon-HasPolygonTexture-vs/m-p/279882#M2161</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2021-07-06T09:52:51Z</dc:date>
    </item>
  </channel>
</rss>

