<?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: 2d picture/image with alpha channel in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/2d-picture-image-with-alpha-channel/m-p/29116#M28999</link>
    <description>Here's a picture object (version 10)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
Regards, Juha</description>
    <pubDate>Fri, 15 Feb 2008 00:30:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-02-15T00:30:13Z</dc:date>
    <item>
      <title>2d picture/image with alpha channel</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/2d-picture-image-with-alpha-channel/m-p/29113#M28996</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;howdy&lt;BR /&gt;
&lt;BR /&gt;
looking to do the following&lt;BR /&gt;
&lt;BR /&gt;
i have 4 or 5 images (people/ animals)&lt;BR /&gt;
&lt;BR /&gt;
i want to use them in elevations/ sections (2D only.... no need for 3D)&lt;BR /&gt;
&lt;BR /&gt;
the images themselves will have alpha channels&lt;BR /&gt;
&lt;BR /&gt;
how do i go about scripting an object that allows me to:&lt;BR /&gt;
- have a parameter to scale the image&lt;BR /&gt;
- allow the image to be the correct size at different scales&lt;BR /&gt;
- turn the alpha channel on/off&lt;BR /&gt;
- get the alpha channel image into the lib part (better to use external images that are called in... or embed them in fragments?)&lt;BR /&gt;
&lt;BR /&gt;
HUGE thanks in advance&lt;BR /&gt;
&lt;BR /&gt;
yukioMishima&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 Feb 2008 16:31:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/2d-picture-image-with-alpha-channel/m-p/29113#M28996</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-02-13T16:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: 2d picture/image with alpha channel</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/2d-picture-image-with-alpha-channel/m-p/29114#M28997</link>
      <description>I checked the GDL Manual. There is a PICTURE command for placing images in 3D, and there is a PICTURE2 command for placing pictures in 2D. You would probably need the PICTURE2 command.&lt;BR /&gt;
However, it seems to me that alpha channel is very limited in the PICTURE2 command. It has a variation, the PICTURE2{2} command, which makes it posibble to use the alpha channel for transparency, but that is all.&lt;BR /&gt;
&lt;BR /&gt;
If you have A and B as the two main parameters of the Object, then its width and height can be scripted to be set by these parameters and so you can distort it any way you like.&lt;BR /&gt;
&lt;BR /&gt;
If you want it to be like 1 meter (1 meter is the project not on paper) at all scales, that will happen by default. If you want it to be something like 100 millimeters (always 100 millimeters on paper) at all scales, then you will have to use the GLOB_SCALE variable of GDL to resize it depending on the current scale.&lt;BR /&gt;
&lt;BR /&gt;
The name of the external picture file has to be a parameter string-type. Check the Picture 11.gsm file so see how it is done. I don't knowright now if you can give a full path tho the file's location or it must be in the loaded libraries and you can just give the file name.</description>
      <pubDate>Thu, 14 Feb 2008 18:03:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/2d-picture-image-with-alpha-channel/m-p/29114#M28997</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2008-02-14T18:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: 2d picture/image with alpha channel</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/2d-picture-image-with-alpha-channel/m-p/29115#M28998</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
1] Import the desired pics to the plan adjusting the size and transparency settings (see attachment)&lt;BR /&gt;
&lt;BR /&gt;
2] Put the pics on top of each other near the origin&lt;BR /&gt;
&lt;BR /&gt;
3] Select the pile of pics and "Save as object..." -&amp;gt; this includes the pics in the object binary, each of them has a different layer/index&lt;BR /&gt;
&lt;BR /&gt;
4] Open the object to be edited and add two new parameters; &lt;BR /&gt;
"&lt;B&gt;pict_no&lt;/B&gt;" type= integer &amp;amp; "&lt;B&gt;trans&lt;/B&gt;" type= checkbox&lt;BR /&gt;
&lt;BR /&gt;
5] Add to 2D-code; &lt;B&gt;picture2{2} pict_no, a, b, trans&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
That's it - the pict_no can be between 1 and the number of the &lt;BR /&gt;
saved pics. The trans-parameter adjusts the white pixel transparency.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
If you want to have the pict in the 3D too just add to 3D-code;&lt;BR /&gt;
&lt;BR /&gt;
rotx 90 !&amp;lt;-----needed only for upright position&lt;BR /&gt;
hotspot 0, 0, 0&lt;BR /&gt;
hotspot a, 0, 0&lt;BR /&gt;
hotspot a, b, 0&lt;BR /&gt;
hotspot 0, b, 0&lt;BR /&gt;
picture pict_no, a, b, trans&lt;BR /&gt;
del 1 !&amp;lt;-----needed only for upright position&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Hope this helps, I post one example object in the next post&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
&lt;BR /&gt;
Best Regards, Juha</description>
      <pubDate>Fri, 15 Feb 2008 00:27:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/2d-picture-image-with-alpha-channel/m-p/29115#M28998</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-02-15T00:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: 2d picture/image with alpha channel</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/2d-picture-image-with-alpha-channel/m-p/29116#M28999</link>
      <description>Here's a picture object (version 10)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
Regards, Juha</description>
      <pubDate>Fri, 15 Feb 2008 00:30:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/2d-picture-image-with-alpha-channel/m-p/29116#M28999</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-02-15T00:30:13Z</dc:date>
    </item>
  </channel>
</rss>

