camera distance

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
malachi
Posts: 3
Joined: Tue May 18, 2004 1:40 am
Location: US
Contact:

camera distance

Post 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..
c_olin3404
Posts: 67
Joined: Fri Jan 23, 2004 5:04 am

Post by c_olin3404 »

malachi
Posts: 3
Joined: Tue May 18, 2004 1:40 am
Location: US
Contact:

Thanks!

Post by malachi »

appreciate the help
Guest

Post by Guest »

does this also fix the 'fisheye view" that I see in the demo?
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post 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 :)
LordNaikon
Posts: 164
Joined: Wed May 05, 2004 5:34 pm
Location: Germany Berlin
Contact:

Post 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) ; )
q|^.^|p beeing every time friendly to everyone
sys: 2500+Barton 512MB 6600GT WinXP
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

Open that link...click the setFarValue() link and it will take it to the definition.

Surely it isn't that hard?
R00mpel
Posts: 41
Joined: Sun Nov 09, 2003 10:12 am
Location: Russia, Nizhny Novgorod

Post 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);
The only thing to fear is running out of beer!
LordNaikon
Posts: 164
Joined: Wed May 05, 2004 5:34 pm
Location: Germany Berlin
Contact:

Post 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!!!!! :D : !:
Last edited by LordNaikon on Mon May 24, 2004 1:31 pm, edited 1 time in total.
q|^.^|p beeing every time friendly to everyone
sys: 2500+Barton 512MB 6600GT WinXP
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(0, 100.0f, 400.0f, -1, 0, 0);

Then do:

camera->setFarValue( 20000 );
LordNaikon
Posts: 164
Joined: Wed May 05, 2004 5:34 pm
Location: Germany Berlin
Contact:

Post 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 :D
q|^.^|p beeing every time friendly to everyone
sys: 2500+Barton 512MB 6600GT WinXP
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post 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.
LordNaikon
Posts: 164
Joined: Wed May 05, 2004 5:34 pm
Location: Germany Berlin
Contact:

Post by LordNaikon »

thats what i mean :lol:
q|^.^|p beeing every time friendly to everyone
sys: 2500+Barton 512MB 6600GT WinXP
condrula
Posts: 44
Joined: Wed Mar 10, 2004 11:51 pm
Location: italy

Post by condrula »

[quote="Tyn"]
..............
Then do:

camera->setFarValue( 20000 );[/quote]

this works great thanks!
Post Reply