Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


robertoranon

Member Since 27 Mar 2013
Offline Last Active May 22 2013 09:53 AM

Topics I've Started

Smart Viewpoint Computation C++ Library (free, open source)

27 April 2013 - 09:09 AM

SmartViewpointComputationLib is a C++ library to compute the best viewpoint in a 3D scene that satisfies a set of visual properties, such as size, visibility or angle of selected objects in the scene. For example, suppose you have a building floor scene like this one:

 

building.jpeg

 

 

and you would like a viewpoint that shows one of the computers in the rooms, say the one in the bottom left room. Let's suppose that "monitor", "keyboard", and "mouse" are the scene entities' names of that computer parts. You then create a set of properties like:
 
monitor: should be entirely visible from the viewpoint
monitor: should be not occluded by other objects
monitor: should be rendered at a certain minimum size 
 
and similarly for the other keyboard and mouse. You then ask the the library to compute a viewpoint satisfying those properties, and it will return something like this:

 

 

computer.jpeg

 

The available properties include objects's size, angle, occlusion, and position in the image rendered from the viewpoint (also relative position of two objects, e.g. one at the right of another). 

 

 

The library does not make any assumption on the scene and objects, and only require access to the scene objects' meshes and world transformations. It can return a result within a time of your choice (e.g., a few tens of milliseconds). More time will generally increase the quality of results, especially in large and complex scenes.
 
The library is released under the LGPL license. We also provide, as public domain code, bindings for the Ogre open-source rendering engine. Connecting it to other rendering engines, however, requires to modify just one public-domain file (which for Ogre consists of 500 lines of code).
 
The library is available at http://bitbucket.org/rranon/smart-viewpoint-computation-lib and, besides source code, there are two binary demos for Win and Mac demonstrating some of the library capabilities.

 

 


viewpoint computation through AI

28 March 2013 - 06:52 AM

Hello,

 

   I just want to let people interested in automatically computing viewpoints in a game (e.g. replay cameras in driving games, or cinematic cameras) that there is a new open-source C++ library for that, called Smart Viewpoint Computation Lib, and available at https://bitbucket.org/rranon/smart-viewpoint-computation-lib

 

 

SmartViewpointComputationLib is a C++ library to compute the best viewpoint in a 3D scene that satisfies a set of visual properties, such as size, visibility or angle of selected objects in the scene. For example, suppose you have a building floor scene like this one:

 
building.jpeg
 
and you want a viewpoint that visualizes the monitor, mouse and keyboard in the bottom-left room (provided each of these is an individual object in the scene). You declare that you want each object to be in the viewpoint view volume, as unoccluded by any other object as possible, and preferably of a certain size on screen. The library will return a result like this (AABBs added just to highlight the objects):
 
computer.jpeg
 

Other kinds of properties include the orientation of objects with respect to the viewpoint (i.e., camera angle in photography terms), framing an object in specific parts of the screen, and relative position on screen of two objects (e.g., one at the left of the other). In other words, you can find viewpoints like you would compose a picture, leaving to the library the task of positioning and aiming the camera.

The library does not make any assumption on the scene and objects, and only require access to the scene objects' meshes and world transformations. It can return a result within a time of your choice (e.g., a few tens of milliseconds). More time will generally increase the quality of results, especially in large and complex scenes.

The library comes with bindings for the Ogre open-source rendering engine. Connecting it to other rendering engines, however, requires to modify just one header file (which for Ogre consists of 500 lines of code).

If you are interested, give it a look! 

 

 
 

PARTNERS