Hey Fabrice,

Is there a way to do the scaling in prefab so that the bounderies
arren't that huge?
And can i build parts of the scene up in prefab resulting in less
"loose" models , and if so does this increase performance?

On 8 dec, 14:40, Fabrice3D <[email protected]> wrote:
> Hey wsvdmeer,
> I have updated the class & updated the svn.
> The update resolves the geometrical artefact and code was in need of  
> an update anyway.
> I have just done a series of tests using this latest update and  
> everything seams working just fine.
>
> Now looking at your awd files and your xml definition, the first
> thing that might clarify your problem, is the scale/position
>
> if I look in Prefab at eddydejong.awd, it's having bounderies of width  
> 25000, height 16000, depth 11000
> now, the position of this one is at 120, 80, 1470.
>
> now you want to merge this model with lets say etos.awd
> etos bounds are width 15590, height 12000 and 7672 for depth
> its position is 100, 60, 1290
>
> Looking at this data, it explains clearly your problem... they simply  
> overlap each other, with or without Merge in the game.
> if you have rescaled in Prefab prior to export, just multiply by same  
> factor the xml position data and you should be ok.
>
> Fabrice
>
> On Dec 8, 2009, at 1:46 PM, wsvdmeer wrote:
>
>
>
> > Hey Fabrice,
>
> > Did you have time looking at my problem?
>
> > On 7 dec, 16:19, wsvdmeer <[email protected]> wrote:
> >> Hey Fabrice,
>
> >> I added 3 models here :http://labs.speak.nl/3d/away3d/models/models.rar
> >> The positions can be found here:
>
> >> <model>
> >>                 <file>../assets/models/eddydejong/eddydejong.awd</
> >> file>
> >>                 <texture>../assets/models/eddydejong/</texture>
> >>                 <name>Bakker Eddy de Jong</name>
> >>                 <xposition>120</xposition>
> >>                 <yposition>80</yposition>
> >>                 <zposition>-1470</zposition>
> >>                 <xrotation>0</xrotation>
> >>                 <yrotation>90</yrotation>
> >>                 <zrotation>0</zrotation>
> >>                 <scale>0.01</scale>
> >>         </model>
> >>         <model>
> >>                 <file>../assets/models/etos/etos.awd</file>
> >>                 <texture>../assets/models/etos/</texture>
> >>                 <name>Etos</name>
> >>                 <xposition>100</xposition>
> >>                 <yposition>60</yposition>
> >>                 <zposition>-1290</zposition>
> >>                 <xrotation>0</xrotation>
> >>                 <yrotation>95</yrotation>
> >>                 <zrotation>0</zrotation>
> >>                 <scale>0.01</scale>
> >>         </model>
> >>         <model>
> >>                 <file>../assets/models/pearle/pearle.awd</file>
> >>                 <texture>../assets/models/pearle/</texture>
> >>                 <name>Pearle</name>
> >>                 <xposition>140</xposition>
> >>                 <yposition>71</yposition>
> >>                 <zposition>-1155</zposition>
> >>                 <xrotation>0</xrotation>
> >>                 <yrotation>102</yrotation>
> >>                 <zrotation>0</zrotation>
> >>                 <scale>0.01</scale>
> >>         </model>
>
> >> On 7 dec, 15:08, Fabrice3D <[email protected]> wrote:
>
> >>> Are you sure your models are perfectly centered?
> >>> otherwijze send me offline max 3 of them + the position you give  
> >>> them
> >>> in worldspace,
> >>> I'll make a test here.
>
> >>> Fabrice
>
> >>> On Dec 7, 2009, at 2:21 PM, wsvdmeer wrote:
>
> >>>> 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
>
> ...
>
> meer lezen »

Reply via email to