Using Qt3D and QGraphicsScene we get two types of SceneGraphs (One Meant for 2D and and One for 3D) and what we are going to do is Embed our 2D Scene inside of our 3D Scene.
You would start out in a "Orthographics" view but be able to switch to a "Perspective" view at anytime.
We could also move our 2D items in our 2D Scenegraph to our 3D Scenegraph or vice versa but the 3D objects would be rendered as a "Orthographics" projection and then simple be flat static images. You could rotate, resize, skew, ... them but we wouldn't be able to transfer them back to the 3D Scenegraph in there original state, for that we would have to retain a copy for later use. But 2D objects going to the 3D scenegraph could in fact be converted into 3D objects or more like "Given an extra dimension" this can be achieved more so with vector objects than raster. But being that we have a "Pattern and Shape" recognition and "Point Cloud" library, we could also reconstruct any form of mathematical data into a shape, In our case a simple or complex raster image.
We will start with Vector Graphics simply because, we will uses the techniques here for "The different types of Selection/Compositing/Clipping" we will need in Image Editing/Paint mode.
I just wanted to show you the following and provide a code snippet to show how programmer friendly Qt really is.
1. Create our rectangle at Position: Left = 0, Top = 0, Size: Width = 50, Height = 50
2. Fill with "Dark Red"
3. Set Outline color to "Dark Green"
4. Add to our Scene
Any and every shape you see above or could possibly conceive in your mind or create with your body can be used as an object for Clipping and Masking.
Note: After you clicked the Rect Shape Button in your LiquidPixel Panel, the (Position: Left = 0, Top = 0) would be the position of your mouse cursor
the moment you clicked on the canvas and the (Size: Width = 50, Height = 50) would be the position of your mouse cursor the moment you
released your mouse button.
We could create a 3D cursor like in Blender and have a rectangle with a predefined size be added at the position of the 3DCursor, another option in
reference to the size of the rectangle would be to offer a dialog that asked for its size.
Note: Our real code wouldn't look like this, because A. We cant pre-define our variable names for our objects, B. The Fill and Outline colors would be provided by our
Background and Foreground color chooser.
Code:QGraphicsRectItem rect(QRectF(0,0, 50, 50)); rect.setBrush(QBrush(Qt::darkRed)); rect.setPen(QPen(Qt::darkGreen)); scene.addItem(rect);
Clipping and Layer Masks
We also have Clipping and Layer Masks in Qt. There similar but not the same and hard to full explain the differences in a user friendly way, hence why I am just going to point you to this photoshop tutorial. http://blog.echoenduring.com/2010/08...-in-photoshop/ The differance is we will be able to do this for both 2D and 3D images.
Raster Graphics Effects and Filters
Raster Graphics Effects and Filters are in a category of there own and the shear volume of not only standalone Effects and Filters available but to use but combined is nothing short of staggering.
And were are not even taking into consideration those provided via Qt, SimpleITK, OpenGL shaders, .... But none the less everything you see below and then some can be applied in some way, shape or form to both 2D and 3D objects be it the Whole Image, Layer, Selection or Brush.
Image Format Support
We can support 100+ image formats in 8, 16, 32 and apparently 64Bit-Float depths, and in every color profile provided by ICC Profiles and these LUTS....
- 3dl Autodesk Apps: Lustre, Flame, etc. Supports shaper LUT + 3D
- ccc ASC CDL ColorCorrectionCollection
- cc ASC CDL ColorCorrection
- csp Cinespace (Rising Sun Research) LUT. Spline-based shaper LUT, with either 1D or 3D LUT.
- cub Truelight format. Shaper Lut + 3D
- cube Iridas format. Either 1D or 3D Lut.
- hdl Houdini. 1D Lut, 3D lut, 1D shaper Lut
- look IRIDAS .look
- mga/m3d Pandora 3D lut
- spi1d 1D format. Imageworks native 1D lut format. HDR friendly, supports arbitrary input and output domains
- spi3d 3D format. Imageworks native 3D lut format.
- spimtx 3x3 matrix + color offset. Imageworks native color matrix format
- vf Inventor 3d lut.
If we take into consideration the special ImageCache class provided by a library called OpenImageIO then we can have images of an .... "wait" how about we just let the developers of OpenImageIO explain ....
Considering who develops it and who uses it I am inclined to believe them.ImageCache is a utility class that allows an application to read pixels from a large number of
image files while using a remarkably small amount of memory and other resources. Of course
it is possible for an application to do this directly using ImageInput objects. But ImageCache
offers the following advantages:
• ImageCache presents an even simpler user interface than ImageInput— the only sup-
ported operations are asking for an ImageSpec describing a subimage in the file, re-
trieving for a block of pixels, and locking/reading/releasing individual tiles. You refer
to images by filename only; you don’t need to keep track of individual file handles or
ImageInput objects. You don’t need to explicitly open or close files.
• The ImageCache is completely thread-safe; if multiple threads are accessing the same
file, the ImageCache internals will handle all the locking and resource sharing.
• No matter how many image files you are accessing, the ImageCache will maintain a
reasonable number of simultaneously-open files, automatically closing files that have not
been needed recently.
• No matter how large the total pixels in all the image files you are dealing with are, the
ImageCache will use only a small amount of memory. It does this by loading only
the individual tiles requested, and as memory allotments are approached, automatically
releasing the memory from tiles that have not been used recently.
In short, if you have an application that will need to read pixels from many large image files,
you can rely on ImageCache to manage all the resources for you. It is reasonable to access
thousands of image files totalling hundreds of GB of pixels, efficiently and using a memory
footprint on the order of 50 MB.
After trying this with Gimp, Inkscape, Krita I couldnt get the pen tool to work like this in any of them so just to reference on how I
am going to make sure this tool functions. Maybe I am using them wrong? idk
A. Animadead is a tiny library, easy to use, with a commented codebase it can be used to make rigs or export entire
animated models, or just animated rigs for models. It's the equivalent to Blenders system.
B. I wanted the skeletal animation library independent of the modeler.
C. Qt and Qt3D can already do what Misfit can, combine that with OpenMesh and we get closer to Blenders Modeling capabilities.
I dont have that with Misfit, and I dont have quads with misfit only tris and those are bad for animation.
I discovered something fairly interesting, Qt3D is all about building Meshes(Even does Bezier bicubic patches), Texturing & Painting, Materials, but its missing somethings
going to fork Qt3D and LibQGLViewer and combine them(Easy). I don't actually have to they should work out of the box unless there is some funny OpenGL context issues but I doubt it.
This will bring lots of cool stuff to the party
1. Keyframe Animations
2. Particle System
3. Grid and Axis
4. OverPainting (Mixing OpenGL (3D) and QPainter (2D) drawing in the same viewer) I could do this before but this is specifically designed for the task.
5. MultiView (A multi-view application, with constrained camera displacements.)
6. Background Images (Displays a background image in the viewer.)
7. Event Recorder Example (Records a scenario that can be replayed and converted into a movie.)
Bunch of other stuff/examples
We also got Blenders Matchmoving Backend!
Comes with a Qt UI Example luck me
Found this nice little project, this is cool because it's using Qt and LibQGLViewer has a bunch of the features I wanted ready to go, no code clean up nothing there literally in library form, all I have to do is drag and drop this whole thing, and move the sample gui to my example folder to keep as a reference in case I have trouble with one of the libraries. Thats it.
A simple GUI testbed for 3D processing and visualization. Cross-platform (Windows, OSX, Linux).
- Mesh simplification using quadric error
- Sampling (regular recursive, Monte Carlo, sphere packing, voxels)
- Skeleton extraction
- Smoothing (Laplacian, scale-dependent, mean curvature flow)
- Space partitioning (octree, kdtree)
- Mesh voxelization
- Subdivision (loop, modified butterfly, longest edge)
- Minimum oriented bounding box (OBB)
- Coordinates (mean value coordinates, Green coordinates)
- Curvature (polynomial fitting, two other implementations)
- Deformation (As-rigid-as-possible (ARAP), Linear Rotation-Invariant Coordinates, FFD, voxel deformation)
- Skinning with dual quaternions
- Mesh Browser display 3D thumbnails of all meshes in a folder
You would probably also be interested in Meshlab: http://www.meshlab.org. It's a free and open source mesh processing program. Also written in Qt and also cross-platform (Windows, OSX and Linux).
Zester, off the top of your head, do you know if 3d-workspace allows batch operations to be run (i.e. loading a mesh, rotating by X radians, taking a snapshot and moving onto the next mesh)? I don't have time to dig into it at the moment (I'm about to start work). It's something I've been wanting for a while, and whilst geomview (www.geomview.org) had it, that project doesn't undergo active development and if I recall correctly it didn't handle render my meshes very well.
Last edited by archibald; 05-17-2013 at 05:39 AM.
I haven't really looked at the program its self just the algos I was interested in. but its something I am more than willing to look into. As this would be a useful feature.
I believe say Blender and Maya use different coordinate systems and in some game engines that are geared for maya's way Example Blackberry Gameplay http://gameplay3d.org/ when you use Blender and export to FBX to be converted with the Gameplay encoder the models rotation is all jacked up.
Something that could batch process models and fix there transformations would be very useful.
I think OBJ, 3DS and Collada(DAE) could be something that can be done soon I know Qt3D can import these, Ill have to check if export is also possible. If not then ill have to wait until I get a chance to work on the Qt Assimp wrapper.
So if this was a request then feature granted Cause I want that also!!! Heehe
Last edited by zester; 05-17-2013 at 06:27 AM.
Fragmentarium is an open source, cross-platform IDE for exploring pixel based graphics on the GPU.
It is inspired by Adobe's Pixel Bender, but uses GLSL, and is created specifically with fractals and generative systems in mind.
Multi-tabbed IDE, with GLSL syntax highlighting
User widgets to manipulate parameter settings
High-resolution (tile) renderings
Progressive rendering, for high quality AA, and distributed ray tracing.
HDR (RGBE .HDR) support and tone mapping
Support for simple animations
Modular GLSL programming - include other fragments
More than 100 examples, including 3D fractals (Mandelbulb, Mandelbox, Quaternion, Kaleidoscopic IFS), 2D fractals (Mandelbrots, Ducks, spherical Julias), Heightmaps, Knots and Hyperbolic Tesselations.
Fragmentarium is built in C++, OpenGL/GLSL, and Qt 4.
The code is really clean, this I can use.
All Fragmentarium programs are written in GLSL. A Fragmentarium 'fragment' is always executed for each pixel in the image - there is no OpenGL geometry in the images. So Fragmentarium programs are typically raycasters or raytracers.
One main feature of Fragmentarium is the ability to break up code in smaller fragments and reuse them. Another core feature is the ability to bind custom user interface elements (such as sliders) to variables in the script.
This thing was made for LiquidPixel
Last edited by zester; 05-17-2013 at 06:58 AM.