Away3D Forum http://away3d.com/forum/ Away3D Forum en Copyright 2017 2017-06-30T13:57:37+00:00 Problems converting .dae to awd http://away3d.com/forum/viewthread/6219/ http://away3d.com/forum/viewthread/6219/#When:17:18:36Z <p>Hi,</p> <p>I’m trying to convert a .dae file, exported from Blender, to .awd using Away Builder. The file uses skeleton animation and I’ve managed to imported it correctly into the Away Builder and played the animation, but when I save the file as .awd and try to re open it, I get an error#1034 and the scene is not loaded.</p> <p>If I import the file and save it, without attaching the animation into the model, I can open it fine, but as soon I try to attach the animation a get the error#1034 again.</p> <p>I’m attaching the .dae file I’m using for the test, can you help me on this matter?</p> <p>Thank you in advance.</p> 2017-04-30T17:18:36+00:00 awaybuilder file (awd) no colour http://away3d.com/forum/viewthread/6162/ http://away3d.com/forum/viewthread/6162/#When:00:31:43Z <p>sir, my awd file look grayscale, i try other awd in PrimitveExamples, like primitives_capsule.awd, they look colourful when fill it in colour, but when it texture it with jpeg file they look grayscale, why ? shall i use png, or 16bit, 24 bit, 32bit jpeg ? or i omit to import some code ? </p> <p>package {<br /> import away3d.containers.View3D;<br /> import away3d.debug.AwayStats;<br /> import away3d.entities.Mesh;<br /> import away3d.events.AssetEvent;<br /> import away3d.events.LoaderEvent;<br /> import away3d.library.AssetLibrary;<br /> import away3d.library.assets.AssetType;<br /> import away3d.loaders.Loader3D;<br /> import away3d.loaders.misc.AssetLoaderContext;<br /> import away3d.loaders.parsers.AWD1Parser;<br /> import away3d.loaders.parsers.AWD2Parser;<br /> import away3d.loaders.parsers.Parsers;<br /> import away3d.materials.ColorMaterial;<br /> import away3d.materials.TextureMaterial;<br /> import away3d.materials.*;<br /> import away3d.textures.*;</p> <p>import flash.display.Sprite;</p> <p>import flash.display.StageAlign;<br /> import flash.display.StageScaleMode;</p> <p><br /> import flash.events.Event;<br /> import flash.net.URLRequest;</p> <p>[SWF(width=“320”, height=“240”, backgroundColor=“0x2f3032”, frameRate=“30”, quality=“LOW”)]</p> <p><br /> public class AWDViewer extends Sprite {<br /> &nbsp; private var _view:View3D;<br /> &nbsp; private var awayStats:AwayStats;</p> <p><br /> &nbsp; public function AWDViewer() {<br /> &nbsp; &nbsp; &nbsp; stage.addEventListener(Event.RESIZE, onResize);<br /> &nbsp; &nbsp; &nbsp; <br /> &nbsp; stage.align = StageAlign.TOP_LEFT;<br /> &nbsp; stage.scaleMode = StageScaleMode.NO_SCALE;<br /> &nbsp; stage.showDefaultContextMenu = true;<br /> &nbsp; stage.stageFocusRect = false;<br /> &nbsp; <br /> &nbsp; <br /> &nbsp; _view = new View3D();<br /> &nbsp; &nbsp; &nbsp; _view.backgroundColor = 0x666666;<br /> &nbsp; &nbsp; &nbsp; _view.antiAlias = 2;<br /> &nbsp; &nbsp; <br /> &nbsp; <br /> &nbsp; &nbsp; &nbsp; addChild(_view);<br /> &nbsp; &nbsp; &nbsp; addEventListener(Event.ENTER_FRAME, onEnterFrame);</p> <p><br /> &nbsp; &nbsp; &nbsp; [Embed(source=’/../embeds/plancam.awd’, mimeType=“application/octet-stream”)]<br /> &nbsp; &nbsp; &nbsp; var object:Class;<br /> &nbsp; &nbsp; &nbsp; Parsers.enableAllBundled();<br /> &nbsp; &nbsp; &nbsp; AssetLibrary.enableParser(AWD2Parser);<br /> &nbsp; &nbsp; &nbsp; AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete);<br /> &nbsp; &nbsp; &nbsp; AssetLibrary.addEventListener(LoaderEvent.RESOURCE_COMPLETE, onResourceComplete);<br /> &nbsp; &nbsp; &nbsp; AssetLibrary.addEventListener(LoaderEvent.LOAD_ERROR, onLoadError);<br /> &nbsp; &nbsp; &nbsp; AssetLibrary.loadData(object, new AssetLoaderContext(false));</p> <p><br /> &nbsp; &nbsp; &nbsp; awayStats = new AwayStats(_view);<br /> &nbsp; &nbsp; &nbsp; addChild(awayStats);<br /> &nbsp; }</p> <p><br /> sir, what’s wrong ?<br /> &nbsp; private function onAssetComplete(ev:AssetEvent):void {<br /> &nbsp; &nbsp; &nbsp; if (ev.asset.assetType == AssetType.MESH) {<br /> &nbsp; &nbsp; &nbsp; &nbsp; var mesh : Mesh;<br /> &nbsp; &nbsp; <br /> &nbsp; &nbsp; &nbsp; &nbsp; var texMat : TextureMaterial;<br /> &nbsp; </p> <p>&nbsp; &nbsp; &nbsp; &nbsp; mesh = Mesh(ev.asset);<br /> &nbsp; &nbsp; &nbsp; &nbsp; texMat = mesh.material as TextureMaterial;</p> <p>&nbsp; &nbsp; &nbsp; &nbsp; if (mesh.material == null || (texMat &amp;&amp; texMat.texture == null))<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mesh.material = new ColorMaterial(Math.random() * 0xffffff);</p> <p><br /> &nbsp; &nbsp; &nbsp; &nbsp; _view.scene.addChild(mesh);<br /> &nbsp; _view.camera.lookAt(mesh.position);<br /> &nbsp; &nbsp; &nbsp; }<br /> &nbsp; }</p> <p>&nbsp;</p> <p>&nbsp; private function onLoadError(ev:LoaderEvent):void {<br /> &nbsp; &nbsp; &nbsp; trace(‘Could not find’, ev.url);<br /> &nbsp; }</p> <p><br /> &nbsp; private function onResourceComplete(ev : LoaderEvent) : void<br /> &nbsp; {<br /> &nbsp; &nbsp; &nbsp; trace(‘onResourceComplete’, ev.url);<br /> &nbsp; &nbsp; <br /> &nbsp; }</p> <p><br /> &nbsp; private function onEnterFrame(ev : Event) : void<br /> &nbsp; {<br /> &nbsp; &nbsp; &nbsp; _view.render();<br /> &nbsp; }</p> <p><br /> &nbsp; private function onResize(event:Event = null):void {<br /> &nbsp; &nbsp; &nbsp; _view.width = stage.stageWidth;<br /> &nbsp; &nbsp; &nbsp; _view.height = stage.stageHeight;<br /> &nbsp; &nbsp; &nbsp; awayStats.x = stage.stageWidth - awayStats.width;<br /> &nbsp; <br /> &nbsp; }</p> <p>}<br /> }</p> <p>&nbsp;</p> 2016-09-05T00:31:43+00:00 loading Obj model exported from blender http://away3d.com/forum/viewthread/5946/ http://away3d.com/forum/viewthread/5946/#When:02:34:06Z <p>I am dealing with AWD format, i try the awayBuilder and load the original OBJ Model with matched mtl file which exported from blender. however, the texture loaded correctly in blender but not awayBuilder. what it the problem of my steps, do i need to associate the mtl file in the away builder? Thank you in advanced. the Obj model with associated mtl files i used in awayBuilder is uploaded:<br /> https://www.sendspace.com/file/il4p7n</p> 2015-09-09T02:34:06+00:00 Texture Quality Degrades After File Saved http://away3d.com/forum/viewthread/5945/ http://away3d.com/forum/viewthread/5945/#When:17:02:35Z <p>Hi,</p> <p>Loaded OBJ file into Away Builder V1.0.0 Gold, applied texture / material - texture looks fine.</p> <p>Saved file, loaded file back in - texture looks pixelated and poor quality.</p> <p>Tried changing general settings / compression / material settings / anything else I could find!&nbsp; But none of them make any difference.</p> <p>Anyone have any idea how to stop this?</p> <p>Example image attached.</p> <p>Thanks in advance!</p> 2015-09-08T17:02:35+00:00 What have I done wrong ? http://away3d.com/forum/viewthread/5941/ http://away3d.com/forum/viewthread/5941/#When:07:23:31Z <p>Dear Awaybuilder users , I installed Awaybuilder gold 1.0.0 version and then I followed this(http://awaytools.com/awaybuilder/tutorial-01/) tutorial’s instructions .<br /> I created an AS3 project in Flashdevelope and used the tuturial’s Intermediate_AWDViewer.as file but when I run it I get an error <br /> “[Fault] exception, information=Error: Error #2032: Stream Error. “</p> <p>What have I done wrong ? <br /> Some told me there are 2 Awaybuilders out there , and told me not to confuse them.</p> <p>what is/are your suggestion/s?</p> 2015-09-06T07:23:31+00:00 Help with export to AS3 class http://away3d.com/forum/viewthread/5922/ http://away3d.com/forum/viewthread/5922/#When:21:20:07Z <p>Hello All,<br /> I am new to programming with Flashdev and Away3d. So I am still in the learning process.</p> <p><br /> The problem I am having is the process of exporting a awd or a export with a class from Prefab to load into Flashdev to compile an output.<br /> I have looked all over the web for a example or a tutorial on a complete process of importing your model and exporting and loading in to code with no luck.</p> <p>Could someone point me on the right path.</p> <p>thanks in advance,<br /> Leroy</p> 2015-08-03T21:20:07+00:00 Camera View http://away3d.com/forum/viewthread/5900/ http://away3d.com/forum/viewthread/5900/#When:11:20:30Z <p>I have a camera in the scene. Can I change view mode to camera? Or set point of view exactly in camera position (how about fov)?</p> 2015-07-06T11:20:30+00:00 Export method of skeleton with animation in 3dsmax2014 http://away3d.com/forum/viewthread/5912/ http://away3d.com/forum/viewthread/5912/#When:07:28:51Z <p>Using the plug-in awayextensions3dsmax<br /> And we have the animation writing with a bone, but it does not export well. Do not you tell me how an object is exported?</p> <p>Development environment 3dsmax2014</p> 2015-07-15T07:28:51+00:00 AwayBuilder as a level editor ? http://away3d.com/forum/viewthread/4497/ http://away3d.com/forum/viewthread/4497/#When:15:25:34Z <p>Hi !</p> <p><br /> First of all, congrats on making up this tool! Away3D’s ecosystem is getting richer month after month. <img src="/images/smileys/smile.gif" width="19" height="19" alt="smile" style="border:0;" /></p> <p><br /> I have a little question. Can this tool be used as a level editor ? Maybe not now, but in a future version ?</p> <p>It is rather tough to find 3D level editors. Often times you have to build your own, which takes time and so is costly. Publicly available ones are usually tied to one engine (i.e. not Away3D :p) and are not flexible, because they work for specific types of games only, instead of just using the core rendering engine to layout assets, terrain, sounds and enable custom game-dependent properties on the side.</p> <p>Plus, they’re not open source, so can’t be tweaked to add custom features to take advantage of specific game functionalities.</p> <p><br /> AwayBuilder sounds like an awesome opportunity to make the ultimate 3D level editor. No ?</p> <p>You guys describe it as “a designer interface for accessing the visual stack in Away3D”, which sounds <i>almost</i> like a level editor, so it left me wondering. Though to be one, it would need to support terrain generation and editing among other things, but maybe that’s on the todo…<br /> If not, is there any other such tool planned ?</p> <p><br /> PS: Terrain generation based on <a href="http://develop.scee.net/files/presentations/cedec2008/PhyreEngine_CEDEC2008Speech_e.pdf">Phyre Engine’s technique</a> would be awesome in AwayBuilder. Every single point listed in the “Goals” section is exactly what I’m looking for! <img src="/images/smileys/smile.gif" width="19" height="19" alt="smile" style="border:0;" /></p> 2013-05-17T15:25:34+00:00 Textures won’t apply in .awd http://away3d.com/forum/viewthread/5782/ http://away3d.com/forum/viewthread/5782/#When:02:53:27Z <p>Hey, I have a model that I am exporting from Away Builder and for some reason when I import it to away3d, the texture I made won’t load in. The texture shows up correctly in Away Builder, and material is correct based on the following trace statements:</p><div class="codeblock"><code><span style="color: #000000"> <span style="color: #0000BB">trace</span><span style="color: #007700">(</span><span style="color: #0000BB">mesh</span><span style="color: #007700">.</span><span style="color: #0000BB">material</span><span style="color: #007700">.</span><span style="color: #0000BB">name</span><span style="color: #007700">);&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//prints:&nbsp;"MyMaterial"<br /></span><span style="color: #0000BB">trace</span><span style="color: #007700">(</span><span style="color: #0000BB">TextureMaterial</span><span style="color: #007700">(</span><span style="color: #0000BB">mesh</span><span style="color: #007700">.</span><span style="color: #0000BB">material</span><span style="color: #007700">).</span><span style="color: #0000BB">texture</span><span style="color: #007700">.</span><span style="color: #0000BB">name</span><span style="color: #007700">);&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//prints&nbsp;"defaultTexture"&nbsp;</span> </span> </code></div> <p>I have also selected “embed textures” but with no luck. </p> <p>Here is the loading code:</p><div class="codeblock"><code><span style="color: #000000"> <span style="color: #0000BB">Loader3D</span><span style="color: #007700">.</span><span style="color: #0000BB">enableParser</span><span style="color: #007700">(</span><span style="color: #0000BB">AWDParser</span><span style="color: #007700">);</span><span style="color: #FF8000">//allow&nbsp;for&nbsp;awd&nbsp;import<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">this</span><span style="color: #007700">.</span><span style="color: #0000BB">_roboLoader&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">Loader3D</span><span style="color: #007700">(</span><span style="color: #0000BB">false</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">this</span><span style="color: #007700">.</span><span style="color: #0000BB">_roboLoader</span><span style="color: #007700">.</span><span style="color: #0000BB">addEventListener</span><span style="color: #007700">(</span><span style="color: #0000BB">AssetEvent</span><span style="color: #007700">.</span><span style="color: #0000BB">ASSET_COMPLETE</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">onAssetComplete</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">this</span><span style="color: #007700">.</span><span style="color: #0000BB">_roboLoader</span><span style="color: #007700">.</span><span style="color: #0000BB">addEventListener</span><span style="color: #007700">(</span><span style="color: #0000BB">LoaderEvent</span><span style="color: #007700">.</span><span style="color: #0000BB">RESOURCE_COMPLETE</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">onResourceComplete</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">this</span><span style="color: #007700">.</span><span style="color: #0000BB">_roboLoader</span><span style="color: #007700">.</span><span style="color: #0000BB">load</span><span style="color: #007700">(new&nbsp;</span><span style="color: #0000BB">URLRequest</span><span style="color: #007700">(</span><span style="color: #DD0000">'Models/Robot/Robot.awd'</span><span style="color: #007700">),&nbsp;new&nbsp;</span><span style="color: #0000BB">AssetLoaderContext</span><span style="color: #007700">(</span><span style="color: #0000BB">false</span><span style="color: #007700">));&nbsp;</span> </span> </code></div> <p>When asset loading is complete</p><div class="codeblock"><code><span style="color: #000000"> <span style="color: #007700">private&nbsp;function&nbsp;</span><span style="color: #0000BB">onAssetComplete</span><span style="color: #007700">(</span><span style="color: #0000BB">ev&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">AssetEvent</span><span style="color: #007700">)&nbsp;:&nbsp;</span><span style="color: #0000BB">void<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">ev</span><span style="color: #007700">.</span><span style="color: #0000BB">asset</span><span style="color: #007700">.</span><span style="color: #0000BB">assetType&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">AssetType</span><span style="color: #007700">.</span><span style="color: #0000BB">MESH</span><span style="color: #007700">)&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">var&nbsp;</span><span style="color: #0000BB">mesh&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">Mesh</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">texMat&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">TextureMaterial</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">mesh&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Mesh</span><span style="color: #007700">(</span><span style="color: #0000BB">ev</span><span style="color: #007700">.</span><span style="color: #0000BB">asset</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">texMat&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mesh</span><span style="color: #007700">.</span><span style="color: #0000BB">material&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">TextureMaterial</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">trace</span><span style="color: #007700">(</span><span style="color: #0000BB">mesh</span><span style="color: #007700">.</span><span style="color: #0000BB">material</span><span style="color: #007700">.</span><span style="color: #0000BB">name</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">trace</span><span style="color: #007700">(</span><span style="color: #0000BB">TextureMaterial</span><span style="color: #007700">(</span><span style="color: #0000BB">mesh</span><span style="color: #007700">.</span><span style="color: #0000BB">material</span><span style="color: #007700">).</span><span style="color: #0000BB">texture</span><span style="color: #007700">.</span><span style="color: #0000BB">name</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">mesh</span><span style="color: #007700">.</span><span style="color: #0000BB">material&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">null&nbsp;</span><span style="color: #007700">||&nbsp;(</span><span style="color: #0000BB">texMat&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;</span><span style="color: #0000BB">texMat</span><span style="color: #007700">.</span><span style="color: #0000BB">texture&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">null</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">mesh</span><span style="color: #007700">.</span><span style="color: #0000BB">material&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">ColorMaterial</span><span style="color: #007700">(</span><span style="color: #0000BB">Math</span><span style="color: #007700">.</span><span style="color: #0000BB">random</span><span style="color: #007700">()&nbsp;*&nbsp;</span><span style="color: #0000BB">0xffffff</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">trace</span><span style="color: #007700">(</span><span style="color: #DD0000">"Did&nbsp;not&nbsp;apply&nbsp;Dummy&nbsp;material"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;&nbsp;}&nbsp;</span> </span> </code></div> <p>And when complete:</p><div class="codeblock"><code><span style="color: #000000"> <span style="color: #007700">private&nbsp;function&nbsp;</span><span style="color: #0000BB">onResourceComplete</span><span style="color: #007700">(</span><span style="color: #0000BB">ev&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">LoaderEvent</span><span style="color: #007700">)&nbsp;:&nbsp;</span><span style="color: #0000BB">void<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;_view</span><span style="color: #007700">.</span><span style="color: #0000BB">scene</span><span style="color: #007700">.</span><span style="color: #0000BB">addChild</span><span style="color: #007700">(</span><span style="color: #0000BB">_roboLoader</span><span style="color: #007700">);<br />&nbsp;&nbsp;</span><span style="color: #0000BB">}&nbsp;</span> </span> </code></div> <p>Am doing something wrong in Away Builder? If I embed the textures I shouldn’t have to load them separately right? If you need any more info let me know. <br /> Thanks in advance.</p> 2015-02-09T02:53:27+00:00