Board index FlightGear The FlightGear project

What is a CameraGroup ?

Questions about the FlightGear organisation, website, wiki etc.

What is a CameraGroup ?

Postby chimpa » Sat May 06, 2017 7:42 pm

Ok. I got the source code.

But I can't figure out what is a CameraGroup (apart from not being a group of cameras :) ).

It seems that CameraInfo is a sort of 'camera group' and CameraGroup is a sort of 'CameraInfo group'. But there are much more coded there.

If someone can help me, I will be very grateful.

Thanks in advance.
Last edited by chimpa on Sat May 06, 2017 11:49 pm, edited 2 times in total.
chimpa
 
Posts: 4
Joined: Sat May 06, 2017 7:19 pm

Re: What is a CameraGroup ?

Postby Catalanoic » Sat May 06, 2017 7:54 pm

code from where? Please, when you start a thread specify what you're talking about.
User avatar
Catalanoic
 
Posts: 1099
Joined: Mon Mar 05, 2012 1:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: What is a CameraGroup ?

Postby chimpa » Sat May 06, 2017 8:24 pm

Hi, Catalanoic.

I am talking about the source code.
chimpa
 
Posts: 4
Joined: Sat May 06, 2017 7:19 pm

Re: What is a CameraGroup ?

Postby Thorsten » Sun May 07, 2017 7:01 am

That's a rather technical question, not easy to explain without lots of background. I suppose the OpenSceneGraph documentation might be a good start to learn how rendering code works.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: What is a CameraGroup ?

Postby chimpa » Sun May 07, 2017 7:34 am

Hi Thorsten.

Actually, i know a bit how rendering works in OpenSceneGraph.

Is the role of the CameraGroup.cxx and hxx that is confusing me.

It seems that CameraInfo class contains all osg::Cameras of a, lets say, stage (or pipeline). It is the de facto 'camera group', but has some other stuff inside.

CameraGroup seems to be an array of CameraInfo, and has some more stuff too. e.g There is Rembrandt specialized code in renderer.cxx AND in CameraGroup.cxx. I don't understand why CameraGroup.cxx needs to know about Rembrandt.

What i can say, for now.

(1) CameraGroup is not a 'group of cameras'. It is :

a) a group of CameraInfo ;
b) something else.

(2) CameraInfo is :

a) the real 'group of osg::Camera objects'
b) something else

The "something else" of CameraGroup and CameraInfo is confusing me.

Is the code documented anywhere ?

Thanks for the reply.
chimpa
 
Posts: 4
Joined: Sat May 06, 2017 7:19 pm

Re: What is a CameraGroup ?

Postby Thorsten » Sun May 07, 2017 8:40 am

I don't understand why CameraGroup.cxx needs to know about Rembrandt.


Without being intimately familiar with Rembrandt, I'd guess because Rembrandt has rather special needs with its different cameras (think shadow camera at the sun origin) and render targets to the various buffers.

And no, the rendering code is not documented anywhere and many of the people who write it aren't around for questions - so you just have to be persistent. Usually it makes sense after a few days...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: What is a CameraGroup ?

Postby AndersG » Sun May 07, 2017 11:02 am

Well, asking on the flightgear-devel list might reach some of those developers or at least those who are somewhat familiar with that code.

I suspect the reason CameraInfo contains a set of osg::Camera objects is that a single view is rendered using several (2?) cameras - at least the near and far cameras. I think the Camera group is a group of related FG views, same view position but e.g. different directions, typically used for multiscreen setups.
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2524
Joined: Wed Nov 29, 2006 10:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: What is a CameraGroup ?

Postby icecode » Sun May 07, 2017 12:22 pm

Also the wiki has some hints from core developers which give a general idea of how rendering is designed in FG, specifically the CameraGroup class: http://wiki.flightgear.org/The_FlightGear_Rendering_Pipeline#CameraGroup.
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: What is a CameraGroup ?

Postby chimpa » Sun May 07, 2017 12:50 pm

Thanks for the help.

The wiki puts some light. And I will try the flightgear-devel.
chimpa
 
Posts: 4
Joined: Sat May 06, 2017 7:19 pm


Return to The FlightGear project

Who is online

Users browsing this forum: No registered users and 6 guests