[Papervision3D] skybox = slow like molasses

Mark I. Ross nospam at therossman.org
Mon Jul 20 14:51:31 PDT 2009


Hey!

Thanks for your response!  Initially I had tried the skybox textures at 
512x512, then 512x256, and finally shaved them down to 512x210.

I found the best solution for my problem, after trying many different 
ways of going about it, was to use precise=false, smooth=true for my 
materials, and to increase the number of segments in the Cube faces.  
This seemed to be the best trade-off.  I also switched to textures that 
are 256x105. but the smoothing makes them look still ok.

Does anyone know, is there some way to calculate the "horizon line" in 
pv3d?  That is to say, the 2d stage Y position of where the horizon is 
based on where the camera is and is pointing in the 3d world?  Is it 
possible to use the functions in Andy's "dragging a 3d sphere" tutorial 
to "cast a ray" from the camera and find out where it's pointing, and 
where it would intersect the stage (or a Plane far off in the distance?)??

If one could determine this value a much simpler 2d side scrolling 
panoramic image could be used and take all that load of pv3d renderer!

As always, any advice would be appreciated!

Cheers,
mark

Damien Pegoraro wrote:
> Hi , first of all, try to use powers of two for you texture sizes, 
> bitmap renders go faster this way : so    512x256 is better than 512x210
>
> What i usually do is using a very small skybox with low segmented 
> planes . The box is stuck to the camera position ( skybox.position = 
> camera.position on each render) and rendered on a separate layer under 
> everything else on scene. it works quite good.
>
> With precise = true ,  you can play with pixelPrecision  property on  
> your materials to find a compromise between looking and speed.
>
> From what i know, small textures on big planes are rendered faster.
>
> Hope it will help !
>
> Damien.
>
>
>
> Mark I. Ross a écrit :
>> hey all,
>>
>> I have a skybox in my pv3d app, the sides are 512x210 (simple 
>> colormaterial for top and bottom).  When I turn it on 
>> (scene.addChild(skybox);) it makes my app run so slow.
>>
>> If i turn off precise (for the side materials) it looks.....not good 
>> (but runs better).  I am thinking the main reason it is so slow is 
>> just because of the sheer numbers of pixels it's drawing (when I had 
>> the sides = 512x512 performance was significantly worse, but 512x210 
>> was as far as I could shave the dimensions down).  If I use a 256x105 
>> bitmap applied to a 512x210 plane (so it will be scaled up) will that 
>> help or am I still hitting a fill rate limit?
>>
>> I've seen pv3d apps with skyboxes that don't run this slow so I 
>> wonder if it is something I'm doing.
>>
>> Does it make sense to just run a 2d panoramic background behind the 
>> viewport, instead of running a proper 3d skybox?
>>
>> Thoughts?
>>
>> Cheers,
>> mark
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090720/fa03b260/attachment.html>


More information about the Papervision3D mailing list