Away3D Forum http://away3d.com/forum/ Away3D Forum en Copyright 2017 2017-04-26T08:53:29+00:00 Problem with stage3D and away3D http://away3d.com/forum/viewthread/6218/ http://away3d.com/forum/viewthread/6218/#When:07:19:12Z <p>Ok that is so strange it make like 3 hour i try to figure this out. First… everything was working correctly so i don’t know what i change or if i updated to new code for starling or away3d and i dont think so.</p> <p>I use the standard code to create a stage3DProxy</p> <div class="codeblock"><code><span style="color: #000000"> <span style="color: #FF8000">/**<br />&nbsp;&nbsp;&nbsp;*&nbsp;will&nbsp;start&nbsp;the&nbsp;engine<br />&nbsp;&nbsp;&nbsp;*/<br />&nbsp;&nbsp;</span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">StartUpEngine</span><span style="color: #007700">():</span><span style="color: #0000BB">void&nbsp;{<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Define&nbsp;a&nbsp;new&nbsp;Stage3DManager&nbsp;for&nbsp;the&nbsp;Stage3D&nbsp;objects<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">stage3DManager&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Stage3DManager</span><span style="color: #007700">.</span><span style="color: #0000BB">getInstance</span><span style="color: #007700">(</span><span style="color: #0000BB">stage</span><span style="color: #007700">);<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Create&nbsp;a&nbsp;new&nbsp;Stage3D&nbsp;proxy&nbsp;to&nbsp;contain&nbsp;the&nbsp;separate&nbsp;views<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">stage3DProxy&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">stage3DManager</span><span style="color: #007700">.</span><span style="color: #0000BB">getFreeStage3DProxy</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">stage3DProxy</span><span style="color: #007700">.</span><span style="color: #0000BB">addEventListener</span><span style="color: #007700">(</span><span style="color: #0000BB">Stage3DEvent</span><span style="color: #007700">.</span><span style="color: #0000BB">CONTEXT3D_CREATED</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">onContextCreated</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">stage3DProxy</span><span style="color: #007700">.</span><span style="color: #0000BB">antiAlias&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">8</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">stage3DProxy</span><span style="color: #007700">.</span><span style="color: #0000BB">color&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0xff0000</span><span style="color: #007700">;<br />&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #007700">private&nbsp;function&nbsp;</span><span style="color: #0000BB">onContextCreated</span><span style="color: #007700">(</span><span style="color: #0000BB">event&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">Stage3DEvent</span><span style="color: #007700">)&nbsp;:&nbsp;</span><span style="color: #0000BB">void&nbsp;{<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;stage3DProxy</span><span style="color: #007700">.</span><span style="color: #0000BB">removeEventListener</span><span style="color: #007700">(</span><span style="color: #0000BB">Stage3DEvent</span><span style="color: #007700">.</span><span style="color: #0000BB">CONTEXT3D_CREATED</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">onContextCreated</span><span style="color: #007700">);<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">stage3DProxy</span><span style="color: #007700">.</span><span style="color: #0000BB">width&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">stage</span><span style="color: #007700">.</span><span style="color: #0000BB">fullScreenWidth</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">stage3DProxy</span><span style="color: #007700">.</span><span style="color: #0000BB">height&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">stage</span><span style="color: #007700">.</span><span style="color: #0000BB">fullScreenHeight</span><span style="color: #007700">;<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Init&nbsp;everything<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">InitAway3D</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">InitStarling</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">InitListeners</span><span style="color: #007700">();<br />&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #0000BB">}&nbsp;</span> </span> </code></div> <p>all was working.. now… away3D is working but i can’t get starling to render… it’s clearly there when i trace it.</p> <p>I do have a enter_frame event that do a nextFrame()</p> <div class="codeblock"><code><span style="color: #000000"> <span style="color: #007700">private&nbsp;function&nbsp;</span><span style="color: #0000BB">InitListeners</span><span style="color: #007700">():</span><span style="color: #0000BB">void&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;stage3DProxy</span><span style="color: #007700">.</span><span style="color: #0000BB">addEventListener</span><span style="color: #007700">(</span><span style="color: #0000BB">Event</span><span style="color: #007700">.</span><span style="color: #0000BB">ENTER_FRAME</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">onEnterFrame</span><span style="color: #007700">);<br />&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #007700">private&nbsp;function&nbsp;</span><span style="color: #0000BB">onEnterFrame</span><span style="color: #007700">(</span><span style="color: #0000BB">e</span><span style="color: #007700">:</span><span style="color: #0000BB">Event</span><span style="color: #007700">):</span><span style="color: #0000BB">void&nbsp;{<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//render&nbsp;starling&nbsp;and&nbsp;away3d<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">away3DInstance</span><span style="color: #007700">.</span><span style="color: #0000BB">render</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">starlingInstance</span><span style="color: #007700">.</span><span style="color: #0000BB">nextFrame</span><span style="color: #007700">();<br />&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #0000BB">}&nbsp;</span> </span> </code></div> <p>all pretty standard and it worked!</p> <p>if i just disable the proxy and do a normal starling instance it’s working.</p> <p>i swear all was working yesterday i just don’t get it. i trie dto just disable the away3D and starling still not render. it’s like the proxy wasn’t working but IT WAS working before…</p> <p>Anyone got a hints ? it make 3 hours i’m searching and i’ve tested every options.</p> <p>read more: <a href="http://toyota-caudien.com/bao-gia-xe-toyota-fortuner-2017/">toyota fortuner 2017</a>, <a href="http://otodongvang.vn/xe-tai-hyundai-2-tan-tera-190-1-1-1565014.html">hyundai tera 190</a>, <a href="http://mitsubishihadong.vn/car-listing/gia-xe-mitsubishi-attrage-2017">mitsubishi attrage 2017</a></p> 2017-04-26T07:19:12+00:00 Away3D questions http://away3d.com/forum/viewthread/6212/ http://away3d.com/forum/viewthread/6212/#When:09:26:06Z <p>Hi guys, I am starting to work with Away3D and I will have few questions in an upcoming days for those who already worked with it.</p> <p>Question: Is it possible to decrease the number of polygons on the external model without editing the model in some 3D graphic software? I have bought human model made in 3D Max but it is so complex</p> <p>Tags: <a href="http://toyota-caudien.com/bao-gia-xe-toyota-fortuner-2017/">gia toyota fortuner 2017</a>, <a href="http://mitsubishihadong.vn/car-listing/gia-xe-mitsubishi-new-outlander-2017">gia mitsubishi new outlander 2017</a></p> 2017-04-12T09:26:06+00:00 File not found: file:/C:/Program Files (x86)/Adobe Gaming SDK 1.4/Samples - Copy/Away3D/Invawayders/bin-debug/Main.html http://away3d.com/forum/viewthread/6129/ http://away3d.com/forum/viewthread/6129/#When:17:02:25Z <p>When I run the sample program invawaders in flash builder, I got the following error. Please help. Thanks.</p> <p>File not found: file:/C:/Program Files (x86)/Adobe Gaming SDK 1.4/Samples - Copy/Away3D/Invawayders/bin-debug/Main.html</p> 2016-07-18T17:02:25+00:00 Artifacts when change properties of CylinderGeometry? http://away3d.com/forum/viewthread/6096/ http://away3d.com/forum/viewthread/6096/#When:21:55:52Z <p>If I create a cylinder geometry by doing<br /> var cyl:CylinderGeometery = new cyl:CylinderGeometery()<br /> cyl.topRadius = 5; // Or any other property change</p> <p>Then I see the correct shape, but I also see an artifact that looks like a piece of the side of the original cylinder.&nbsp; </p> <p>But if I pass in all the properties when I create the cylinder, e.g.<br /> var cyl:CylinderGeometery = new cyl:CylinderGeometery(5, etc)</p> <p>then it renders correctly.&nbsp; Is this a bug, or do I need to do something to clear the geometry before or after I change its properties?<br /> Thanks!</p> 2016-05-17T21:55:52+00:00 3d renders http://away3d.com/forum/viewthread/6054/ http://away3d.com/forum/viewthread/6054/#When:17:46:17Z <p> “Hi guys, <br /> I have a question. Do you make 3d renders of your projects in-house or use outsource visualization company?”</p> 2016-03-14T17:46:17+00:00 OrthographicLens.unproject http://away3d.com/forum/viewthread/5839/ http://away3d.com/forum/viewthread/5839/#When:08:05:04Z <p>away3d.cameras.lenses.OrthographicLens.as</p> <p>51 &nbsp; override public function unproject(...):Vector3D<br /> ...<br /> 56 v.x = nX + translation.x;<br /> 57 <span style="color:red;">v.y = nX + translation.y;</span> //should be v.y = -nY + translation.y;<br /> 58 v.z = sZ;<br /> 59 v.w = 1;<br /> ...</p> <p>*away3d-core-fp11-4.1.6</p> 2015-04-13T08:05:04+00:00 Strange behavior when calling consecutive transform within an event http://away3d.com/forum/viewthread/5422/ http://away3d.com/forum/viewthread/5422/#When:13:58:34Z <p>Basically, you can’t access a sceneTtransform and set an unrelated object.transform within an event…?</p> <div class="codeblock"><code><span style="color: #000000"> <span style="color: #007700">private&nbsp;function&nbsp;</span><span style="color: #0000BB">initCameraListener</span><span style="color: #007700">()&nbsp;:&nbsp;</span><span style="color: #0000BB">void&nbsp;{<br />&nbsp;&nbsp;&nbsp;view</span><span style="color: #007700">.</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">addEventListener</span><span style="color: #007700">(</span><span style="color: #0000BB">Object3DEvent</span><span style="color: #007700">.</span><span style="color: #0000BB">SCENETRANSFORM_CHANGED</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">onCameraChange</span><span style="color: #007700">);<br />&nbsp;&nbsp;</span><span style="color: #0000BB">}<br /><br />&nbsp;&nbsp;</span><span style="color: #007700">private&nbsp;function&nbsp;</span><span style="color: #0000BB">onCameraChange</span><span style="color: #007700">(</span><span style="color: #0000BB">event&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">Object3DEvent</span><span style="color: #007700">)&nbsp;:&nbsp;</span><span style="color: #0000BB">void&nbsp;{<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">const&nbsp;</span><span style="color: #0000BB">camera&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">Camera3D&nbsp;</span><span style="color: #007700">=&nbsp;(</span><span style="color: #0000BB">event</span><span style="color: #007700">.</span><span style="color: #0000BB">target&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">Camera3D</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;const&nbsp;</span><span style="color: #0000BB">obj&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">Object3D&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">Object3D</span><span style="color: #007700">();<br /><br />&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;********************************************************<br />&nbsp;&nbsp;&nbsp;//&nbsp;Does&nbsp;nothing,&nbsp;purposely.&nbsp;Just&nbsp;to&nbsp;force&nbsp;a&nbsp;getter&nbsp;call.<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">sceneTransform</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;This&nbsp;affects&nbsp;the&nbsp;camera&nbsp;hover!<br />&nbsp;&nbsp;&nbsp;//&nbsp;Comment&nbsp;out&nbsp;this&nbsp;line,&nbsp;or&nbsp;the&nbsp;above&nbsp;one&nbsp;to&nbsp;get&nbsp;the&nbsp;expected&nbsp;result<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">obj</span><span style="color: #007700">.</span><span style="color: #0000BB">transform&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">Matrix3D</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;********************************************************<br />&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;//&nbsp;//&nbsp;//&nbsp;//&nbsp;//&nbsp;//////////////////////////////////////////&nbsp;</span> </span> </code></div> <p>I’ve attached a full code for an example of this strange behaviour. </p> <p>I speculate that it is caused by parallel access of statics consts like Matrix3DUtils.RAW_DATA_CONTAINER and others. </p> <p>I understand that it optimizes the memory access avoiding constant memory allocation, but it may cause some weird problems when running in asynch codes.</p> <p>&nbsp;</p> 2014-04-10T13:58:34+00:00 Possible Memory Leak in Away3D OpenFL in removeChild() method http://away3d.com/forum/viewthread/5810/ http://away3d.com/forum/viewthread/5810/#When:02:01:49Z <p>I have already made a post on GitHub about this issue <a href="https://github.com/away3d/away3d-core-openfl/issues/35">here</a>. This post is just to submit some code demonstrating the issue I am experiencing and to see if anyone knows what I am doing wrong, or if this is really a memory leak in Away3D.</p> 2015-03-08T02:01:49+00:00 DelaunayMesh - BUG http://away3d.com/forum/viewthread/2791/ http://away3d.com/forum/viewthread/2791/#When:00:33:25Z <p>I am playing with Delaunay extrusion and it is not drawing my mesh correctly. I tried same coordinates with Linear Extrude and it works fine. Here is example</p> <div class="codeblock"><code><span style="color: #000000"> <span style="color: #007700">var&nbsp;</span><span style="color: #0000BB">vec</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">Vector</span><span style="color: #007700">.&lt;</span><span style="color: #0000BB">Vector3D</span><span style="color: #007700">&gt;;<br /></span><span style="color: #0000BB">vec</span><span style="color: #007700">.</span><span style="color: #0000BB">push</span><span style="color: #007700">(new&nbsp;</span><span style="color: #0000BB">Vector3D</span><span style="color: #007700">(</span><span style="color: #0000BB">4</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,-</span><span style="color: #0000BB">534.6</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">vec</span><span style="color: #007700">.</span><span style="color: #0000BB">push</span><span style="color: #007700">(new&nbsp;</span><span style="color: #0000BB">Vector3D</span><span style="color: #007700">(</span><span style="color: #0000BB">1338.4</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,-</span><span style="color: #0000BB">534.6</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">vec</span><span style="color: #007700">.</span><span style="color: #0000BB">push</span><span style="color: #007700">(new&nbsp;</span><span style="color: #0000BB">Vector3D</span><span style="color: #007700">(</span><span style="color: #0000BB">1338.4</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,-</span><span style="color: #0000BB">4</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">vec</span><span style="color: #007700">.</span><span style="color: #0000BB">push</span><span style="color: #007700">(new&nbsp;</span><span style="color: #0000BB">Vector3D</span><span style="color: #007700">(</span><span style="color: #0000BB">914.4</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,-</span><span style="color: #0000BB">4</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">vec</span><span style="color: #007700">.</span><span style="color: #0000BB">push</span><span style="color: #007700">(new&nbsp;</span><span style="color: #0000BB">Vector3D</span><span style="color: #007700">(</span><span style="color: #0000BB">914.4</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,-</span><span style="color: #0000BB">170.6</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">vec</span><span style="color: #007700">.</span><span style="color: #0000BB">push</span><span style="color: #007700">(new&nbsp;</span><span style="color: #0000BB">Vector3D</span><span style="color: #007700">(</span><span style="color: #0000BB">4</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,-</span><span style="color: #0000BB">170.6</span><span style="color: #007700">));<br /><br />var&nbsp;</span><span style="color: #0000BB">plane</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">DelaunayMesh</span><span style="color: #007700">(</span><span style="color: #0000BB">mat</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">vec</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">DelaunayMesh</span><span style="color: #007700">.</span><span style="color: #0000BB">PLANE_XZ</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,</span><span style="color: #0000BB">false</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true&nbsp;</span><span style="color: #007700">);&nbsp;</span> </span> </code></div> <p>I hope this is easy to resolve.</p> 2012-07-13T00:33:25+00:00 Screenshot does not work on multiply views http://away3d.com/forum/viewthread/5769/ http://away3d.com/forum/viewthread/5769/#When:01:45:07Z <p>Hi,</p> <p>The problem is shat queueSnapshot does not work on multiply views and the reason is the code in RendererBase.as:</p> <div class="codeblock"><code><span style="color: #000000"> <span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">_shareContext</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">_snapshotRequired&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;</span><span style="color: #0000BB">_snapshotBitmapData</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_context</span><span style="color: #007700">.</span><span style="color: #0000BB">drawToBitmapData</span><span style="color: #007700">(</span><span style="color: #0000BB">_snapshotBitmapData</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">_snapshotRequired&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</span> </span> </code></div> <p>Any workaround?</p> 2015-01-28T01:45:07+00:00