I all ready place the objects first and call the mergeHouses function after all the objects are loaded and placed. When setting the useobjectSpace parameter to false the following happens:
http://labs.speak.nl/3d/away3d/example3.jpg On 7 dec, 14:17, wsvdmeer <[email protected]> wrote: > Oke changed the loop to : > > private function mergeHouses():void { > var arr:Array = getHouses() > var merge:Merge = new Merge(true,false, false); > var length:int = arr.length > for (var i:int = 1; i <length ;++i ) { > merge.apply(arr[0], arr[i]) > scene.removeChild(arr[i]) > trace("merge house0 + house" + i); > if (i == length - 1) { > trace("merging complete") > } > } > > } > > And only loaded a few houses on the rightside of the scene. > > The result was the same: > > http://labs.speak.nl/3d/away3d/example2.jpg > > On 7 dec, 13:55, Fabrice3D <[email protected]> wrote: > > > > > The loop > > No need to make new Merge instance each iteration > > place this line above loop start > > > > var merge:Merge = new Merge(true,false, false); > > > start at loop at 1, since arr[0] is receiver > > then no need for a check on 0 iterration > > > The merge > > the issue is a simple offset ScenePosition going wrong, may be simply > > because there is no position set on the models > > before the merge, and since you pass first param as use ObjectSpace, > > only own offsets in geometry are used > > > Try set the positions before merge and then set useobjectSpace to > > false (first param), since you want world coordinates. > > > Fabrice > > > On Dec 7, 2009, at 1:24 PM, wsvdmeer wrote: > > > > Hey Fabrice, > > > > I've tested it like followed: > > > I first load and place all the models in the scene. > > > After all the models are loaded i use the following function(s) to > > > weld stuff together: > > > > private function getHouses():Array { > > > var children:Array = scene.children > > > var array:Array = [] > > > var length:int = children.length > > > for (var i:int = 0; i < length ; ++i) { > > > var child:Object3D = children[i] > > > var name:String = child.name > > > if (name == "house" ) { > > > array.push(child); > > > } > > > } > > > return array > > > } > > > > private function mergeHouses():void { > > > var arr:Array = getHouses() > > > var length:int = arr.length > > > for (var i:int = 0; i <length ;++i ) { > > > var merge:Merge = new Merge(true,false, false); > > > if (i == 0) { > > > }else{ > > > merge.apply(arr[0], arr[i]) > > > scene.removeChild(arr[i]) > > > trace("merge house0 + house" + i); > > > } > > > if (i == length - 1) { > > > trace("merging complete") > > > } > > > } > > > } > > > > After the welding is complete the x,y,z rotations, positions and > > > scales are all based uppon the first house's scale position etc. > > > >http://labs.speak.nl/3d/away3d/example.jpg > > > > On 7 dec, 12:14, Fabrice3D <[email protected]> wrote: > > >> Can you extend a bit more on the definition of "skewed up"? > > >> url, jpg's? > > > >> I also assume you do use latest trunk version (Merge class was > > >> updated > > >> recently) > > > >> Fabrice > > > >> On Dec 7, 2009, at 10:36 AM, wsvdmeer wrote: > > > >>> Hey Fabrice, > > > >>> If i use the merge class the end model is all screwed up. > > > >>> On 4 dec, 10:47, Fabrice3D <[email protected]> wrote: > > >>>>> I didn't have much luck with the MergeClass though! > > > >>>> what is the issue? > > > >>>> works exactly like Weld class > > > >>>> merge = new Merge > > >>>> merge.apply(recievermesh, tobemergedmesh); > > > >>>> of course, you need not to addchild the "tobemergedmesh", instead > > >>>> you > > >>>> need to destroy it > > >>>> or keep for other purposes depending on what you want to do later > > >>>> on. > > > >>>> Fabrice > > > >>>> On Dec 3, 2009, at 1:36 PM, colouredfunk wrote: > > > >>>>> Hey Wsvdmeer! > > > >>>>> I'm having the same troubles, I fill my room walls with paintings, > > >>>>> which massively kills the frame rate. > > > >>>>> Have you checked out the weld class? Might help on some of the > > >>>>> imported 3d stuff. It helped kill some vertexes for me... > > > >>>>> for each (var child:Object3D in room.children) > > >>>>> { > > >>>>> var weld:Weld = new Weld() > > >>>>> weld.apply(child) > > >>>>> } > > > >>>>> It's quite cool as you can also see how many got delete...trace > > >>>>> (weld.countvertices) > > > >>>>> I didn't have much luck with the MergeClass though! > > > >>>>> Good luck! > > > >>>>> On Dec 3, 12:07 pm, jimalliban <[email protected]> wrote: > > >>>>>> Hi wsvdmeer > > > >>>>>> I just read a nifty trick the other day when investigating > > >>>>>> lighting > > >>>>>> here: > > > >>>>>>http://www.everydayflash.com/blog/index.php/2008/04/26/light- > > >>>>>> shading-... > > > >>>>>> If you set the stage.quality to StageQuality.LOW you can gain an > > >>>>>> extra > > >>>>>> few fps. This doesn't have any effect on the render quality. > > > >>>>>> Jim > > > >>>>>> On Dec 3, 9:36 am, wsvdmeer <[email protected]> wrote: > > > >>>>>>> Does nobody have some performance tweeks? > > >>>>>>> It would be great to bundle all the optimization techniques at > > >>>>>>> one > > >>>>>>> place so that other developers could benefit from it. > > > >>>>>>> On 16 nov, 22:00, wsvdmeer <[email protected]> wrote: > > > >>>>>>>> I'm trying to get as muchperformanceand memory gain out of the > > >>>>>>>> project i'm working on. > > >>>>>>>> My project uses around 40 low polygon md2 models with one UV > > >>>>>>>> texture > > >>>>>>>> per model, and i optimized > > >>>>>>>> a lot with tweaking the textures and keeping the model polygon > > >>>>>>>> count > > >>>>>>>> as low as possible. > > >>>>>>>> The problem i'm having is when the camera looks at multiple > > >>>>>>>> models the > > >>>>>>>> framerate drops and the memory usage is getting higher. > > >>>>>>>> Are there tricks in tackeling this problem?- Hide quoted text - > > > >>>>>> - Show quoted text -
