Polys near-plane culling too soon?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Polys near-plane culling too soon?

RavenWorks
Heya... Having a lot of fun with Papervision, but I'm having one problem I can't quite pin down.

I made a small 'first-person room' demo, but pieces of the floor keep disappearing under me.

http://img.ravenworks.ca/vanishingfloor.jpg

Originally, the floor and walls were all 2 polys each, and they would disappear very easily; I've since subdivided them, but even so, triangles from the floor keep vanishing too soon. I set the scene.triangleCuller to a new RectangleTriangleCuller the size of the stage (and even several times larger than the stage, just to make sure), and it didn't change anything. (Though setting the RectangleTriangleCuller too small DID make a difference, so the problem doesn't just seem to be misunderstanding how to set the culler..) It looks like this is a near-plane problem, but I can't figure out where to change that, if indeed I can. Any suggestions? Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Polys near-plane culling too soon?

Tim Knip-2
I'm afraid you can't change the nearplane (yet).

We're working on this though.

In meantime you could try use pv3d's 'timk_frustum' branch with which
you can set the camera's nearplane to for example -10...
Not sure, but *maybe* it solves your problem :)

Tim

2007/9/27, RavenWorks <[hidden email]>:

>
> Heya... Having a lot of fun with Papervision, but I'm having one problem I
> can't quite pin down.
>
> I made a small 'first-person room' demo, but pieces of the floor keep
> disappearing under me.
>
> http://img.ravenworks.ca/vanishingfloor.jpg
>
> Originally, the floor and walls were all 2 polys each, and they would
> disappear very easily; I've since subdivided them, but even so, triangles
> from the floor keep vanishing too soon. I set the scene.triangleCuller to a
> new RectangleTriangleCuller the size of the stage (and even several times
> larger than the stage, just to make sure), and it didn't change anything.
> (Though setting the RectangleTriangleCuller too small DID make a difference,
> so the problem doesn't just seem to be misunderstanding how to set the
> culler..) It looks like this is a near-plane problem, but I can't figure out
> where to change that, if indeed I can. Any suggestions? Thanks!
> --
> View this message in context: http://www.nabble.com/Polys-near-plane-culling-too-soon--tf4530795.html#a12929511
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> [hidden email]
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Re: Polys near-plane culling too soon?

RavenWorks
Hi, thanks for the advice :)

I tried out the timk_frustum branch, and I'd just like to report one small bug with it.. currently, FrustumCamera3D tries to check the 'radius' of every single object in the scene, but (as I learned from another one of your posts elsewhere on the board!), some Collada objects are just containers for other objects and don't have any geometry of their own, which means their radius is never calculated, so Flash throws a 'cannot access..null object reference' error. (The radius turns up as NaN in the debugger.) I've gotten around it for now by adding "if (obj.geometry == null) return INSIDE;" to the beginning of FrustumCamera3D's testObject function, but I don't know enough about how this stuff works to know if that's a good idea or not.

Anyway, I'm still trying to get the FrustumCamera3D camera to give me a normal-looking image (the fact that it won't is making me wonder if the problem was in my geometry all along), but I thought I'd mention this bug incase anyone else was having the same problem. Thanks again :)



Tim Knip-2 wrote
I'm afraid you can't change the nearplane (yet).

We're working on this though.

In meantime you could try use pv3d's 'timk_frustum' branch with which
you can set the camera's nearplane to for example -10...
Not sure, but *maybe* it solves your problem :)

Tim

2007/9/27, RavenWorks <omgitsraven@gmail.com>:
>
> Heya... Having a lot of fun with Papervision, but I'm having one problem I
> can't quite pin down.
>
> I made a small 'first-person room' demo, but pieces of the floor keep
> disappearing under me.
>
> http://img.ravenworks.ca/vanishingfloor.jpg
>
> Originally, the floor and walls were all 2 polys each, and they would
> disappear very easily; I've since subdivided them, but even so, triangles
> from the floor keep vanishing too soon. I set the scene.triangleCuller to a
> new RectangleTriangleCuller the size of the stage (and even several times
> larger than the stage, just to make sure), and it didn't change anything.
> (Though setting the RectangleTriangleCuller too small DID make a difference,
> so the problem doesn't just seem to be misunderstanding how to set the
> culler..) It looks like this is a near-plane problem, but I can't figure out
> where to change that, if indeed I can. Any suggestions? Thanks!
> --
> View this message in context: http://www.nabble.com/Polys-near-plane-culling-too-soon--tf4530795.html#a12929511
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D@osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>

_______________________________________________
Papervision3D mailing list
Papervision3D@osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Re: Polys near-plane culling too soon?

Tim Knip-2
Thanks for the bugreport!

Will fix asap.

Tim

2007/10/4, RavenWorks <[hidden email]>:

>
> Hi, thanks for the advice :)
>
> I tried out the timk_frustum branch, and I'd just like to report one small
> bug with it.. currently, FrustumCamera3D tries to check the 'radius' of
> every single object in the scene, but (as I learned from another one of your
> posts elsewhere on the board!), some Collada objects are just containers for
> other objects and don't have any geometry of their own, which means their
> radius is never calculated, so Flash throws a 'cannot access..null object
> reference' error. (The radius turns up as NaN in the debugger.) I've gotten
> around it for now by adding "if (obj.geometry == null) return INSIDE;" to
> the beginning of FrustumCamera3D's testObject function, but I don't know
> enough about how this stuff works to know if that's a good idea or not.
>
> Anyway, I'm still trying to get the FrustumCamera3D camera to give me a
> normal-looking image (the fact that it won't is making me wonder if the
> problem was in my geometry all along), but I thought I'd mention this bug
> incase anyone else was having the same problem. Thanks again :)
>
>
>
>
> Tim Knip-2 wrote:
> >
> > I'm afraid you can't change the nearplane (yet).
> >
> > We're working on this though.
> >
> > In meantime you could try use pv3d's 'timk_frustum' branch with which
> > you can set the camera's nearplane to for example -10...
> > Not sure, but *maybe* it solves your problem :)
> >
> > Tim
> >
> > 2007/9/27, RavenWorks <[hidden email]>:
> >>
> >> Heya... Having a lot of fun with Papervision, but I'm having one problem
> >> I
> >> can't quite pin down.
> >>
> >> I made a small 'first-person room' demo, but pieces of the floor keep
> >> disappearing under me.
> >>
> >> http://img.ravenworks.ca/vanishingfloor.jpg
> >>
> >> Originally, the floor and walls were all 2 polys each, and they would
> >> disappear very easily; I've since subdivided them, but even so, triangles
> >> from the floor keep vanishing too soon. I set the scene.triangleCuller to
> >> a
> >> new RectangleTriangleCuller the size of the stage (and even several times
> >> larger than the stage, just to make sure), and it didn't change anything.
> >> (Though setting the RectangleTriangleCuller too small DID make a
> >> difference,
> >> so the problem doesn't just seem to be misunderstanding how to set the
> >> culler..) It looks like this is a near-plane problem, but I can't figure
> >> out
> >> where to change that, if indeed I can. Any suggestions? Thanks!
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Polys-near-plane-culling-too-soon--tf4530795.html#a12929511
> >> Sent from the Papervision3D mailing list archive at Nabble.com.
> >>
> >>
> >> _______________________________________________
> >> Papervision3D mailing list
> >> [hidden email]
> >> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> >>
> >
> > _______________________________________________
> > Papervision3D mailing list
> > [hidden email]
> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Polys-near-plane-culling-too-soon--tf4530795.html#a13042912
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> [hidden email]
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Re: Polys near-plane culling too soon?

KieranD
This post has NOT been accepted by the mailing list yet.
In reply to this post by RavenWorks
Hey,

I am trying to get a similar room working. Would it be possible to share your source files?
Thanks, Kieran