Really nice job, congrats on getting it to work.

Phong has been busted on the Cube and Plane (flat surfaces) for a while now,
nobody has stepped up to the plate to fix that yet. The explanations is
here:

http://groups.google.com/group/away3d-dev/browse_thread/thread/80c4b12653d32dca/

It probably won't be as simple as changing the Cube/Plane itself, it will
probably take the Phong material as well and maybe something else to patch
that up.

-Pete

On Thu, Jul 23, 2009 at 7:15 PM, aleph1 <[email protected]> wrote:

>
> I have uploaded a new test here:
>
> http://away3d-dev.googlegroups.com/web/speculartest.swf
>
> Sorry, the file is a bit large, but I am working with big texture maps
> to see what is possible. As you can see, this opens up some cool
> possibilities: the way the specular picks up hidden details in the
> sticker (the diamond texture); the rough metal texture (can simulate
> simple bump maps); and the lack of shading at the dirty poles of the
> sphere. Again, this is rough and more a proof of concept than anything
> else. I think it could be very useful.
>
> Tomorrow I will see if I can get it working in a way that the specular
> map both masks the specular value and allows for variable specular
> colours across the surface of the object. The sticker was designed in
> anticipation of this…
>
> Is there any chance phong shading will ever be fixed so that it works
> on a cube? If not, I'll have to look at the Dot3d Material, as I need
> a shaded simple cube in a project I have on the go.
>
> d
>
> On Jul 23, 5:27 pm, Peter Kapelyan <[email protected]> wrote:
> > Try it on a sphere or something that's not a cube or plane, phong was
> always
> > screwy on a cube/plane.
> >
> > -Pete
> >
> >
> >
> >
> >
> > On Thu, Jul 23, 2009 at 5:09 PM, aleph1 <[email protected]> wrote:
> >
> > > Yes, I am seeing them. However, this was happening when I compiled the
> > > SWF with the base version of Away3D v2.3.3 without any modifications.
> > > Just a basic scene with one light, one cube (textured with a
> > > PhongBitmapMaterial) and a single camera caused these issues to
> > > appear. Any ideas on this?
> >
> > > With the unmodified engine, the strangest thing about the highlight is
> > > that it sometimes draws incorrectly when the cube is rotated and then
> > > redraws correctly when the mouse is released. I have tried modifying
> > > the segmentsW and segmentsH but they both cause weird display glitches
> > > on a textured cube in the unmodified release as well.
> >
> > > Any input would be greatly appreciated.
> >
> > > d
> >
> > > On Jul 23, 4:33 pm, Peter Kapelyan <[email protected]> wrote:
> > > > Congratulations, it looks great! I don't see why something like this
> > > > shouldn't be in the engine.
> >
> > > > However I do see some glitches, among some: sometimes it flickers,
> and
> > > > disappears after being at a certain angle (around 45 degrees facing
> away
> > > > from the camera). Are you seeing the same glitches on your end?
> >
> > > > -Pete
> >
> > > > On Thu, Jul 23, 2009 at 4:20 PM, aleph1 <[email protected]>
> wrote:
> >
> > > > > I have managed to implement specular masking with some minor
> > > > > modifications to the PhongBitmapMaterial class. It would be
> possible
> > > > > to implement them by creating another material class (it is a fair
> bit
> > > > > of work to implement the CompositeMaterials required to get this
> > > > > effect working), but minor modifications to the existing class make
> it
> > > > > a breeze. Basically, I have made the _specularPhongShader a child
> > > > > material of a new _specularShader:CompositeMaterial. I have also
> added
> > > > > a getter/setter for a _specularMask property that allows you to
> assign
> > > > > a material as a mask.
> >
> > > > > You can see an example here:
> >
> > > > >http://away3d-dev.googlegroups.com/web/specularmask.swf
> >
> > > > > Use the checkbox to toggle the specular mask on and off. This is
> > > > > especially useful for materials that have variable specular levels
> > > > > across the surface (brand new car covered in dirt, polished
> stainless
> > > > > steel with brushed portions, etc.). In this case the specular mask
> > > > > being applied is a bitmap material with a checkerboard. However,
> this
> > > > > technique will also support semi-transparent materials.
> >
> > > > > With some minor modifications, I think I can get the this demo
> working
> > > > > with a single specular mask that affects specular transparency and
> > > > > specular colour across the surface of the object. The current
> > > > > implementation doesn't appear to be causing a big hit in terms of
> > > > > performance, and I think the specular tinting won't be too much of
> a
> > > > > hog either.
> >
> > > > > How do I go about proposing this as an addition to the future
> builds
> > > > > of Away3D?
> >
> > > > > Thanks again for such a great engine!
> >
> > > > --
> > > > ___________________
> >
> > > > Actionscript 3.0 Flash 3D Graphics Engine
> >
> > > > HTTP://AWAY3D.COM
> >
> > --
> > ___________________
> >
> > Actionscript 3.0 Flash 3D Graphics Engine
> >
> > HTTP://AWAY3D.COM
>



-- 
___________________

Actionscript 3.0 Flash 3D Graphics Engine

HTTP://AWAY3D.COM

Reply via email to