<?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: Request distance from camera / Object visibility in view in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Request-distance-from-camera-Object-visibility-in-view/m-p/585821#M6248</link>
    <description>&lt;DIV class="page" title="Page 380"&gt;
&lt;DIV class="layoutArea"&gt;
&lt;DIV class="column"&gt;
&lt;P&gt;&lt;SPAN&gt;GLOB_EYEPOS_X&lt;/SPAN&gt;,&lt;/P&gt;
&lt;DIV class="page" title="Page 380"&gt;
&lt;DIV class="layoutArea"&gt;
&lt;DIV class="column"&gt;
&lt;P&gt;&lt;SPAN&gt;GLOB_EYEPOS_Y&lt;/SPAN&gt;,&lt;/P&gt;
&lt;DIV class="page" title="Page 380"&gt;
&lt;DIV class="layoutArea"&gt;
&lt;DIV class="column"&gt;
&lt;P&gt;&lt;SPAN&gt;GLOB_EYEPOS_Z&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;only usable in 2D and 3D Script&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 29 Jan 2024 18:58:14 GMT</pubDate>
    <dc:creator>Jochen Suehlo</dc:creator>
    <dc:date>2024-01-29T18:58:14Z</dc:date>
    <item>
      <title>Request distance from camera / Object visibility in view</title>
      <link>https://community.graphisoft.com/t5/GDL/Request-distance-from-camera-Object-visibility-in-view/m-p/585763#M6247</link>
      <description>&lt;P&gt;Can I do this in GDL? I am interested in using the first to control LOD depending on how close an object is to the camera.&lt;/P&gt;
&lt;P&gt;Ideally I would like to control via macro in MVO at what distances objects should drop to simplified, schematic and box or even not show at all.&lt;/P&gt;
&lt;P&gt;With the other one it might be possible to switch off 3D for objects that are not in an immediate view - for example my view is of kitchen and bathroom items are not in view so their 3D script can be skipped.&lt;BR /&gt;.&lt;BR /&gt;I am guessing if either of these did work it wouldn't be live but only update on regenerate?&lt;BR /&gt;&lt;BR /&gt;Edit: Sorry for posting in C++ API. I could have sworn I was in the GDL section... no way to move the post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;EDIT - it has been moved - Moderator.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 11:23:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Request-distance-from-camera-Object-visibility-in-view/m-p/585763#M6247</guid>
      <dc:creator>Davor P</dc:creator>
      <dc:date>2024-09-26T11:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Request distance from camera / Object visibility in view</title>
      <link>https://community.graphisoft.com/t5/GDL/Request-distance-from-camera-Object-visibility-in-view/m-p/585821#M6248</link>
      <description>&lt;DIV class="page" title="Page 380"&gt;
&lt;DIV class="layoutArea"&gt;
&lt;DIV class="column"&gt;
&lt;P&gt;&lt;SPAN&gt;GLOB_EYEPOS_X&lt;/SPAN&gt;,&lt;/P&gt;
&lt;DIV class="page" title="Page 380"&gt;
&lt;DIV class="layoutArea"&gt;
&lt;DIV class="column"&gt;
&lt;P&gt;&lt;SPAN&gt;GLOB_EYEPOS_Y&lt;/SPAN&gt;,&lt;/P&gt;
&lt;DIV class="page" title="Page 380"&gt;
&lt;DIV class="layoutArea"&gt;
&lt;DIV class="column"&gt;
&lt;P&gt;&lt;SPAN&gt;GLOB_EYEPOS_Z&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;only usable in 2D and 3D Script&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 29 Jan 2024 18:58:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Request-distance-from-camera-Object-visibility-in-view/m-p/585821#M6248</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2024-01-29T18:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Request distance from camera / Object visibility in view</title>
      <link>https://community.graphisoft.com/t5/GDL/Request-distance-from-camera-Object-visibility-in-view/m-p/586221#M6252</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I copied this explanation fr DNC's GDL cookbook4 , as a reference :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The GDL Cookbook 4&lt;BR /&gt;!Location Awareness Routine&lt;BR /&gt;!with camera global variables&lt;BR /&gt;!using the old letter system.&lt;BR /&gt;dkx=K~ - X~:IF dkx=0 THEN dkx=0.001&lt;BR /&gt;dly=L~ - Y~&lt;BR /&gt;dmz=M~ - Z~&lt;BR /&gt;dr =SQR(dkx^2 + dly^2) !Plan distance&lt;BR /&gt;dd =SQR(dkx^2 +dly^2 +dmz^2)!Distance&lt;BR /&gt;azi=ATN(dly/dkx) !Azimuth&lt;BR /&gt;IF facecam THEN ROTz 90+azi-W~&lt;BR /&gt;When does it not work?&lt;BR /&gt;If there is no camera, e.g. in an axonometric or an&lt;BR /&gt;elevation, you need a ‘get-out-clause’ to set a false distance&lt;BR /&gt;from the camera. This is to avoid a ‘divide by&lt;BR /&gt;zero’ error when calculating the azimuth. Thus the&lt;BR /&gt;variable dkx is given a tiny value of 1 mm.&lt;BR /&gt;The routine works with Sun Studies and Flythoughs.&lt;BR /&gt;Doors and Windows can open during an animation,&lt;BR /&gt;but must do so based on frame number. They do not&lt;BR /&gt;work correctly with ‘location awareness’ because they&lt;BR /&gt;subordinate themselves to the wall they are attached&lt;BR /&gt;to and you cannot write the routine for the wall.&lt;BR /&gt;&lt;BR /&gt;This location awareness routine can be used again –&lt;BR /&gt;keep it in your Scrapbook. I have done a model where&lt;BR /&gt;EVERY GDL component was location aware to keep&lt;BR /&gt;the rendering workload under control. If the model is&lt;BR /&gt;a mile or more in size, you can completely hide objects&lt;BR /&gt;too distant to be worth drawing.&lt;BR /&gt;Rebuild each Frame&lt;BR /&gt;This routine will work for still views with different camera&lt;BR /&gt;distances (after a ‘Rebuild’). To ensure that this&lt;BR /&gt;works during a movie flythrough, you need a REBUILD&lt;BR /&gt;EACH FRAME to happen during animation. This can&lt;BR /&gt;be enabled in the dialog box just prior to starting a&lt;BR /&gt;Flythrough.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;The Eye positions K~, L~, &amp;amp; M~ can also be called&lt;BR /&gt;GLOB_EYEPOS_X, Y &amp;amp; Z, and the Object positions X~,&lt;BR /&gt;Y~ &amp;amp; Z~ can be called SYMB_POS_X, Y &amp;amp; Z. The&lt;BR /&gt;adjustment to dkx avoids a divide by zero error. If azimuth&lt;BR /&gt;is critical there is more to it than this, but this routine is good&lt;BR /&gt;enough for trees and people.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 08:49:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Request-distance-from-camera-Object-visibility-in-view/m-p/586221#M6252</guid>
      <dc:creator>Toper Barrientos</dc:creator>
      <dc:date>2024-02-01T08:49:30Z</dc:date>
    </item>
  </channel>
</rss>

