[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nel] about landscapes & portals

From: Lionel Berenguier
Subject: Re: [Nel] about landscapes & portals
Date: Wed, 23 Apr 2003 19:23:23 +0200

----- Original Message -----
From: "Francois DUSSAUGE" <address@hidden>
To: "Developer's list for the NeL platform" <address@hidden>
Sent: Wednesday, April 23, 2003 3:04 PM
Subject: RE: [Nel] about landscapes & portals

> >>>>>>>>>>>>>>>
> So we try to make one big cluster (for the landscape) and a little one
(for the house) inside.
> We have put the flags of the big cluster at true for both of them (visible
from parent AND parent visible), and for the house we tried with all the
possible combinations and we always see the interior of the house from
outside !!! (from the big cluster)
> So we have just one IG, it should work? are our parameters correct? can we
include a cluster inside another?
> We tries the same scheme with one IG per cluster (one for the landscape,
father of the house's IG) and the portal included in the two IGs, but the
problem is that a portal must be included in two clusters of the same IG. is
there any solution for that? how should we put the flags?
> thanks again !!

Ok you need some important information before going so far.

Actually, the system support a hierarchy of IG (which are also called
"ClusterSystem"), and so a hierarchy of graph of clusters. Just take the
simple case of the landscape and our house.

In the Engine, there is always a Global Cluster called the "RootCluster"
contained in a so called "GlobalInstanceGroup". They are the default and
represent the whole world, and any object are somewhat linked to them by
default. This is the case for landscape (Landscape CAN'T be in a other
cluster than the RootCluster). So your first error is to try to create a
cluster for the landscape.

When you load an IG with clusters in it, what you do actually is to make
this IG son of the GlobalInstanceGroup. At the same time, the engine link
the hierarchy of clusters. And this what The Flags are used for: control by
witch cluster the instange group link to his father (here the

So to be clear what you typically need to do for a house with a door is:

Make 2 clusters: 1 big wich contains the interior of your house (ClusterA),
and one little which is in front of your door (ClusterB) (intersecting with
the ClusterA of course and with a portal into the intersection of ClusterA
and ClusterB, matching your door)

ClusterA won't be "visible from parent" neither "parent visible"
ClusterB will be "visible from parent" and "parent visible"

When the camera is outdoor (ie in the RootCluster) it will parse through
ClusterB since this one is "visible from parent". The standard portal system
will then take place to clip or not to ClusterA.
When the camera is in the ClusterA, and if clusterB is visible, then his
parent Cluster (ie the RootCluster here) will be visible too since ClusterB
is "parent visible" (of course the parent is displayed with the same pyramid
used for the ClusterB, ie the one clipped by the portal ClusterA-ClusterB)

One last thing: by default the camera is always in the RootCluster because
we use at Nevrax the collisions to know in which cluster system (ie wich ig)
the player is, and so we do a "Camera->setClusterSystem()" to accelerate
search. For your tests, you can do
"Camera->setClusterSystem((UInstanceGroup*)-1)" which will force the engine
to search all clusters in all cluster systems. It should not be so slow
because it uses quadgrids.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]