Page 1 of 1
camera distance
Posted: Tue May 18, 2004 1:44 am
by malachi
Hello, I have a large terrain mesh and want to see accross the entire mesh, but it seems there is a clipping range built into the camera distance ..
any ideas to extend, or am i being an idiot? sorry - i am primarily a 3D artist/animator (max) determined to learn at least some basic programming..
Posted: Tue May 18, 2004 6:02 am
by c_olin3404
Thanks!
Posted: Tue May 18, 2004 9:42 pm
by malachi
appreciate the help
Posted: Tue May 18, 2004 10:53 pm
by Guest
does this also fix the 'fisheye view" that I see in the demo?
Posted: Tue May 18, 2004 11:25 pm
by Tyn
It can never fix it, that's the catch with 3D games on a 2D moniter, it can reduce it if you get the right value. I've got a cheap hack for that so I never have to fiddle with the settings; I have a GUI bar on each side of the screen that coincidently hides it quite well
Posted: Sun May 23, 2004 2:40 pm
by LordNaikon
i wanted to try that. but i am not yet able to work with the docu! i have never worked with such a thing like that documentation of an api or what irrlicht is.
can you give me a step by step example of to use the docu to use the setFarValue
to the camera (smgr->addCameraSceneNodeFPS(0, 0.0f, 0.0f, -1, 0, 0) ; )
Posted: Sun May 23, 2004 2:44 pm
by Tyn
Open that link...click the setFarValue() link and it will take it to the definition.
Surely it isn't that hard?
Posted: Sun May 23, 2004 2:58 pm
by R00mpel
You can use the code like this to fix the "fisheye view":
Code: Select all
#define PI 3.1415926538
.
.
.
cam->setFOV(PI/2);
Posted: Sun May 23, 2004 3:20 pm
by LordNaikon
virtual void irr::scene::ICameraSceneNode::setFarValue ( f32 zf ) [pure virtual]
Sets the value of the far clipping plane (default: 2000.0f)
Parameters:
zf: New z far value.
ok the link gives me that result but i realy don't know how to use that exactly.
how to use setFarValue ? i want to set the farvalue to 20000.0f --
setFarValue ( 20000.0f ) ;
but how can i use the docu so that i know what to wright ? i don't want to trouble everybody with my garbage ... i whant to know how to use the docu
i found that by seraching the forum
camera->setFOV(70);
camera->setFarValue(1000);
camera->setNearValue(1.4);
so were did i get camera? i want to use smgr->addCameraSceneNodeFPS(0, 100.0f, 400.0f, -1, 0, 0); ..... if i know how to use the docu i don't ask silly question again I swear!!!!!
: !:
Posted: Sun May 23, 2004 5:17 pm
by Tyn
scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(0, 100.0f, 400.0f, -1, 0, 0);
Then do:
camera->setFarValue( 20000 );
Posted: Sun May 23, 2004 6:26 pm
by LordNaikon
thx u fery much !
smgr->addCameraSceneNodeFPS(0, 100.0f, 400.0f, -1, 0, 0);
it is thus a shortened way of writing
scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(0, 100.0f, 400.0f, -1, 0, 0);
without creating a camera or only internally creation of it so that i can't use
setFarValue( 20000 ); ( if this what a say is not true then it is unimportant)
it works and only this is important
Posted: Sun May 23, 2004 6:54 pm
by Tyn
You can create the camera without storing the pointer that's returned upon creation, but you won't be able to access it or modify any of it's values.
Posted: Sun May 23, 2004 7:14 pm
by LordNaikon
thats what i mean
Posted: Sun May 23, 2004 7:44 pm
by condrula
[quote="Tyn"]
..............
Then do:
camera->setFarValue( 20000 );[/quote]
this works great thanks!