[Papervision3D] Smart Textures
Ralph Hauwert
r.hauwert at gmail.com
Mon Apr 2 20:06:50 EDT 2007
Arne,
You are spot on 100%. We didn't do this flag wise, and won't do that.
Instead, we now have smart materials. This is how the new textures and
shaders will work in RC2, and this is exactly how you will be enabled
to write your own materials. You will be provided with vertex normals
(optional, if needed only and you will be able to set on what nTh
frame they will be updated...this is a performance optimisation), face
normals (they will just always be there), and the screenZ etc.
Gouraud and Z are there, as are phong and bumpmapping, toonrendering
and mipmapping (not working yet that one). My personal holy grail is
normal mapping, which will work, but I just need the time to finish it
: time is my main issue momentarily. As far as RC2, the ball is mostly
in my court in this moment.
Although the material API is mostly set, there's still work to be
done, and currently optimisations are my main point off interest. I
expect some major performance increasements, next to the ones we've
already achieved.
http://www.unitzeroone.com/blog/flash_examples/flash_9_pv_3d_example_3d_bumpm.html
<-Bumpmapping
http://www.unitzeroone.com/blog/flash_examples/another_pv3d_material_demo_fla_1.html
<-Phongshading
Regards,
Ralph.
On 4/3/07, Arne Strout <mm21xx at hotmail.com> wrote:
>
> I have been fiddling around with the best way to implement textures which
> have a bit more brain to them.
> Currently Face3D supports bitmap and color textures, but supports no
> callback based texture method.
>
> What I'm proposing is this:
>
> Modify Face3D to add a line in which there is a flag based callback to the
> Material object passing the Face3D object before any rendition of the
> texture / color for the face is done.
> This allows, for example, the texture to change it's color based on the
> location of the Face, or perhaps to create a gradient fill (Garoud / Z
> lighting? anyone?)
> This would also allow for distance fog, but I'm not going to get into the
> logic for that just yet.
>
> Any thoughts?
> Would the extra IF statement be too much weight?
>
> I'm thinking something along the lines of:
>
> if(material.smart){material.prepare(this)} // Where smart is a boolean
> property of MaterialObject3D
>
> before the line (line 269):
> if( texture )
> {
>
> If this modification could be added I could start building some fun material
> choices without having to modify the current engine.
>
> -Arne G Strout
>
> ________________________________
> Take a break and play crossword puzzles - FREE! Play Now!
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
--
Ralph Hauwert
FlashCoder
More information about the Papervision3D
mailing list