Away3D Forum http://away3d.com/forum/ Away3D Forum en Copyright 2017 2017-04-27T08:25:45+00:00 360 3d rotation + fly in camera look direction http://away3d.com/forum/viewthread/4282/ http://away3d.com/forum/viewthread/4282/#When:18:42:36Z <p>Hey. Basically I am totally stuck whit this problem, and I am trying to find an answer for several months. I am trying to create a fly controller for mesh object. The idea is to simulate a first person 360*360*360 controller, similar whit regular first person controller but with additional dimension. If user looks up, the plane should go up and if user looks down the plane will go down. </p> <p>So far I have came up whit this. </p> <div class="codeblock"><code><span style="color: #000000"> <span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">y&nbsp;</span><span style="color: #007700">+=&nbsp;</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">sin</span><span style="color: #007700">(</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">rotationX&nbsp;</span><span style="color: #007700">*&nbsp;</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">PI&nbsp;</span><span style="color: #007700">/&nbsp;</span><span style="color: #0000BB">180</span><span style="color: #007700">)*(</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">sin</span><span style="color: #007700">(</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">rotationY&nbsp;</span><span style="color: #007700">*&nbsp;</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">PI&nbsp;</span><span style="color: #007700">/</span><span style="color: #0000BB">180</span><span style="color: #007700">)-</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">cos</span><span style="color: #007700">(</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">rotationZ&nbsp;</span><span style="color: #007700">*&nbsp;</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">PI&nbsp;</span><span style="color: #007700">/&nbsp;</span><span style="color: #0000BB">180</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">z&nbsp;</span><span style="color: #007700">-=&nbsp;</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">cos</span><span style="color: #007700">(</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">rotationY&nbsp;</span><span style="color: #007700">*&nbsp;</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">PI&nbsp;</span><span style="color: #007700">/&nbsp;</span><span style="color: #0000BB">180</span><span style="color: #007700">)*(</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">sin</span><span style="color: #007700">(</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">rotationZ&nbsp;</span><span style="color: #007700">*&nbsp;</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">PI&nbsp;</span><span style="color: #007700">/&nbsp;</span><span style="color: #0000BB">180</span><span style="color: #007700">)-</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">cos</span><span style="color: #007700">(</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">rotationX&nbsp;</span><span style="color: #007700">*&nbsp;</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">PI&nbsp;</span><span style="color: #007700">/&nbsp;</span><span style="color: #0000BB">180</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">x&nbsp;</span><span style="color: #007700">+=&nbsp;</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">sin</span><span style="color: #007700">(</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">rotationY</span><span style="color: #007700">*&nbsp;</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">PI</span><span style="color: #007700">/</span><span style="color: #0000BB">180</span><span style="color: #007700">);&nbsp;</span> </span> </code></div> <p>how ever there is a problem. This formula works OK until I one point and than just goes bananas. When I perform a couple of loops, the fly gets uncontrollable and the camera goes backward, or side by… Any ideas? I am going crazy whit this one…</p> 2013-03-28T18:42:36+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> 2017-04-26T07:19:12+00:00 Starling + Away3d + Android bug http://away3d.com/forum/viewthread/6217/ http://away3d.com/forum/viewthread/6217/#When:07:06:44Z <p>Hi,</p> <p>I got a problem when I try to combine Starling + Away3d on a Android device. As soon as I show some Starling or Away3d content, it displays for a couple of frame and then the image disappear. This bug only occurs when I use both Away and Starling with depthAndStencil set to true. Post 36170 seem to have to same behavior but on Pepper.</p> <p>I’m using the latest (MASTER) version of Starling, tried with AIR 3.7 and 3.8, the (brand new) Away 4.1.4 Gold. I also tried with different version of Starling (1.3) and Away3d (4.0, 4.1.1).</p> <p>Everything is working in Windows, Mac, as swf, as AIR desktop, as AIR iOS, but not as AIR Android. I’m testing with a Nexus 10 running 4.2.2.</p> <p>Here’s my code to initialize stage3d. Remember that if I only use the normal Starling init, then everything is fine (but obviously without my 3d assets).</p> <p>var stage3DManager:Stage3DManager = Stage3DManager.getInstance(stage);<br /> _stage3DProxy = stage3DManager.getFreeStage3DProxy(false, “baseline”);<br /> _stage3DProxy.addEventListener(Stage3DEvent.CONTEXT3D_CREATED, onContextCreated);</p> <p>private function onContextCreated(e:flash.events.Event):void {<br /> _stage3DProxy.removeEventListener(Stage3DEvent.CONTEXT3D_CREATED, onContextCreated);<br /> _stage3DProxy.width = stage.stageWidth;<br /> _stage3DProxy.height = stage.stageHeight;<br /> _away3dView = new View3D();<br /> _away3dView.stage3DProxy = _stage3DProxy;<br /> _away3dView.shareContext = true;<br /> _starlingInstance = new Starling(StarlingRoot, stage, _stage3DProxy.viewPort, _stage3DProxy.stage3D, Context3DRenderMode.AUTO, “baseline”);<br /> _starlingInstance.addEventListener(starling.events.Event.ROOT_CREATED, onStarlingContextCreated);<br /> }</p> <p>private function onStarlingContextCreated(e:starling.events.Event):void {<br /> _starlingInstance.stage3D.removeEventListener(starling.events.Event.ROOT_CREATED, onStarlingContextCreated);<br /> _starlingInstance.simulateMultitouch = false;<br /> _starlingInstance.enableErrorChecking = false;<br /> _starlingInstance.stage.frameRate = 30;<br /> _starlingInstance.viewPort = new Rectangle(0, 0, _screenWidth, _screenHeight);<br /> }</p> <p>private function onEnterFrame():void {<br /> _stage3DProxy.clear();<br /> _starlingInstance.nextFrame();<br /> _away3dView.render();<br /> _stage3DProxy.present();<br /> }</p> <p>Hopefully someone will be able to understand what it happening with this or point me to an existing bug report at Adobe.</p> <p>Thanks</p> 2017-04-26T07:06:44+00:00 AIR SDK 25 http://away3d.com/forum/viewthread/6213/ http://away3d.com/forum/viewthread/6213/#When:14:54:14Z <p>I currently have a successful implementation of the last Away3D source(4.x) using the Air SDK 23, but since the release of the Air SDK 24 and 25, I am unable to get Away3D to initialize at all. Does anyone have any suggestions?</p> <p>Note: I am using stage3DManager and stage3DProxy too.</p> 2017-04-13T14:54:14+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> 2017-04-12T09:26:06+00:00 Saving 3D model for Away3D http://away3d.com/forum/viewthread/6211/ http://away3d.com/forum/viewthread/6211/#When:09:19:45Z <p>Hi, I have few 3D models (90% is in 3ds format) and I have trouble with most of them. I can load them into my scene but I cannot apply any material to them , they are just black. I have one 3ds model from a Away3D Essentials book that works great, it has a texture applied that loads plus I can change that texture to anything I want inside the code. I am trying to find the difference between those models for a long time, still no luck ;/ I have contacted few people working in 3D Max but they didn’t help me either any idea what might that be. I can provide samples just send me an email.</p> <p>Tags: <a href="https://freeringtonedownload.mobi/">downloads ringtone</a>, <a href="https://freeringtonedownload.mobi/rap-hip-hop-ringtones">hip hop ringtones</a></p> 2017-04-12T09:19:45+00:00 FBX File Support http://away3d.com/forum/viewthread/6210/ http://away3d.com/forum/viewthread/6210/#When:23:42:31Z <p>This week i have decided to create a fbx binary parser for away3d 4.1</p> <p>So far it only imports geometries data, cameras and lights.</p> <p>i was wondering although i think i know what the answer is who wants a copy when its done?</p> 2017-03-26T23:42:31+00:00 Call for Away3D showcase content for GDC SF http://away3d.com/forum/viewthread/3832/ http://away3d.com/forum/viewthread/3832/#When:16:23:05Z <p>Are you currently working on an Away3D game that is due to be released in the next couple of months? Perhaps you are working in company that is planning an alpha or beta release of their game, or maybe you are publishing you’re own personal assault on the 3D gaming world?</p> <p>From casual coffee-break to frenetic arcade action, hardcore RPG to social-networked heaven, if any of the above is true, then we would like to hear from you to help us compile a list of eligible showcase material for the upcoming GDC conference in San Francisco (Mar 25th - 29th). Rules are simple - the game must use Away3D in some form and must have an available version to play by the time the conference expo opens (although we’ll need to see something before then obviously). The lucky selected few will get free exposure at the Adobe gaming booth, courtesy of the Away3D platform and Adobe Gaming SDK!</p> <p>Reply inline below if your game is already in the public domain, or PM me if you are still in stealth-mode and need NDAs signed before any details can be given. This will be a great way to get your game showcased at the world’s largest and longest-running games industry event for free, so if you have something to show, make sure you don’t miss out on this fantastic opportunity.</p> 2013-01-16T16:23:05+00:00 Quaternion - object orientation http://away3d.com/forum/viewthread/6202/ http://away3d.com/forum/viewthread/6202/#When:13:37:23Z <p>Hello,<br /> I’m trying to orientate some objects manually along a curve. I would like to orientate them not using the global coordinate system but based on the previous object (orientation = previous object orientation + delta angle). And I would like to orientate them using only 2 axis if possible (rotation around x and z)</p> <p>I did something which seems to work when the curve is in the XY plane (global rotation at the bottom part of the curve: x=0, y=0, z=90°-&gt; horizontal) or in the ZY plane (x=90°, y=0, z=0 -&gt; horizontal). See the attached picture (paint is my friend).</p> <p>But when I try at 45° between these two plans, it doesn’t work (x=90°, y=0, z=90° at the bottom part).</p> <p>How does the quaternion work? Why does the orientation of the object tend to deviate in this case? Is it possible to reach the right orientation using only 2 axes? <br /> Thank you for your help, if you have any tips…</p> 2017-02-23T13:37:23+00:00 Freelance concept and 3d artist available for work http://away3d.com/forum/viewthread/5857/ http://away3d.com/forum/viewthread/5857/#When:13:25:28Z <p>I am a freelance 3d artist looking for works,</p> <p>Portfolio:-<br /> <a href="http://spukeanimation.daportfolio.com/">http://spukeanimation.daportfolio.com/</a></p> <p>Animations:-<br /> <a href="http://www.youtube.com/watch?v=izcl6SGarY4">http://www.youtube.com/watch?v=izcl6SGarY4</a></p> <p>Email:-spukeanimation@gmail.com<br /> Phone no:- +1 315 670 7853</p> <p>Services provide: <br /> Concept art<br /> 3d modeling , texture, rigging and animations<br /> Game Assets/Props <br /> Game Environments <br /> Pre-rendering assets <br /> Optimized Texturing <br /> Level of Detail Optimization + Rigging( Biped/bone support) <br /> Animation <br /> Exporting( Torque3D, Unity3D,To Unreal Ed, Doom3,etc) <br /> Motion Graphics</p> <p>Thanks,<br /> Spuke Animation</p> 2015-05-06T13:25:28+00:00