[Papervision3D] Changing a Cube's face count at runtime
Ralph Hauwert
r.hauwert at gmail.com
Fri Mar 28 17:02:58 PST 2008
What you want is dynamic level of detail. But in your specific case
that is because you want to overcome the texture distortion caused by
linear / affine texture mapping. So the better solution here is to
have your cube be segmented 1x1x1 and use a bitmapmaterial with it's
precise param set to true..this will take care of dynamic tesselation.
Regards,
Ralph.
On 28 mrt 2008, at 19:59, mark prettyman wrote:
> Sorry should have been more specific
>
> I'm mapping a BitmapFileMaterial and a ColorMaterial to the cube
>
>
> var material01:BitmapFileMaterial=new
> BitmapFileMaterial(dirString + imageArray[i]);
> material01.smooth=true;
> var material02:ColorMaterial=new
> ColorMaterial(glassArray[i].glass_rgb,1);
> paneArray[i]=new Object ;
> matArray[i]=new Object ;
> matArray[i].mats=new MaterialsList ;
> matArray[i].mats.addMaterial(material01,"front");
> matArray[i].mats.addMaterial(material01,"back");
> matArray[i].mats.addMaterial(material02,"left");
> matArray[i].mats.addMaterial(material02,"right");
> matArray[i].mats.addMaterial(material02,"top");
> matArray[i].mats.addMaterial(material02,"bottom");
> paneArray[i].pane=new Cube(matArray[i].mats,30,1,30,10,10,1);
>
> But as I have quite a lot of them I'd like to reduce the sides to
> 2,2,1 when there away from the camera.
>
> Cheers Mark
>
> Try Messenger on your mobile. Text MSN to 63463 Now.
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20080329/f5ae075e/attachment.html
More information about the Papervision3D
mailing list