Hi all,
Looking for advice on whether or not this would be viable. I'd like the camera view to be that of an insect/compound eye, in the "hollywood" sense. Ie. a bunch of small images (sub-lens?) of the scene packed into a single view. I've Googled around some but this doesn't seem to have been posted about.
My theory currently is that I'd have to either a) rework the camera rendering or b) render a bunch of view-points and patch them together into a single view. I'd like each sub-lens to actual depict the view from that position, rather than just shift one view to give the appearance of different sub-lens positions.
I'd be interested to know if there's another option or if people think this is feasible :/
Thanks!
Advice - Compound Eye
- Zonder
- Ogre Magi
- Posts: 1168
- Joined: Mon Aug 04, 2008 7:51 pm
- Location: Manchester - England
- x 73
Re: Advice - Compound Eye
Don't you just need to use multi view rendering? essentially like stereo rendering but for far more points!
There are 10 types of people in the world: Those who understand binary, and those who don't...
-
- Bronze Sponsor
- Posts: 12
- Joined: Mon Dec 21, 2020 11:03 am
- x 1
Re: Advice - Compound Eye
Lol, that sounds like the ticket! I wrote that before jumping into the tutorials (still a bit hung up in them) and wanted to put the question out there while I delved through the material. Will this not effectively overburden the system? My only reference for this is the camera object in Gazebo, derived from Ogre1.9, though it sounds like multi-view will act as a single camera.
-
- Bronze Sponsor
- Posts: 12
- Joined: Mon Dec 21, 2020 11:03 am
- x 1
Re: Advice - Compound Eye
Would this require making a N viewports and N scenemanagers effectively? Struggling a little to find the documentation on this. I noticed it mentions it in the the Camera class, but how to do it in practice continue to elude me.
-
- OGRE Team Member
- Posts: 1994
- Joined: Sun Mar 30, 2014 2:51 pm
- x 1075
- Contact:
Re: Advice - Compound Eye
you would need N viewports, but you can use the same camera for all of them. See:
https://github.com/OGRECave/ogre/blob/6 ... .cpp#L4621
which gives:
https://ogrecave.github.io/ogre/vtests1 ... iViewports
altough for sub-lenses, you would need to use N cameras as mathematcally a camera only corresponds to a single lens.
-
- Bronze Sponsor
- Posts: 12
- Joined: Mon Dec 21, 2020 11:03 am
- x 1
Re: Advice - Compound Eye
Awesome, thank you! That's working out very well.paroj wrote: ↑Thu Jan 07, 2021 12:05 amyou would need N viewports, but you can use the same camera for all of them. See:
https://github.com/OGRECave/ogre/blob/6 ... .cpp#L4621
which gives:
https://ogrecave.github.io/ogre/vtests1 ... iViewports
altough for sub-lenses, you would need to use N cameras as mathematcally a camera only corresponds to a single lens.
Unsurprisingly it's running a little slow with hundreds of cameras, so any hints on speedup are welcome.
Next is getting scripts working! I've managed to run the compositor scripts for things like "Glass" and "Old TV", but DOF and Vignetting (a la viewtopic.php?f=11&t=68394&p=448388&hil ... ng#p448388) continue to elude me. Probably just need to revisit https://ogrecave.github.io/ogre/api/1.1 ... ripts.html
-
- OGRE Team Member
- Posts: 1994
- Joined: Sun Mar 30, 2014 2:51 pm
- x 1075
- Contact:
Re: Advice - Compound Eye
take a look at the "Shader System" sample and check "Instanced Viewports". I am not sure that scales beyond 4 viewports though and editing that requires in-depth ogre and shader knowledge.