On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be
It certainly looks nice, but what is Jun exactly ?
Originally OpenGL package in VW Smalltalk On Tue, Dec 30, 2014 at 12:50 AM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be
It certainly looks nice, but what is Jun exactly ?
On 29 Dec 2014, at 21:04, S Krish <krishnamachari.sudhakar@gmail.com> wrote:
Originally OpenGL package in VW Smalltalk
OK, thanks. And how is this different or how does this compare to Athens then ?
On Tue, Dec 30, 2014 at 12:50 AM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be
It certainly looks nice, but what is Jun exactly ?
Le 29 déc. 2014 à 21:12, Sven Van Caekenberghe <sven@stfx.eu> a écrit :
On 29 Dec 2014, at 21:04, S Krish <krishnamachari.sudhakar@gmail.com> wrote:
Originally OpenGL package in VW Smalltalk
OK, thanks.
And how is this different or how does this compare to Athens then ?
I guess June is for 3D modeling whereas Athens is a 2D rendering framework Alain
On Tue, Dec 30, 2014 at 12:50 AM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be
It certainly looks nice, but what is Jun exactly ?
Sven Jun is a 3D frameworks developed in 1998 in VisualWorks http://aokilab.kyoto-su.ac.jp/jun/index.html It was quite advanced and this is nice to get more people doing 3d in Pharo. They are using the back -end developed by ronie and JB and this is cool Athens is just a canvas and a oo decomposition of the canvas, brush and strokes nothing related to 3D. Stef Le 29/12/14 20:20, Sven Van Caekenberghe a écrit :
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be It certainly looks nice, but what is Jun exactly ?
On 29 Dec 2014, at 23:10, stepharo <stepharo@free.fr> wrote:
Sven
Jun is a 3D frameworks developed in 1998 in VisualWorks http://aokilab.kyoto-su.ac.jp/jun/index.html It was quite advanced and this is nice to get more people doing 3d in Pharo. They are using the back -end developed by ronie and JB and this is cool
Athens is just a canvas and a oo decomposition of the canvas, brush and strokes nothing related to 3D.
Ah, OK - more choice, more options is good.
Stef
Le 29/12/14 20:20, Sven Van Caekenberghe a écrit :
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be It certainly looks nice, but what is Jun exactly ?
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d. On Tue, Dec 30, 2014 at 12:10 AM, stepharo <stepharo@free.fr> wrote:
Sven
Jun is a 3D frameworks developed in 1998 in VisualWorks http://aokilab.kyoto-su.ac.jp/jun/index.html It was quite advanced and this is nice to get more people doing 3d in Pharo. They are using the back -end developed by ronie and JB and this is cool
Athens is just a canvas and a oo decomposition of the canvas, brush and strokes nothing related to 3D. Stef
Le 29/12/14 20:20, Sven Van Caekenberghe a écrit :
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be
It certainly looks nice, but what is Jun exactly ?
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
I do not think that is going to work easily with the best performance possible. Cairo could be using OpenGL, but probably in a different OpenGL than the one that is being used for 3d graphics. In addition, the Cairo OpenGL backend is experimental ( http://cairographics.org/OpenGL/) . Currently you have to render into a surface in CPU, then transfer it into GPU and then render the polygon. A naive version using the OpenGL backend is going to have GPU->CPU->GPU roundtrip If we are using this route, I think that is better to just use the current version of Athens for this. With Athens we can render into a Form, which can be used to populate a Woden/Roassal texture or transferred directly to OpenGL. This has the advantage of not having a explicit dependency in Cairo. I guess that I will make a demo of this later. It should be easy. I think that a longer term approach could be having a custom renderer, tailored for Athens using OpenGL or maybe OpenCL. 2D vector graphics are really hard. In my opinion they are harder than 3d graphics because of concave self intersecting paths. Stroking a path can be really hard because of thins such as tapering. The 3D hardware is designed to draw efficiently points, lines and triangles. All of them are simple convex polygon. Most of the 2D vector engines such as Cairo are software renderer, scanliners to be more specific. The old cairo opengl backend had to tessellate the paths Later I am going to take a better look in Jun. And see how I can integrate with Woden/Woden-Roassal. For what I have seen in the videos, it seems to be using software rendering. Currently I have been working in my internship about volumetric data visualization and the new FFI. 2014-12-30 11:01 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
On Tue, Dec 30, 2014 at 12:10 AM, stepharo <stepharo@free.fr> wrote:
Sven
Jun is a 3D frameworks developed in 1998 in VisualWorks http://aokilab.kyoto-su.ac.jp/jun/index.html It was quite advanced and this is nice to get more people doing 3d in Pharo. They are using the back -end developed by ronie and JB and this is cool
Athens is just a canvas and a oo decomposition of the canvas, brush and strokes nothing related to 3D. Stef
Le 29/12/14 20:20, Sven Van Caekenberghe a écrit :
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be
It certainly looks nice, but what is Jun exactly ?
Is this a real concern ? Afterall vector data is a lot less complex than 3d geometry and CPUs nowdays are multicore. Don't know about the Opengl backend of Cairo. Igor also once shown me a Spec for vector graphics on OpenGL by Khronos Group. So there are alternatives but as always it will require someone doing the hard work to bring that functionality to Pharo. Newest OpenGL versions also come with dynamic tesselation geometry shaders that basically increase the detail of a 3d object the closer a camera gets to it which is similar to vector graphics which is something that could also work as basic via NBOpenGL to bring Athens to 3d side completely bypassing Cairo. On Tue, Dec 30, 2014 at 9:18 PM, Ronie Salgado <roniesalg@gmail.com> wrote:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to
apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
I do not think that is going to work easily with the best performance possible. Cairo could be using OpenGL, but probably in a different OpenGL than the one that is being used for 3d graphics.
In addition, the Cairo OpenGL backend is experimental ( http://cairographics.org/OpenGL/) . Currently you have to render into a surface in CPU, then transfer it into GPU and then render the polygon. A naive version using the OpenGL backend is going to have GPU->CPU->GPU roundtrip
If we are using this route, I think that is better to just use the current version of Athens for this. With Athens we can render into a Form, which can be used to populate a Woden/Roassal texture or transferred directly to OpenGL. This has the advantage of not having a explicit dependency in Cairo. I guess that I will make a demo of this later. It should be easy.
I think that a longer term approach could be having a custom renderer, tailored for Athens using OpenGL or maybe OpenCL.
2D vector graphics are really hard. In my opinion they are harder than 3d graphics because of concave self intersecting paths. Stroking a path can be really hard because of thins such as tapering.
The 3D hardware is designed to draw efficiently points, lines and triangles. All of them are simple convex polygon. Most of the 2D vector engines such as Cairo are software renderer, scanliners to be more specific. The old cairo opengl backend had to tessellate the paths
Later I am going to take a better look in Jun. And see how I can integrate with Woden/Woden-Roassal. For what I have seen in the videos, it seems to be using software rendering. Currently I have been working in my internship about volumetric data visualization and the new FFI.
2014-12-30 11:01 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to
apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
On Tue, Dec 30, 2014 at 12:10 AM, stepharo <stepharo@free.fr> wrote:
Sven
Jun is a 3D frameworks developed in 1998 in VisualWorks http://aokilab.kyoto-su.ac.jp/jun/index.html It was quite advanced and this is nice to get more people doing 3d in Pharo. They are using the back -end developed by ronie and JB and this is cool
Athens is just a canvas and a oo decomposition of the canvas, brush and strokes nothing related to 3D. Stef
Le 29/12/14 20:20, Sven Van Caekenberghe a écrit :
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be
It certainly looks nice, but what is Jun exactly ?
Is this a real concern ? Afterall vector data is a lot less complex than 3d geometry and CPUs nowdays are multicore.
For really smooth and complex animations, yes it is a concern. Performance. If the objective is to draw a static shape or a slow animation, it is not a big problem. Also CPU <-> GPU data transferring is an expensive operation that has to be avoided if possible. Actually 2D vector data is more complex. 3D geometry comes already processed to be directly rendered, and it is represented by only two arrays: vertices and indices. In contrast, 2D vector data is represented by a stream of commands that have to be evaluated. BTW, we don't have support for real multithreading in Pharo, and we will not have it for a very long time. The closest thing to real multithreading that we are getting in the near term
Don't know about the Opengl backend of Cairo. Igor also once shown me a Spec for vector graphics on OpenGL by Khronos Group.
Well, there is OpenVG designed for mobile platform(Android and iOS). OpenVG is not supported by desktop graphic cards vendors. The closest thing we have in the desktop world is the NV_path_rendering NVIDIA only extension. At least the paper that describes this extension is really good. The bad thing is that it depends at least partially in the Loop-Blinn algorithm that is patented, if I remember right. Newest OpenGL versions also come with dynamic tesselation geometry shaders
that basically increase the detail of a 3d object the closer a camera gets to it which is similar to vector graphics which is something that could also work as basic via NBOpenGL to bring Athens to 3d side completely bypassing Cairo.
In first place, not all of the world have at least DX11/OpenGL 4.xx level graphic card. But, it does not matter too much because the hardware tessellation does not help you anything with the main problem. The biggest problem is that 2D vector paths can be concave, and they can have a hole . The easiest way to support it is by using the stencil buffer, and in my opinion is the method with the better results. In fact, the NV_path_rendering extension is implemented in this way, but directly in the OpenGL driver. This method renders first the tessellated path with a triangle fan, with the stencil test set to invert the stencil buffer bits. In this way, the stencil buffer holds 1 in the points that are inside of the path, and 0 in the points that are outside of the path. Then, the bounding box of the path is covered with fill color/gradient, but with the stencil test set to only pass when the stencil buffer value is 1, and to also clear the stencil buffer in the covered region during the process to allow rendering more paths elements. Each one of the changes to the way the stencil buffer is used involves a state change, which is expensive. I think this is the reason of why NVIDIA implemented their extension directly in the OpenGL. I know of these problems because I implemented once the stencil method in C++ with OpenGL. The old opengl Cairo backend worked by triangulating the paths. Triangulation of concave geometry is hard to do, and there some degenerate case in which it produces bad results. Best regards Ronie 2014-12-30 16:58 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Is this a real concern ? Afterall vector data is a lot less complex than 3d geometry and CPUs nowdays are multicore.
Don't know about the Opengl backend of Cairo. Igor also once shown me a Spec for vector graphics on OpenGL by Khronos Group.
So there are alternatives but as always it will require someone doing the hard work to bring that functionality to Pharo.
Newest OpenGL versions also come with dynamic tesselation geometry shaders that basically increase the detail of a 3d object the closer a camera gets to it which is similar to vector graphics which is something that could also work as basic via NBOpenGL to bring Athens to 3d side completely bypassing Cairo.
On Tue, Dec 30, 2014 at 9:18 PM, Ronie Salgado <roniesalg@gmail.com> wrote:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to
apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
I do not think that is going to work easily with the best performance possible. Cairo could be using OpenGL, but probably in a different OpenGL than the one that is being used for 3d graphics.
In addition, the Cairo OpenGL backend is experimental ( http://cairographics.org/OpenGL/) . Currently you have to render into a surface in CPU, then transfer it into GPU and then render the polygon. A naive version using the OpenGL backend is going to have GPU->CPU->GPU roundtrip
If we are using this route, I think that is better to just use the current version of Athens for this. With Athens we can render into a Form, which can be used to populate a Woden/Roassal texture or transferred directly to OpenGL. This has the advantage of not having a explicit dependency in Cairo. I guess that I will make a demo of this later. It should be easy.
I think that a longer term approach could be having a custom renderer, tailored for Athens using OpenGL or maybe OpenCL.
2D vector graphics are really hard. In my opinion they are harder than 3d graphics because of concave self intersecting paths. Stroking a path can be really hard because of thins such as tapering.
The 3D hardware is designed to draw efficiently points, lines and triangles. All of them are simple convex polygon. Most of the 2D vector engines such as Cairo are software renderer, scanliners to be more specific. The old cairo opengl backend had to tessellate the paths
Later I am going to take a better look in Jun. And see how I can integrate with Woden/Woden-Roassal. For what I have seen in the videos, it seems to be using software rendering. Currently I have been working in my internship about volumetric data visualization and the new FFI.
2014-12-30 11:01 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to
apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
On Tue, Dec 30, 2014 at 12:10 AM, stepharo <stepharo@free.fr> wrote:
Sven
Jun is a 3D frameworks developed in 1998 in VisualWorks http://aokilab.kyoto-su.ac.jp/jun/index.html It was quite advanced and this is nice to get more people doing 3d in Pharo. They are using the back -end developed by ronie and JB and this is cool
Athens is just a canvas and a oo decomposition of the canvas, brush and strokes nothing related to 3D. Stef
Le 29/12/14 20:20, Sven Van Caekenberghe a écrit :
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be
It certainly looks nice, but what is Jun exactly ?
I dont doubt for a minute it will be a difficult task , this is why I chose not to do it and instead I went down the easy route of relying on existing graphics engines in my case Blender which I try to expose it to Pharo. I learned the hard way how much time one can waste doing things the hard way. On Tue, Dec 30, 2014 at 10:59 PM, Ronie Salgado <roniesalg@gmail.com> wrote:
Is this a real concern ? Afterall vector data is a lot less complex than
3d geometry and CPUs nowdays are multicore.
For really smooth and complex animations, yes it is a concern. Performance. If the objective is to draw a static shape or a slow animation, it is not a big problem. Also CPU <-> GPU data transferring is an expensive operation that has to be avoided if possible.
Actually 2D vector data is more complex. 3D geometry comes already processed to be directly rendered, and it is represented by only two arrays: vertices and indices.
In contrast, 2D vector data is represented by a stream of commands that have to be evaluated.
BTW, we don't have support for real multithreading in Pharo, and we will not have it for a very long time. The closest thing to real multithreading that we are getting in the near term
Don't know about the Opengl backend of Cairo. Igor also once shown me a Spec for vector graphics on OpenGL by Khronos Group.
Well, there is OpenVG designed for mobile platform(Android and iOS). OpenVG is not supported by desktop graphic cards vendors.
The closest thing we have in the desktop world is the NV_path_rendering NVIDIA only extension. At least the paper that describes this extension is really good. The bad thing is that it depends at least partially in the Loop-Blinn algorithm that is patented, if I remember right.
Newest OpenGL versions also come with dynamic tesselation geometry shaders
that basically increase the detail of a 3d object the closer a camera gets to it which is similar to vector graphics which is something that could also work as basic via NBOpenGL to bring Athens to 3d side completely bypassing Cairo.
In first place, not all of the world have at least DX11/OpenGL 4.xx level graphic card. But, it does not matter too much because the hardware tessellation does not help you anything with the main problem.
The biggest problem is that 2D vector paths can be concave, and they can have a hole . The easiest way to support it is by using the stencil buffer, and in my opinion is the method with the better results. In fact, the NV_path_rendering extension is implemented in this way, but directly in the OpenGL driver.
This method renders first the tessellated path with a triangle fan, with the stencil test set to invert the stencil buffer bits. In this way, the stencil buffer holds 1 in the points that are inside of the path, and 0 in the points that are outside of the path.
Then, the bounding box of the path is covered with fill color/gradient, but with the stencil test set to only pass when the stencil buffer value is 1, and to also clear the stencil buffer in the covered region during the process to allow rendering more paths elements.
Each one of the changes to the way the stencil buffer is used involves a state change, which is expensive. I think this is the reason of why NVIDIA implemented their extension directly in the OpenGL.
I know of these problems because I implemented once the stencil method in C++ with OpenGL.
The old opengl Cairo backend worked by triangulating the paths. Triangulation of concave geometry is hard to do, and there some degenerate case in which it produces bad results.
Best regards Ronie
2014-12-30 16:58 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Is this a real concern ? Afterall vector data is a lot less complex than
3d geometry and CPUs nowdays are multicore.
Don't know about the Opengl backend of Cairo. Igor also once shown me a Spec for vector graphics on OpenGL by Khronos Group.
So there are alternatives but as always it will require someone doing the hard work to bring that functionality to Pharo.
Newest OpenGL versions also come with dynamic tesselation geometry shaders that basically increase the detail of a 3d object the closer a camera gets to it which is similar to vector graphics which is something that could also work as basic via NBOpenGL to bring Athens to 3d side completely bypassing Cairo.
On Tue, Dec 30, 2014 at 9:18 PM, Ronie Salgado <roniesalg@gmail.com> wrote:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to
apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
I do not think that is going to work easily with the best performance possible. Cairo could be using OpenGL, but probably in a different OpenGL than the one that is being used for 3d graphics.
In addition, the Cairo OpenGL backend is experimental ( http://cairographics.org/OpenGL/) . Currently you have to render into a surface in CPU, then transfer it into GPU and then render the polygon. A naive version using the OpenGL backend is going to have GPU->CPU->GPU roundtrip
If we are using this route, I think that is better to just use the current version of Athens for this. With Athens we can render into a Form, which can be used to populate a Woden/Roassal texture or transferred directly to OpenGL. This has the advantage of not having a explicit dependency in Cairo. I guess that I will make a demo of this later. It should be easy.
I think that a longer term approach could be having a custom renderer, tailored for Athens using OpenGL or maybe OpenCL.
2D vector graphics are really hard. In my opinion they are harder than 3d graphics because of concave self intersecting paths. Stroking a path can be really hard because of thins such as tapering.
The 3D hardware is designed to draw efficiently points, lines and triangles. All of them are simple convex polygon. Most of the 2D vector engines such as Cairo are software renderer, scanliners to be more specific. The old cairo opengl backend had to tessellate the paths
Later I am going to take a better look in Jun. And see how I can integrate with Woden/Woden-Roassal. For what I have seen in the videos, it seems to be using software rendering. Currently I have been working in my internship about volumetric data visualization and the new FFI.
2014-12-30 11:01 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to
apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
On Tue, Dec 30, 2014 at 12:10 AM, stepharo <stepharo@free.fr> wrote:
Sven
Jun is a 3D frameworks developed in 1998 in VisualWorks http://aokilab.kyoto-su.ac.jp/jun/index.html It was quite advanced and this is nice to get more people doing 3d in Pharo. They are using the back -end developed by ronie and JB and this is cool
Athens is just a canvas and a oo decomposition of the canvas, brush and strokes nothing related to 3D. Stef
Le 29/12/14 20:20, Sven Van Caekenberghe a écrit :
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be
It certainly looks nice, but what is Jun exactly ?
Well... The hard way is very gratifying. We could have worked on an integration of D3 in Pharo instead of working on Roassal :) Alexandre Envoyé de mon iPhone
Le 31 déc. 2014 à 11:38, kilon alios <kilon.alios@gmail.com> a écrit :
I dont doubt for a minute it will be a difficult task , this is why I chose not to do it and instead I went down the easy route of relying on existing graphics engines in my case Blender which I try to expose it to Pharo. I learned the hard way how much time one can waste doing things the hard way.
On Tue, Dec 30, 2014 at 10:59 PM, Ronie Salgado <roniesalg@gmail.com> wrote:
Is this a real concern ? Afterall vector data is a lot less complex than 3d geometry and CPUs nowdays are multicore.
For really smooth and complex animations, yes it is a concern. Performance. If the objective is to draw a static shape or a slow animation, it is not a big problem. Also CPU <-> GPU data transferring is an expensive operation that has to be avoided if possible.
Actually 2D vector data is more complex. 3D geometry comes already processed to be directly rendered, and it is represented by only two arrays: vertices and indices.
In contrast, 2D vector data is represented by a stream of commands that have to be evaluated.
BTW, we don't have support for real multithreading in Pharo, and we will not have it for a very long time. The closest thing to real multithreading that we are getting in the near term
Don't know about the Opengl backend of Cairo. Igor also once shown me a Spec for vector graphics on OpenGL by Khronos Group.
Well, there is OpenVG designed for mobile platform(Android and iOS). OpenVG is not supported by desktop graphic cards vendors.
The closest thing we have in the desktop world is the NV_path_rendering NVIDIA only extension. At least the paper that describes this extension is really good. The bad thing is that it depends at least partially in the Loop-Blinn algorithm that is patented, if I remember right.
Newest OpenGL versions also come with dynamic tesselation geometry shaders that basically increase the detail of a 3d object the closer a camera gets to it which is similar to vector graphics which is something that could also work as basic via NBOpenGL to bring Athens to 3d side completely bypassing Cairo.
In first place, not all of the world have at least DX11/OpenGL 4.xx level graphic card. But, it does not matter too much because the hardware tessellation does not help you anything with the main problem.
The biggest problem is that 2D vector paths can be concave, and they can have a hole . The easiest way to support it is by using the stencil buffer, and in my opinion is the method with the better results. In fact, the NV_path_rendering extension is implemented in this way, but directly in the OpenGL driver.
This method renders first the tessellated path with a triangle fan, with the stencil test set to invert the stencil buffer bits. In this way, the stencil buffer holds 1 in the points that are inside of the path, and 0 in the points that are outside of the path.
Then, the bounding box of the path is covered with fill color/gradient, but with the stencil test set to only pass when the stencil buffer value is 1, and to also clear the stencil buffer in the covered region during the process to allow rendering more paths elements.
Each one of the changes to the way the stencil buffer is used involves a state change, which is expensive. I think this is the reason of why NVIDIA implemented their extension directly in the OpenGL.
I know of these problems because I implemented once the stencil method in C++ with OpenGL.
The old opengl Cairo backend worked by triangulating the paths. Triangulation of concave geometry is hard to do, and there some degenerate case in which it produces bad results.
Best regards Ronie
2014-12-30 16:58 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Is this a real concern ? Afterall vector data is a lot less complex than 3d geometry and CPUs nowdays are multicore.
Don't know about the Opengl backend of Cairo. Igor also once shown me a Spec for vector graphics on OpenGL by Khronos Group.
So there are alternatives but as always it will require someone doing the hard work to bring that functionality to Pharo.
Newest OpenGL versions also come with dynamic tesselation geometry shaders that basically increase the detail of a 3d object the closer a camera gets to it which is similar to vector graphics which is something that could also work as basic via NBOpenGL to bring Athens to 3d side completely bypassing Cairo.
On Tue, Dec 30, 2014 at 9:18 PM, Ronie Salgado <roniesalg@gmail.com> wrote:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
I do not think that is going to work easily with the best performance possible. Cairo could be using OpenGL, but probably in a different OpenGL than the one that is being used for 3d graphics.
In addition, the Cairo OpenGL backend is experimental (http://cairographics.org/OpenGL/) . Currently you have to render into a surface in CPU, then transfer it into GPU and then render the polygon. A naive version using the OpenGL backend is going to have GPU->CPU->GPU roundtrip
If we are using this route, I think that is better to just use the current version of Athens for this. With Athens we can render into a Form, which can be used to populate a Woden/Roassal texture or transferred directly to OpenGL. This has the advantage of not having a explicit dependency in Cairo. I guess that I will make a demo of this later. It should be easy.
I think that a longer term approach could be having a custom renderer, tailored for Athens using OpenGL or maybe OpenCL.
2D vector graphics are really hard. In my opinion they are harder than 3d graphics because of concave self intersecting paths. Stroking a path can be really hard because of thins such as tapering.
The 3D hardware is designed to draw efficiently points, lines and triangles. All of them are simple convex polygon. Most of the 2D vector engines such as Cairo are software renderer, scanliners to be more specific. The old cairo opengl backend had to tessellate the paths
Later I am going to take a better look in Jun. And see how I can integrate with Woden/Woden-Roassal. For what I have seen in the videos, it seems to be using software rendering. Currently I have been working in my internship about volumetric data visualization and the new FFI.
2014-12-30 11:01 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
On Tue, Dec 30, 2014 at 12:10 AM, stepharo <stepharo@free.fr> wrote: Sven
Jun is a 3D frameworks developed in 1998 in VisualWorks http://aokilab.kyoto-su.ac.jp/jun/index.html It was quite advanced and this is nice to get more people doing 3d in Pharo. They are using the back -end developed by ronie and JB and this is cool
Athens is just a canvas and a oo decomposition of the canvas, brush and strokes nothing related to 3D. Stef
Le 29/12/14 20:20, Sven Van Caekenberghe a écrit :
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be It certainly looks nice, but what is Jun exactly ?
not if the task is huge To give you an idea about the diffirence in size https://www.openhub.net/p/d3js https://www.openhub.net/p/blender you are a team of full time , very experienced pharo coders (correct me if i am wrong) me I am a part time newcomer to pharo. On Wed, Dec 31, 2014 at 1:59 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Well... The hard way is very gratifying. We could have worked on an integration of D3 in Pharo instead of working on Roassal :)
Alexandre
Envoyé de mon iPhone
Le 31 déc. 2014 à 11:38, kilon alios <kilon.alios@gmail.com> a écrit :
I dont doubt for a minute it will be a difficult task , this is why I chose not to do it and instead I went down the easy route of relying on existing graphics engines in my case Blender which I try to expose it to Pharo. I learned the hard way how much time one can waste doing things the hard way.
On Tue, Dec 30, 2014 at 10:59 PM, Ronie Salgado <roniesalg@gmail.com> wrote:
Is this a real concern ? Afterall vector data is a lot less complex than
3d geometry and CPUs nowdays are multicore.
For really smooth and complex animations, yes it is a concern. Performance. If the objective is to draw a static shape or a slow animation, it is not a big problem. Also CPU <-> GPU data transferring is an expensive operation that has to be avoided if possible.
Actually 2D vector data is more complex. 3D geometry comes already processed to be directly rendered, and it is represented by only two arrays: vertices and indices.
In contrast, 2D vector data is represented by a stream of commands that have to be evaluated.
BTW, we don't have support for real multithreading in Pharo, and we will not have it for a very long time. The closest thing to real multithreading that we are getting in the near term
Don't know about the Opengl backend of Cairo. Igor also once shown me a Spec for vector graphics on OpenGL by Khronos Group.
Well, there is OpenVG designed for mobile platform(Android and iOS). OpenVG is not supported by desktop graphic cards vendors.
The closest thing we have in the desktop world is the NV_path_rendering NVIDIA only extension. At least the paper that describes this extension is really good. The bad thing is that it depends at least partially in the Loop-Blinn algorithm that is patented, if I remember right.
Newest OpenGL versions also come with dynamic tesselation geometry
shaders that basically increase the detail of a 3d object the closer a camera gets to it which is similar to vector graphics which is something that could also work as basic via NBOpenGL to bring Athens to 3d side completely bypassing Cairo.
In first place, not all of the world have at least DX11/OpenGL 4.xx level graphic card. But, it does not matter too much because the hardware tessellation does not help you anything with the main problem.
The biggest problem is that 2D vector paths can be concave, and they can have a hole . The easiest way to support it is by using the stencil buffer, and in my opinion is the method with the better results. In fact, the NV_path_rendering extension is implemented in this way, but directly in the OpenGL driver.
This method renders first the tessellated path with a triangle fan, with the stencil test set to invert the stencil buffer bits. In this way, the stencil buffer holds 1 in the points that are inside of the path, and 0 in the points that are outside of the path.
Then, the bounding box of the path is covered with fill color/gradient, but with the stencil test set to only pass when the stencil buffer value is 1, and to also clear the stencil buffer in the covered region during the process to allow rendering more paths elements.
Each one of the changes to the way the stencil buffer is used involves a state change, which is expensive. I think this is the reason of why NVIDIA implemented their extension directly in the OpenGL.
I know of these problems because I implemented once the stencil method in C++ with OpenGL.
The old opengl Cairo backend worked by triangulating the paths. Triangulation of concave geometry is hard to do, and there some degenerate case in which it produces bad results.
Best regards Ronie
2014-12-30 16:58 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Is this a real concern ? Afterall vector data is a lot less complex than
3d geometry and CPUs nowdays are multicore.
Don't know about the Opengl backend of Cairo. Igor also once shown me a Spec for vector graphics on OpenGL by Khronos Group.
So there are alternatives but as always it will require someone doing the hard work to bring that functionality to Pharo.
Newest OpenGL versions also come with dynamic tesselation geometry shaders that basically increase the detail of a 3d object the closer a camera gets to it which is similar to vector graphics which is something that could also work as basic via NBOpenGL to bring Athens to 3d side completely bypassing Cairo.
On Tue, Dec 30, 2014 at 9:18 PM, Ronie Salgado <roniesalg@gmail.com> wrote:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to
apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
I do not think that is going to work easily with the best performance possible. Cairo could be using OpenGL, but probably in a different OpenGL than the one that is being used for 3d graphics.
In addition, the Cairo OpenGL backend is experimental ( http://cairographics.org/OpenGL/) . Currently you have to render into a surface in CPU, then transfer it into GPU and then render the polygon. A naive version using the OpenGL backend is going to have GPU->CPU->GPU roundtrip
If we are using this route, I think that is better to just use the current version of Athens for this. With Athens we can render into a Form, which can be used to populate a Woden/Roassal texture or transferred directly to OpenGL. This has the advantage of not having a explicit dependency in Cairo. I guess that I will make a demo of this later. It should be easy.
I think that a longer term approach could be having a custom renderer, tailored for Athens using OpenGL or maybe OpenCL.
2D vector graphics are really hard. In my opinion they are harder than 3d graphics because of concave self intersecting paths. Stroking a path can be really hard because of thins such as tapering.
The 3D hardware is designed to draw efficiently points, lines and triangles. All of them are simple convex polygon. Most of the 2D vector engines such as Cairo are software renderer, scanliners to be more specific. The old cairo opengl backend had to tessellate the paths
Later I am going to take a better look in Jun. And see how I can integrate with Woden/Woden-Roassal. For what I have seen in the videos, it seems to be using software rendering. Currently I have been working in my internship about volumetric data visualization and the new FFI.
2014-12-30 11:01 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to
apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
On Tue, Dec 30, 2014 at 12:10 AM, stepharo <stepharo@free.fr> wrote:
Sven
Jun is a 3D frameworks developed in 1998 in VisualWorks http://aokilab.kyoto-su.ac.jp/jun/index.html It was quite advanced and this is nice to get more people doing 3d in Pharo. They are using the back -end developed by ronie and JB and this is cool
Athens is just a canvas and a oo decomposition of the canvas, brush and strokes nothing related to 3D. Stef
Le 29/12/14 20:20, Sven Van Caekenberghe a écrit :
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be
It certainly looks nice, but what is Jun exactly ?
My email was more an encouragement than anything else :-) Alexandre
On Dec 31, 2014, at 1:06 PM, kilon alios <kilon.alios@gmail.com> wrote:
not if the task is huge
To give you an idea about the diffirence in size
https://www.openhub.net/p/d3js
https://www.openhub.net/p/blender
you are a team of full time , very experienced pharo coders (correct me if i am wrong)
me I am a part time newcomer to pharo.
On Wed, Dec 31, 2014 at 1:59 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Well... The hard way is very gratifying. We could have worked on an integration of D3 in Pharo instead of working on Roassal :)
Alexandre
Envoyé de mon iPhone
Le 31 déc. 2014 à 11:38, kilon alios <kilon.alios@gmail.com> a écrit :
I dont doubt for a minute it will be a difficult task , this is why I chose not to do it and instead I went down the easy route of relying on existing graphics engines in my case Blender which I try to expose it to Pharo. I learned the hard way how much time one can waste doing things the hard way.
On Tue, Dec 30, 2014 at 10:59 PM, Ronie Salgado <roniesalg@gmail.com> wrote: Is this a real concern ? Afterall vector data is a lot less complex than 3d geometry and CPUs nowdays are multicore. For really smooth and complex animations, yes it is a concern. Performance. If the objective is to draw a static shape or a slow animation, it is not a big problem. Also CPU <-> GPU data transferring is an expensive operation that has to be avoided if possible.
Actually 2D vector data is more complex. 3D geometry comes already processed to be directly rendered, and it is represented by only two arrays: vertices and indices.
In contrast, 2D vector data is represented by a stream of commands that have to be evaluated.
BTW, we don't have support for real multithreading in Pharo, and we will not have it for a very long time. The closest thing to real multithreading that we are getting in the near term Don't know about the Opengl backend of Cairo. Igor also once shown me a Spec for vector graphics on OpenGL by Khronos Group. Well, there is OpenVG designed for mobile platform(Android and iOS). OpenVG is not supported by desktop graphic cards vendors.
The closest thing we have in the desktop world is the NV_path_rendering NVIDIA only extension. At least the paper that describes this extension is really good. The bad thing is that it depends at least partially in the Loop-Blinn algorithm that is patented, if I remember right.
Newest OpenGL versions also come with dynamic tesselation geometry shaders that basically increase the detail of a 3d object the closer a camera gets to it which is similar to vector graphics which is something that could also work as basic via NBOpenGL to bring Athens to 3d side completely bypassing Cairo.
In first place, not all of the world have at least DX11/OpenGL 4.xx level graphic card. But, it does not matter too much because the hardware tessellation does not help you anything with the main problem.
The biggest problem is that 2D vector paths can be concave, and they can have a hole . The easiest way to support it is by using the stencil buffer, and in my opinion is the method with the better results. In fact, the NV_path_rendering extension is implemented in this way, but directly in the OpenGL driver.
This method renders first the tessellated path with a triangle fan, with the stencil test set to invert the stencil buffer bits. In this way, the stencil buffer holds 1 in the points that are inside of the path, and 0 in the points that are outside of the path.
Then, the bounding box of the path is covered with fill color/gradient, but with the stencil test set to only pass when the stencil buffer value is 1, and to also clear the stencil buffer in the covered region during the process to allow rendering more paths elements.
Each one of the changes to the way the stencil buffer is used involves a state change, which is expensive. I think this is the reason of why NVIDIA implemented their extension directly in the OpenGL.
I know of these problems because I implemented once the stencil method in C++ with OpenGL.
The old opengl Cairo backend worked by triangulating the paths. Triangulation of concave geometry is hard to do, and there some degenerate case in which it produces bad results.
Best regards Ronie
2014-12-30 16:58 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Is this a real concern ? Afterall vector data is a lot less complex than 3d geometry and CPUs nowdays are multicore.
Don't know about the Opengl backend of Cairo. Igor also once shown me a Spec for vector graphics on OpenGL by Khronos Group.
So there are alternatives but as always it will require someone doing the hard work to bring that functionality to Pharo.
Newest OpenGL versions also come with dynamic tesselation geometry shaders that basically increase the detail of a 3d object the closer a camera gets to it which is similar to vector graphics which is something that could also work as basic via NBOpenGL to bring Athens to 3d side completely bypassing Cairo.
On Tue, Dec 30, 2014 at 9:18 PM, Ronie Salgado <roniesalg@gmail.com> wrote: Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d. I do not think that is going to work easily with the best performance possible. Cairo could be using OpenGL, but probably in a different OpenGL than the one that is being used for 3d graphics.
In addition, the Cairo OpenGL backend is experimental (http://cairographics.org/OpenGL/) . Currently you have to render into a surface in CPU, then transfer it into GPU and then render the polygon. A naive version using the OpenGL backend is going to have GPU->CPU->GPU roundtrip
If we are using this route, I think that is better to just use the current version of Athens for this. With Athens we can render into a Form, which can be used to populate a Woden/Roassal texture or transferred directly to OpenGL. This has the advantage of not having a explicit dependency in Cairo. I guess that I will make a demo of this later. It should be easy.
I think that a longer term approach could be having a custom renderer, tailored for Athens using OpenGL or maybe OpenCL.
2D vector graphics are really hard. In my opinion they are harder than 3d graphics because of concave self intersecting paths. Stroking a path can be really hard because of thins such as tapering.
The 3D hardware is designed to draw efficiently points, lines and triangles. All of them are simple convex polygon. Most of the 2D vector engines such as Cairo are software renderer, scanliners to be more specific. The old cairo opengl backend had to tessellate the paths
Later I am going to take a better look in Jun. And see how I can integrate with Woden/Woden-Roassal. For what I have seen in the videos, it seems to be using software rendering. Currently I have been working in my internship about volumetric data visualization and the new FFI.
2014-12-30 11:01 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
On Tue, Dec 30, 2014 at 12:10 AM, stepharo <stepharo@free.fr> wrote: Sven
Jun is a 3D frameworks developed in 1998 in VisualWorks http://aokilab.kyoto-su.ac.jp/jun/index.html It was quite advanced and this is nice to get more people doing 3d in Pharo. They are using the back -end developed by ronie and JB and this is cool
Athens is just a canvas and a oo decomposition of the canvas, brush and strokes nothing related to 3D. Stef
Le 29/12/14 20:20, Sven Van Caekenberghe a écrit :
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be It certainly looks nice, but what is Jun exactly ?
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Oh I am not complaining at all, your work is very inspiring , afterall what good Pharo is if one does not create code in it. Nor I would be a happy pharoer that I would need to code in javascript to improve / extend Roassal . Or modify C source code to make Athens 3D. My case is a bit special that my demands graphics wise are extremely high , since high end 3d is my main area of focus. I think in the end both roads can be very beneficial, huge libraries used by Pharo but because they are not made in Pharo will be harder to extend but with more features. Smaller pharo libraries that come with fewer features but are much easier to improve because they are coded completely in pharo. No such thing as ideal choice, everything comes with its advantages and disadvantages. On Wed, Dec 31, 2014 at 3:07 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
My email was more an encouragement than anything else :-)
Alexandre
On Dec 31, 2014, at 1:06 PM, kilon alios <kilon.alios@gmail.com> wrote:
not if the task is huge
To give you an idea about the diffirence in size
https://www.openhub.net/p/d3js
https://www.openhub.net/p/blender
you are a team of full time , very experienced pharo coders (correct me if i am wrong)
me I am a part time newcomer to pharo.
On Wed, Dec 31, 2014 at 1:59 PM, Alexandre Bergel < alexandre.bergel@me.com> wrote: Well... The hard way is very gratifying. We could have worked on an integration of D3 in Pharo instead of working on Roassal :)
Alexandre
Envoyé de mon iPhone
Le 31 déc. 2014 à 11:38, kilon alios <kilon.alios@gmail.com> a écrit :
I dont doubt for a minute it will be a difficult task , this is why I chose not to do it and instead I went down the easy route of relying on existing graphics engines in my case Blender which I try to expose it to Pharo. I learned the hard way how much time one can waste doing things the hard way.
On Tue, Dec 30, 2014 at 10:59 PM, Ronie Salgado <roniesalg@gmail.com> wrote: Is this a real concern ? Afterall vector data is a lot less complex than 3d geometry and CPUs nowdays are multicore. For really smooth and complex animations, yes it is a concern. Performance. If the objective is to draw a static shape or a slow animation, it is not a big problem. Also CPU <-> GPU data transferring is an expensive operation that has to be avoided if possible.
Actually 2D vector data is more complex. 3D geometry comes already processed to be directly rendered, and it is represented by only two arrays: vertices and indices.
In contrast, 2D vector data is represented by a stream of commands that have to be evaluated.
BTW, we don't have support for real multithreading in Pharo, and we will not have it for a very long time. The closest thing to real multithreading that we are getting in the near term Don't know about the Opengl backend of Cairo. Igor also once shown me a Spec for vector graphics on OpenGL by Khronos Group. Well, there is OpenVG designed for mobile platform(Android and iOS). OpenVG is not supported by desktop graphic cards vendors.
The closest thing we have in the desktop world is the NV_path_rendering NVIDIA only extension. At least the paper that describes this extension is really good. The bad thing is that it depends at least partially in the Loop-Blinn algorithm that is patented, if I remember right.
Newest OpenGL versions also come with dynamic tesselation geometry shaders that basically increase the detail of a 3d object the closer a camera gets to it which is similar to vector graphics which is something that could also work as basic via NBOpenGL to bring Athens to 3d side completely bypassing Cairo.
In first place, not all of the world have at least DX11/OpenGL 4.xx level graphic card. But, it does not matter too much because the hardware tessellation does not help you anything with the main problem.
The biggest problem is that 2D vector paths can be concave, and they can have a hole . The easiest way to support it is by using the stencil buffer, and in my opinion is the method with the better results. In fact, the NV_path_rendering extension is implemented in this way, but directly in the OpenGL driver.
This method renders first the tessellated path with a triangle fan, with the stencil test set to invert the stencil buffer bits. In this way, the stencil buffer holds 1 in the points that are inside of the path, and 0 in the points that are outside of the path.
Then, the bounding box of the path is covered with fill color/gradient, but with the stencil test set to only pass when the stencil buffer value is 1, and to also clear the stencil buffer in the covered region during the process to allow rendering more paths elements.
Each one of the changes to the way the stencil buffer is used involves a state change, which is expensive. I think this is the reason of why NVIDIA implemented their extension directly in the OpenGL.
I know of these problems because I implemented once the stencil method in C++ with OpenGL.
The old opengl Cairo backend worked by triangulating the paths. Triangulation of concave geometry is hard to do, and there some degenerate case in which it produces bad results.
Best regards Ronie
2014-12-30 16:58 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Is this a real concern ? Afterall vector data is a lot less complex than 3d geometry and CPUs nowdays are multicore.
Don't know about the Opengl backend of Cairo. Igor also once shown me a Spec for vector graphics on OpenGL by Khronos Group.
So there are alternatives but as always it will require someone doing the hard work to bring that functionality to Pharo.
Newest OpenGL versions also come with dynamic tesselation geometry shaders that basically increase the detail of a 3d object the closer a camera gets to it which is similar to vector graphics which is something that could also work as basic via NBOpenGL to bring Athens to 3d side completely bypassing Cairo.
On Tue, Dec 30, 2014 at 9:18 PM, Ronie Salgado <roniesalg@gmail.com> wrote: Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d. I do not think that is going to work easily with the best performance possible. Cairo could be using OpenGL, but probably in a different OpenGL than the one that is being used for 3d graphics.
In addition, the Cairo OpenGL backend is experimental ( http://cairographics.org/OpenGL/) . Currently you have to render into a surface in CPU, then transfer it into GPU and then render the polygon. A naive version using the OpenGL backend is going to have GPU->CPU->GPU roundtrip
If we are using this route, I think that is better to just use the current version of Athens for this. With Athens we can render into a Form, which can be used to populate a Woden/Roassal texture or transferred directly to OpenGL. This has the advantage of not having a explicit dependency in Cairo. I guess that I will make a demo of this later. It should be easy.
I think that a longer term approach could be having a custom renderer, tailored for Athens using OpenGL or maybe OpenCL.
2D vector graphics are really hard. In my opinion they are harder than 3d graphics because of concave self intersecting paths. Stroking a path can be really hard because of thins such as tapering.
The 3D hardware is designed to draw efficiently points, lines and triangles. All of them are simple convex polygon. Most of the 2D vector engines such as Cairo are software renderer, scanliners to be more specific. The old cairo opengl backend had to tessellate the paths
Later I am going to take a better look in Jun. And see how I can integrate with Woden/Woden-Roassal. For what I have seen in the videos, it seems to be using software rendering. Currently I have been working in my internship about volumetric data visualization and the new FFI.
2014-12-30 11:01 GMT-03:00 kilon alios <kilon.alios@gmail.com>:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
On Tue, Dec 30, 2014 at 12:10 AM, stepharo <stepharo@free.fr> wrote: Sven
Jun is a 3D frameworks developed in 1998 in VisualWorks http://aokilab.kyoto-su.ac.jp/jun/index.html It was quite advanced and this is nice to get more people doing 3d in Pharo. They are using the back -end developed by ronie and JB and this is cool
Athens is just a canvas and a oo decomposition of the canvas, brush and strokes nothing related to 3D. Stef
Le 29/12/14 20:20, Sven Van Caekenberghe a écrit :
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be It certainly looks nice, but what is Jun exactly ?
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Le 30/12/14 20:18, Ronie Salgado a écrit :
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
I do not think that is going to work easily with the best performance possible. Cairo could be using OpenGL, but probably in a different OpenGL than the one that is being used for 3d graphics.
In addition, the Cairo OpenGL backend is experimental (http://cairographics.org/OpenGL/) . Currently you have to render into a surface in CPU, then transfer it into GPU and then render the polygon. A naive version using the OpenGL backend is going to have GPU->CPU->GPU roundtrip
If we are using this route, I think that is better to just use the current version of Athens for this. With Athens we can render into a Form, which can be used to populate a Woden/Roassal texture or transferred directly to OpenGL. This has the advantage of not having a explicit dependency in Cairo. I guess that I will make a demo of this later. It should be easy.
I think that a longer term approach could be having a custom renderer, tailored for Athens using OpenGL or maybe OpenCL.
this would be nice :)
2D vector graphics are really hard. In my opinion they are harder than 3d graphics because of concave self intersecting paths. Stroking a path can be really hard because of thins such as tapering.
The 3D hardware is designed to draw efficiently points, lines and triangles. All of them are simple convex polygon. Most of the 2D vector engines such as Cairo are software renderer, scanliners to be more specific. The old cairo opengl backend had to tessellate the paths
Later I am going to take a better look in Jun. And see how I can integrate with Woden/Woden-Roassal. For what I have seen in the videos, it seems to be using software rendering. Currently I have been working in my internship about volumetric data visualization and the new FFI.
2014-12-30 11:01 GMT-03:00 kilon alios <kilon.alios@gmail.com <mailto:kilon.alios@gmail.com>>:
Athens uses Cairo , Cairo can be used with OpenGL. You can use Cairo to apply a 2d vector graphic as a texture to a 3d polygon. Cairo website shows several examples of this. That means its possible to have 2d vector graphics in 3d space as if its true 3d.
On Tue, Dec 30, 2014 at 12:10 AM, stepharo <stepharo@free.fr <mailto:stepharo@free.fr>> wrote:
Sven
Jun is a 3D frameworks developed in 1998 in VisualWorks http://aokilab.kyoto-su.ac.jp/jun/index.html It was quite advanced and this is nice to get more people doing 3d in Pharo. They are using the back -end developed by ronie and JB and this is cool
Athens is just a canvas and a oo decomposition of the canvas, brush and strokes nothing related to 3D. Stef
Le 29/12/14 20:20, Sven Van Caekenberghe a écrit :
On 29 Dec 2014, at 15:36, stepharo <stepharo@free.fr <mailto:stepharo@free.fr>> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be
It certainly looks nice, but what is Jun exactly ?
Later I am going to take a better look in Jun. And see how I can integrate with Woden/Woden-Roassal. For what I have seen in the videos, it seems to be using software rendering. Currently I have been working in my internship about volumetric data visualization and the new FFI. Let us know your progress. From March I hope to get somebody to help you on FFI or before once SPur is out of the door.
stef
Hi Steph, I originally used Jun to build CodeCity on top of it, in VW at the time.The main disadvantage I experienced back then was lack of support for hardware acceleration (which made it quite slow). Plus, the developers were Japanese and it was not clear where the product was heading next. The positive side was that Jun provided a pretty solid API which would allow to use OpenGL without the need to go very low-level and tons of examples. Plus, it was pretty much the only OpenGL implementation in VisualWorks for a long time. Cheers Ricky â Sent from Mailbox On Mon, Dec 29, 2014 at 3:36 PM, stepharo <stepharo@free.fr> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be
Le 29/12/14 21:17, Richard Wettel a écrit :
Hi Steph,
I originally used Jun to build CodeCity on top of it, in VW at the time.
I know :) Some of the class blueprints were JUN classes that I was inspecting.
The main disadvantage I experienced back then was lack of support for hardware acceleration (which made it quite slow). Plus, the developers were Japanese and it was not clear where the product was heading next. This is not a product but an experimental platforms. Still this is good to have people experimenting with Pharo and now we have accelerated hd support so this is cool.
The positive side was that Jun provided a pretty solid API which would allow to use OpenGL without the need to go very low-level and tons of examples. Plus, it was pretty much the only OpenGL implementation in VisualWorks for a long time.
Cheers Ricky
â Sent from Mailbox <https://www.dropbox.com/mailbox>
On Mon, Dec 29, 2014 at 3:36 PM, stepharo <stepharo@free.fr <mailto:stepharo@free.fr>> wrote:
https://www.youtube.com/watch?v=sH_P5otiWJM&feature=youtu.be
participants (8)
-
Alain Plantec -
Alexandre Bergel -
kilon alios -
Richard Wettel -
Ronie Salgado -
S Krish -
stepharo -
Sven Van Caekenberghe