Hey Jake Isn't this a side effect caused by only using the F10 3D API for the > drawing, and Away3D F9 methods for projection. Using Utils3D.projectVectors > and PerspectiveProjection the data is delivered to the vectors in the right > format.
yes, which is why i say " this is at least a process that can be improved". Marshalling is only a problem if you keep having to swap between data formatting. I've only just started to consider moving to F10 ( now browser installation > is getting to 60%) and I've not got down to any coding yet. > Does drawTriangles do any z-sorting? The information is there in the uvt > input so it should be able to z-sort back to front. no, no automatic z sorting. another big disappointment imho. atb Rob On Fri, Mar 13, 2009 at 3:44 PM, Jake Lewis <[email protected]> wrote: > >>>b) there is a common problem with all new methods in f10 that use a long > string of vectors values, and it is called marshalling. > > Isn't this a side effect caused by only using the F10 3D API for the > drawing, and Away3D F9 methods for projection. Using Utils3D.projectVectors > and PerspectiveProjection the data is delivered to the vectors in the right > format. > > I've only just started to consider moving to F10 ( now browser installation > is getting to 60%) and I've not got down to any coding yet. > Does drawTriangles do any z-sorting? The information is there in the uvt > input so it should be able to z-sort back to front. > > If so, does it zsort triangles between different vectors, (i.e. different > drawTriangles calls), to the same movieClip/graphics? Without that I can't > see a way to z-sort a scene made up of more than one model ( other than > z-sorting at the model level) > > > > On Mon, Mar 9, 2009 at 2:20 PM, Rob Bateman <[email protected]> wrote: > >> Hey Zincuntrin >> >> here's an inconvenient truths about the flash 10 drawTriangles method - it >> is, in almost all use cases, slower than using standard flash 9 drawing >> commands. the reason we use them at all is so that perspective correct >> textures are possible - which can achieve speed increases in other ways >> (such as not having to use the subdividing algorithm in f9 for perspective >> correction). But if you do a straight comparison, you will rarely see any >> benefit. >> >> The one case where this is not true is when you use indices to draw your >> triangles, which reuse vertex coordinates for neighbouring triangles. But >> this is not the whole story, because there are a couple of problems with >> this approach: >> >> a) not only is the vertex coordinate reused, but the uvt coordinate is >> reused as well. It is baffling why this should be the case, as almost all >> modeling programs export a format that allows uv coordinates to be >> polygon-dependent, and vertex-independant. In draw triangles it is the other >> way around - so using indices restricts your uv mapping to a non-standard >> form that will break most imported models. >> >> b) there is a common problem with all new methods in f10 that use a long >> string of vectors values, and it is called marshalling. basically this the >> name given to the process required to 'marshall' your values into a single >> vector for processing in the method. In tests carried out on the >> drawtriangles class, the marshalling process for using drawtriangles with >> indices neatly removes any speed benefit that would be gained. In fact, the >> marshalling process is still a problem even if you don't use indices, >> because you have to concat all your screenvertex values every frame. >> However, this is at least a process that can be improved, and will hopefully >> see some speed increases as the Flash10 branch matures. >> >> >> @Ralph - you're absolutely right, the sorting process is no different in >> Away3d and PV3D. Although one area where we do differ quite a lot is in >> object pooling, which in Away3d is tied into our triangle caching system. >> Afaik there is currently no equivalent system in PV3D, which should mean >> that Away3d is better performing when it comes to memory consumption and GC >> calls over time. >> >> >> @Zincuntrin - if you compare the f9 version of Away3d with the f9 version >> of pv3d, there should be less of a difference in speed. I'd also be >> interested to see what difference there is between the Flash10 branch of >> Away3d and the cs4 branch of pv3d, using the same drawtriangles methods... >> >> atb >> >> >> Rob >> >> >> >> >> >> >> On Mon, Mar 9, 2009 at 5:33 PM, Ralph Hauwert <[email protected]>wrote: >> >>> Actually, right now Papervision3D and Away3D have exactly the same >>> sorting options. >>> As far as I know, by default both PV3D and Away3D exhibit the same >>> sorting behaviour. >>> >>> Ralph. >>> >>> >>> On Mar 9, 2009, at 4:18 PM, Peter Kapelyan wrote: >>> >>> Can you also try this on your model >>> >>> mymodel.ownCanvas=true; >>> >>> I think the reason pv3d is faster is mainly because of it's poor/simple Z >>> sorting. >>> If you enable ownCanvas on your model, it should be faster a bit. Let me >>> know if it is any faster. >>> >>> Also I hear enhancements to f10 are still underway, but I am sure Rob can >>> speak more about that. >>> >>> -Pete >>> >>> On Mon, Mar 9, 2009 at 8:02 AM, Zincuntrin <[email protected]> wrote: >>> >>>> >>>> I have compared Away3D "flash 10" branch with papervision "flash 9" >>>> branch. >>>> >>>> Using a model with aprox 2000 tris, I get 40 FPS with Away3D and 60 >>>> FPS with papervision. >>>> >>>> I have digged into the code and I have seen that you are not using the >>>> "render batch triangles" feature of flash 10 >>>> (graphics.drawTriangles?), but instead, you are still using the >>>> "triangle by triangle" approach, though using the >>>> graphics.drawGraphicsData in flash 10. >>>> >>>> Am I correct? >>>> >>>> It would be nice, if possible, to know the future plan for flash 10 >>>> usage, for example: What are the expected performance gains? When will >>>> it be ready? etc... >>>> >>>> Many many thanks >>>> >>> >>> >>> >>> -- >>> ___________________ >>> >>> Actionscript 3.0 Flash 3D Graphics Engine >>> >>> HTTP://AWAY3D.COM >>> >>> >>> >> >> >> -- >> Rob Bateman >> Flash Development & Consultancy >> >> [email protected] >> www.infiniteturtles.co.uk >> www.away3d.com >> > > -- Rob Bateman Flash Development & Consultancy [email protected] www.infiniteturtles.co.uk www.away3d.com
