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.
Rectangles:
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.
or
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.
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....
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.
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.
Rectangles:
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.
or
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 ....
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.
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.
Comment