This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > VRML > August 2005 > orientation and distance based level of details
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
orientation and distance based level of details
|
|
| Jean-Charles Quillet 2005-08-10, 8:47 pm |
| Hi,
I'm looking for a way to implement orientation and distance based level
of details in VRML97. I think there might be a way somehow using the
Switch and TimeSensor nodes. But I cannot figure out how to do it.
If someone has an idea, it'd be most welcome.
Thanks,
Jean-Charles
| |
| Mnemonic 2005-08-11, 7:20 am |
| Hello!
You just need to use "LOD" node.
Here is the sample:
#SAMPLE BEGIN
#VRML V2.0 utf8
WorldInfo{title"Level Of Detail"}
NavigationInfo{headlight TRUE}
Background{skyColor[0.9 0.9 0.9, 1.0 1.0 1.0, 0.9 0.9 0.9, 0.8 0.8 0.8]
skyAngle[1.08,1.58,1.87]}
Transform{translation 0 0 1 scale 0.5 0.5 0.5
children [
LOD { range[20, 40, 60] #Setting ranges
of LOD
level[
Shape{appearance Appearance { #First level of
detail
material Material{ diffuseColor 1.0 0.2 0.2}}
geometry Sphere{}
}
Shape{appearance Appearance { #Second level of
detail
material Material{ diffuseColor 0.2 0.2 1.0}}
geometry Cone{}
}
Shape{appearance Appearance { #Third level of
detail
material Material{ diffuseColor 0.2 1.0 0.2}}
geometry Box{}
}
]}
]}
#END OF SAMPLE
For creating more complicated scenes you also need to use a "Group" node...
?? "Jean-Charles Quillet" <jean-charles.quillet@labri.fr>
> Hi,
> I'm looking for a way to implement orientation and distance based level of
> details in VRML97. I think there might be a way somehow using the Switch
> and TimeSensor nodes. But I cannot figure out how to do it.
> If someone has an idea, it'd be most welcome.
> Thanks,
>
> Jean-Charles
| |
| Joerg Scheurich aka MUFTI 2005-08-11, 7:29 pm |
| > I'm looking for a way to implement orientation and distance based level
> of details in VRML97. I think there might be a way somehow using the
> Switch and TimeSensor nodes.
Per selfmade LOD you need a ProximitySensor, a switch, a script and the
matching children objects of the selfmade LOD.
The ProximitySensor has the eventOuts positionChanged and orientationChanged
so you can account in a script, which object of the self made LOD should
be visible.
so long
MUFTI
--
Unbekannter Fehler. Der Fehler 999 wurde erkannt.
Legen Sie den Datentraeger "C:\" ein, um den Fehler zu beheben.
Fortfahren/Fortfahren
| |
| Joerg Scheurich aka MUFTI 2005-08-11, 7:29 pm |
| >> I'm looking for a way to implement orientation and distance based level of
[color=darkred]
> You just need to use "LOD" node.
The LOD node is only distance based, not orientation based.
so long
MUFTI
--
Unbekannter Fehler. Der Fehler 999 wurde erkannt.
Legen Sie den Datentraeger "C:\" ein, um den Fehler zu beheben.
Fortfahren/Fortfahren
| |
| Jean-Charles Quillet 2005-08-16, 7:41 am |
| Joerg Scheurich aka MUFTI a écrit :
>
>
> Per selfmade LOD you need a ProximitySensor, a switch, a script and the
> matching children objects of the selfmade LOD.
>
> The ProximitySensor has the eventOuts positionChanged and orientationChanged
> so you can account in a script, which object of the self made LOD should
> be visible.
>
> so long
> MUFTI
Ok, thanks for hint. I'll give a try.
Jean-Charles
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|