Perfect, I'll hack it in this weekend. If I spot you, I would be honored to shake your hand.
thanks for everything, Aduén On 8 nov, 17:07, Fabrice3D <[email protected]> wrote: > oh I see, well thats the reason why its in the svn --> to be able make > dynamic stuff. > > > Could you give me a pointer where to begin in the Prebaking class, I > > might give it a shot myself. > > sure, keep the alpha as it enters, apply as it come out. > so make a temp bmd of the size of the original map, move original map alpha > channel (8 to 1) to this holder map > once rendered, simply go reverse, and apply this saved channel to rendered > map (1 to 8) > > > PS: You're living in Holland right? Are you there at AUG XL the 17th, > > yes and yes. > > > saw something of Away3D giving a presentation? > > David and Rob will present there yes. > > > Either way, props on Prefab, first time I enjoyed a 3D-tool. > > thank you! > > Fabrice > > On Nov 8, 2010, at 2:47 PM, Aduen wrote: > > > > > > > > > The mock-up is going to be dynamic, there is an editor side and a > > viewer side. Children are going to fabricate their own little 3d > > environment online, Prefab is not going to be my lifesaver this > > time ;) > > > Could you give me a pointer where to begin in the Prebaking class, I > > might give it a shot myself. > > > TIA > > Aduén > > > PS: You're living in Holland right? Are you there at AUG XL the 17th, > > saw something of Away3D giving a presentation? Either way, props on > > Prefab, first time I enjoyed a 3D-tool. > > > On 8 nov, 11:20, Fabrice3D <[email protected]> wrote: > >> just uploaded fix to this angle error. > > >> the prebaker included in api is an early version. > >> You should use Prefab instead. alpha are respected in Prefab's version. > > >> I haven't updated the svn with latest version, because Prefab has too many > >> diffs with the engine > >> regarding this feature. > > >> Fabrice > > >> On Nov 8, 2010, at 11:04 AM, Aduen wrote: > > >>> Hi my name is Aduen and I am using Away3d because of the Prebaking > >>> class, something that kicks the Flash performance sky-high. > > >>> I want to keep my project as low profile as possible, I am using > >>> simple Plane primitives with least amount of segments (1), and bitmap > >>> material with a transparency. This results in simple cut-out sprites. > >>> I've put a simple demo online to get an idea what I am doing > >>>http://van-gogh.aduen.nl > > >>> Now, the questions and errors I am running into. > > >>> 1) Using Prebaking with raytrace set to false results in this error: > > >>> ReferenceError: Error #1069: Property getAngle not found on > >>> flash.geom.Vector3D and there is no default value. > >>> at MethodInfo-741() > >>> at away3d.materials.utils::LightPrebaker/generate() > >>> at away3d.materials.utils::LightPrebaker/draw() > >>> at away3d.materials.utils::LightPrebaker/apply() > > >>> which I narrowed down to the following line in > >>> away3d.materials.utils.Prebaker: > > >>> function setVertexColor(d:Vector3D, n:Vector3D, > >>> colr:int, colg:int, > >>> colb:int):Array > >>> { > >>> var dl:Number; > >>> var factl:Number; > >>> for(j = 0;j<_aLights.length;++j){ > >>> dl = > >>> d.subtract(_aLights[j].lightposition).length; > >>> percentFalloff = > >>> (_aLights[j].lightfalloff- dl)/ > >>> _aLights[j].lightfalloff; > >>> //lightFactor = > >>> _aLights[j].lightposition.getAngle(n); <<-- this > >>> line results in the error > >>> lightFactor = > >>> Vector3DUtils.getAngle(_aLights[j].lightposition, n); <-- changed it > >>> to this > >>> if(percentFalloff > 0 && dl > >>> <_aLights[j].lightfalloff){ > >>> factl = > >>> lightFactor*percentFalloff; > >>> colr += _aLights[j].lightR > >>> *factl; > >>> colg += _aLights[j].lightG > >>> *factl; > >>> colb += _aLights[j].lightB > >>> *factl; > >>> } > >>> } > >>> return [colr, colg, colb]; > > >>> } > > >>> 2) when using transparent png's as Material the raytrace prebaking > >>> does not "shine through" the alpha, it covers it. This also results in > >>> rectangular shadows (planes with transparent png's). I am doing > >>> something wrong or is this not implemented? > > >>> 3) I also run into situations when using more than two light points > >>> when raytracing, the whole scene lights up. I am not able to narrow > >>> this one down yet but, if this sounds familiar to someone please let > >>> me know. It's most likely my own buggy code at this point ;) > > >>> For all that matters, I am most interested in question number 2. > > >>> TIA > >>> Aduén
