oh well, hope you luck with that then and plz show what you got when finish, i've to move to next todo list btw ;)
cheers On 08/10/2009, StGabe <[email protected]> wrote: > > FYI: I did end up just adding new Sprites (actually Shapes) to create > a new layer for each blended poly and that wasn't as a big of a > performance hit as I thought it might be so I'm probably going to just > go with that. > > On Oct 7, 3:34 pm, StGabe <[email protected]> wrote: >> A good example of what I would want to do is a scene with the >> following: >> >> // sphere1, at (0,0) with radius 50 >> var sphere1:Sphere = scene.addChild(new Sphere(new >> WireColorMaterial >> (0x555555), 50, 10, 10)) as Sphere; >> sphere1.x = 0; >> sphere1.canvas = view.addChild(new Sprite()) as >> Sprite; >> >> // sphere2, at (50,0) with radius 75 >> var sphere2:Sphere = scene.addChild(new Sphere(new >> WireColorMaterial >> (0x555555), 75, 10, 10)) as Sphere; >> sphere2.x = 50; >> sphere2.canvas = view.addChild(new Sprite()) as >> Sprite; >> sphere2.canvas.blendMode = BlendMode.ADD; >> >> In this case it is not enough to sort by object, I need to sort by >> each individual poly. In ExCanvas, arguably the spheres are not >> rendering correctly as they should not be culling the back polys >> (because these polys will actually be seen through the front, additive >> polys). Unfortunately I can't show you a good example from my project >> but I am working with very complex models where the above situation is >> not uncommon. >> >> I experimented with creating a ShaderMaterial and trying to implement >> a Pixel Bender shader to create a shaderFill with UV-maping and >> blending. Unfortunately this did not work as I could not find a way >> to read the value of the target pixel, within the destination Graphics >> object, in order to perform blending. >> >> Thanks! >> >> On Oct 7, 6:49 am, katopz <[email protected]> wrote: >> >> > good news! canvas is there! try chk >> > ;)http://away3d.googlecode.com/svn/trunk/fp10/Examples/Away3DLite/as/sr... >> >> > examplehttp://sleepydesign.com/labs/as3/Away3DLite/ExCanvas.html >> > <http://sleepydesign.com/labs/as3/Away3DLite/ExCanvas.html> >> > don't forget to update last svn too! >> >> > hth >> >> > 2009/10/7 StGabe <[email protected]> >> >> > > Hi, thanks for the response! >> >> > > However I don't think your solution works for me. In both cases I am >> > > losing sorting data: if an object is in front of the blended object it >> > > will not render correctly. Unfortunately this is an important >> > > assumption for me. For example in the case of rendering to mesh.layer >> > > (which only works in FastRenderer, I need BasicRenderer) I can only >> > > draw the mesh.layer Sprite in front of everything or behind and what I >> > > actually need is to have it correctly sorted within the scene. >> >> > > What I need is some way to draw, with blending, directly to the same >> > > graphics context used by the rest of the render (i.e. in >> > > BasicRenderer.sortFaces()). The only way I can see to do this >> > > requires using a ShaderFill and basically reimplementing UV mapping, >> > > etc., by hand but I wonder if there are better ideas. >> >> > > Thanks again for any help you can offer! >> >> > > On Oct 5, 9:54 pm, katopz <[email protected]> wrote: >> > > > you got 2 options for now1. set layer for mesh and use blendmode via >> > > layer >> >> > > > > mesh.layer = new Sprite(); >> >> > > > 2. apply blendmode to Sprite and draw to texture via bitmapdata >> >> > > > > mesh.material.bitmap = bitmapData >> >> > > > tell me again if that not what're you looking for >> >> > > > hth >> >> > > > 2009/10/6 StGabe <[email protected]> >> >> > > > > I really like Away3d Lite and I'm working on something where I'm >> > > > > seeing some significant performance gains with Lite over the >> > > > > regular >> > > > > version. >> >> > > > > Here's the problem: I need to set the blendMode for each mesh. I >> > > > > have >> > > > > some additive blended meshes that will intersect with other meshes >> > > > > (so >> > > > > I can't use FastRenderer). I've looked over the engine code a bit >> > > > > and >> > > > > I suspect I know the answer already but is there a way for me to >> > > > > get >> > > > > blendModes working on each individual mesh or material? >> >> > > > > It seems like the easiest way to do this is to have things like >> > > > > Away >> > > > > 3d, non-lite with every poly mapping to a sprite but that seems >> > > > > likely >> > > > > to kill a lot of the performance gains. Possibly it could be done >> > > > > with a Pixel Bender shader that implements UV mapping and >> > > > > blending? >> > > > > Any other ideas? I'm willing to do the work myself but I'm not >> > > > > sure >> > > > > what the best path for that would be. >> >> > > > > Thanks! >> >> > > > > P.S. another question: I'm still figuring out what can be done >> > > > > with >> > > > > Pixel Bender but has anyone considered trying to implement a depth >> > > > > buffer with Pixel Bender? Seems like it would be possible but, >> > > > > like I >> > > > > said, I'm not really that well-versed in its capabilities. >> >> > > > -- >> > > > katopzhttp://www.sleepydesign.com >> >> > -- >> > katopzhttp://www.sleepydesign.com -- katopz http://www.sleepydesign.com
