Hey all
A patch of mine with only a few geos that was developed with last release of Gem 0.93.3 looks totally messed up with current master. It turns out that [ortho] is the culprit.
It appears that [ortho] used to screw with aspect ratio as it forces both, window width and window height, to be 4 units. A [ortho]- [rectangle 4 4] exactly fits into the window, even if the window is rectangle, for instance 960x540px. That's what my patch took into account.
Now, with current master, [ortho] doesn't mess with aspect ratio anymore, but when using [ortho], I can display a geo only within a square part of the gem window. When I moved it out that area, it gets blacked out.
I can somehow understand that [ortho] was buggy in the last release and needed to be changed, but is the current behaviour the desired behavior?
Roman
hello, yes, the ortho was buggy and fixed. But the old behaviours is still possible if you send a "compat" message. See help file. cheers c
Le 09/09/2017 à 00:59, Roman Haefeli a écrit :
Hey all
A patch of mine with only a few geos that was developed with last release of Gem 0.93.3 looks totally messed up with current master. It turns out that [ortho] is the culprit.
It appears that [ortho] used to screw with aspect ratio as it forces both, window width and window height, to be 4 units. A [ortho]- [rectangle 4 4] exactly fits into the window, even if the window is rectangle, for instance 960x540px. That's what my patch took into account.
Now, with current master, [ortho] doesn't mess with aspect ratio anymore, but when using [ortho], I can display a geo only within a square part of the gem window. When I moved it out that area, it gets blacked out.
I can somehow understand that [ortho] was buggy in the last release and needed to be changed, but is the current behaviour the desired behavior?
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On Sam, 2017-09-09 at 12:37 +0200, cyrille henry wrote:
hello, yes, the ortho was buggy and fixed. But the old behaviours is still possible if you send a "compat" message. See help file.
I see, thanks. I should have checked the help file in the first place.
But how can someone use the full window area with the new default mode? Why is there a limit?
Roman
Le 09/09/2017 à 00:59, Roman Haefeli a écrit :
Hey all
A patch of mine with only a few geos that was developed with last release of Gem 0.93.3 looks totally messed up with current master. It turns out that [ortho] is the culprit.
It appears that [ortho] used to screw with aspect ratio as it forces both, window width and window height, to be 4 units. A [ortho]- [rectangle 4 4] exactly fits into the window, even if the window is rectangle, for instance 960x540px. That's what my patch took into account.
Now, with current master, [ortho] doesn't mess with aspect ratio anymore, but when using [ortho], I can display a geo only within a square part of the gem window. When I moved it out that area, it gets blacked out.
I can somehow understand that [ortho] was buggy in the last release and needed to be changed, but is the current behaviour the desired behavior?
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/l istinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/lis tinfo/pd-list
For info : it seems that [gemwin] (as abstraction with a recent Gem from git) doesn't manage glOrtho but only glFrustum, so you won't be able to use [ortho] with a recent Gem (or i missed something ?). ++
Jack
Le 09/09/2017 à 12:44, Roman Haefeli a écrit :
On Sam, 2017-09-09 at 12:37 +0200, cyrille henry wrote:
hello, yes, the ortho was buggy and fixed. But the old behaviours is still possible if you send a "compat" message. See help file.
I see, thanks. I should have checked the help file in the first place.
But how can someone use the full window area with the new default mode? Why is there a limit?
Roman
Le 09/09/2017 à 00:59, Roman Haefeli a écrit :
Hey all
A patch of mine with only a few geos that was developed with last release of Gem 0.93.3 looks totally messed up with current master. It turns out that [ortho] is the culprit.
It appears that [ortho] used to screw with aspect ratio as it forces both, window width and window height, to be 4 units. A [ortho]- [rectangle 4 4] exactly fits into the window, even if the window is rectangle, for instance 960x540px. That's what my patch took into account.
Now, with current master, [ortho] doesn't mess with aspect ratio anymore, but when using [ortho], I can display a geo only within a square part of the gem window. When I moved it out that area, it gets blacked out.
I can somehow understand that [ortho] was buggy in the last release and needed to be changed, but is the current behaviour the desired behavior?
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/l istinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/lis tinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
the gemwin object, or abstraction did not have any ortho message. ortho is an object that you put in the gemchain.
i.e. there is no change in recent Gem.
cheers c
Le 09/09/2017 à 14:14, Jack a écrit :
For info : it seems that [gemwin] (as abstraction with a recent Gem from git) doesn't manage glOrtho but only glFrustum, so you won't be able to use [ortho] with a recent Gem (or i missed something ?). ++
Jack
Le 09/09/2017 à 12:44, Roman Haefeli a écrit :
On Sam, 2017-09-09 at 12:37 +0200, cyrille henry wrote:
hello, yes, the ortho was buggy and fixed. But the old behaviours is still possible if you send a "compat" message. See help file.
I see, thanks. I should have checked the help file in the first place.
But how can someone use the full window area with the new default mode? Why is there a limit?
Roman
Le 09/09/2017 à 00:59, Roman Haefeli a écrit :
Hey all
A patch of mine with only a few geos that was developed with last release of Gem 0.93.3 looks totally messed up with current master. It turns out that [ortho] is the culprit.
It appears that [ortho] used to screw with aspect ratio as it forces both, window width and window height, to be 4 units. A [ortho]- [rectangle 4 4] exactly fits into the window, even if the window is rectangle, for instance 960x540px. That's what my patch took into account.
Now, with current master, [ortho] doesn't mess with aspect ratio anymore, but when using [ortho], I can display a geo only within a square part of the gem window. When I moved it out that area, it gets blacked out.
I can somehow understand that [ortho] was buggy in the last release and needed to be changed, but is the current behaviour the desired behavior?
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/l istinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/lis tinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
So, i missed something here :)
I thought [ortho] changed the behavior of [gemwin] to replace 'glFrustum' with 'glOrtho' by sending an 'internal' message. But, i was wrong because i forgot [ortho] is on its own gemchain.
However, it would be quite easy, now [gemwin] is an abstraction, to switch between frustum to ortho for the whole scene by sending, for example, a message 'ortho -1 1 -1 1 1 20' to [gemwin] (Yes, you can do it easily by adding one [ortho] but only if you have one [gemhead] controling all your objects (geos)). A bad idea ? ++
Jack
Le 09/09/2017 à 18:52, cyrille henry a écrit :
the gemwin object, or abstraction did not have any ortho message. ortho is an object that you put in the gemchain.
i.e. there is no change in recent Gem.
cheers c
Le 09/09/2017 à 14:14, Jack a écrit :
For info : it seems that [gemwin] (as abstraction with a recent Gem from git) doesn't manage glOrtho but only glFrustum, so you won't be able to use [ortho] with a recent Gem (or i missed something ?). ++
Jack
Le 09/09/2017 à 12:44, Roman Haefeli a écrit :
On Sam, 2017-09-09 at 12:37 +0200, cyrille henry wrote:
hello, yes, the ortho was buggy and fixed. But the old behaviours is still possible if you send a "compat" message. See help file.
I see, thanks. I should have checked the help file in the first place.
But how can someone use the full window area with the new default mode? Why is there a limit?
Roman
Le 09/09/2017 à 00:59, Roman Haefeli a écrit :
Hey all
A patch of mine with only a few geos that was developed with last release of Gem 0.93.3 looks totally messed up with current master. It turns out that [ortho] is the culprit.
It appears that [ortho] used to screw with aspect ratio as it forces both, window width and window height, to be 4 units. A [ortho]- [rectangle 4 4] exactly fits into the window, even if the window is rectangle, for instance 960x540px. That's what my patch took into account.
Now, with current master, [ortho] doesn't mess with aspect ratio anymore, but when using [ortho], I can display a geo only within a square part of the gem window. When I moved it out that area, it gets blacked out.
I can somehow understand that [ortho] was buggy in the last release and needed to be changed, but is the current behaviour the desired behavior?
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/l istinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/lis tinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Le 09/09/2017 à 12:44, Roman Haefeli a écrit :
On Sam, 2017-09-09 at 12:37 +0200, cyrille henry wrote:
hello, yes, the ortho was buggy and fixed. But the old behaviours is still possible if you send a "compat" message. See help file.
I see, thanks. I should have checked the help file in the first place.
But how can someone use the full window area with the new default mode?
changing the windows perspective!!! (using the perspec message to gemwin, see help file)
Why is there a limit?
what limit?
"ortho" change the way object appear smaller far away. It also use to change the perspective and was in conflict with the gemwin "perspec" message. the conflict have been removed.
cheers c
Roman
Le 09/09/2017 à 00:59, Roman Haefeli a écrit :
Hey all
A patch of mine with only a few geos that was developed with last release of Gem 0.93.3 looks totally messed up with current master. It turns out that [ortho] is the culprit.
It appears that [ortho] used to screw with aspect ratio as it forces both, window width and window height, to be 4 units. A [ortho]- [rectangle 4 4] exactly fits into the window, even if the window is rectangle, for instance 960x540px. That's what my patch took into account.
Now, with current master, [ortho] doesn't mess with aspect ratio anymore, but when using [ortho], I can display a geo only within a square part of the gem window. When I moved it out that area, it gets blacked out.
I can somehow understand that [ortho] was buggy in the last release and needed to be changed, but is the current behaviour the desired behavior?
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/l istinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/lis tinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On Sam, 2017-09-09 at 18:50 +0200, cyrille henry wrote:
Le 09/09/2017 à 12:44, Roman Haefeli a écrit :
On Sam, 2017-09-09 at 12:37 +0200, cyrille henry wrote:
hello, yes, the ortho was buggy and fixed. But the old behaviours is still possible if you send a "compat" message. See help file.
I see, thanks. I should have checked the help file in the first place.
But how can someone use the full window area with the new default mode?
changing the windows perspective!!! (using the perspec message to gemwin, see help file)
Sorry, I don't understand. Maybe I simply don't understand which question this answers.
Why is there a limit?
what limit?
What I am experiencing when using [ortho] is that only the lower left 500x500 pixels of the gemwin can be used for rendering. Also, the center seems to be in the middle of this 500x500px area. This is with current master (cc0d464a) on Ubuntu 16.04 with a Intel graphics. Please check this screen recording:
http://netpd.org/~roman/ramsch/ortho_limit.mkv
"ortho" change the way object appear smaller far away.
This I understand. All parallel lines appear parallel in orthographic projection.
It also use to change the perspective and was in conflict with the gemwin "perspec" message.
This I don't understand.
the conflict have been removed.
I'm a bit confused whether I hit a bug or if there is some big misunderstanding on my part. Can you check the above video and tell me if you get the same?
BTW: the 'compat' method does not work for me. No matter whether I send 'compat 0' or 'compat 1', the rendered output looks exactly the same.
Roman
hello,
Le 10/09/2017 à 22:34, Roman Haefeli a écrit :
But how can someone use the full window area with the new default mode?
changing the windows perspective!!! (using the perspec message to gemwin, see help file)
Sorry, I don't understand. Maybe I simply don't understand which question this answers.
question : "But how can someone use the full window area with the new default mode?" answer : "changing the windows perspective!!!"
if you create a 200x100 windows, the perspective is set to 16 unit wide an 8 unit high you can change that to have 8x8 unit thanks to messages send to gemwin.
Why is there a limit?
what limit?
What I am experiencing when using [ortho] is that only the lower left 500x500 pixels of the gemwin can be used for rendering. Also, the center seems to be in the middle of this 500x500px area. This is with current master (cc0d464a) on Ubuntu 16.04 with a Intel graphics. Please check this screen recording:
yes, this is a bug with ortho
"ortho" change the way object appear smaller far away.
This I understand. All parallel lines appear parallel in orthographic projection.
It also use to change the perspective and was in conflict with the gemwin "perspec" message.
This I don't understand>
the conflict have been removed.
I'm a bit confused whether I hit a bug or if there is some big misunderstanding on my part. Can you check the above video and tell me if you get the same?
i get a problem when the Gem windows is resized.
BTW: the 'compat' method does not work for me. No matter whether I send 'compat 0' or 'compat 1', the rendered output looks exactly the same.
if you render only a rectangle or any flat primitive, then ortho should have no effect. did you try the help patch, or with a square?
I used a Gem version from few month ago. I don't thik there is any significant change since.
So, all in all :
One more thing : According my memory, I think the perspec message changed :
on a 200x100 windows, for a square to be rendered as a square, you use to send a perspec -2 2 -1 1 1 20 message. now it's perspec -1 1 -1 1 1 20, so in order to to render the square to the size of the windows, you have to know the window dimension. So in fact, it's easier to change the square size than the perspective... see attachment
cheers c
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On Son, 2017-09-10 at 23:33 +0200, cyrille henry wrote:
hello,
Le 10/09/2017 à 22:34, Roman Haefeli a écrit :
But how can someone use the full window area with the new default mode?
changing the windows perspective!!! (using the perspec message to gemwin, see help file)
Sorry, I don't understand. Maybe I simply don't understand which question this answers.
question : "But how can someone use the full window area with the new default mode?" answer : "changing the windows perspective!!!"
if you create a 200x100 windows, the perspective is set to 16 unit wide an 8 unit high you can change that to have 8x8 unit thanks to messages send to gemwin.
Ah, I see. The old [ortho] made gemwin width always 8 units (not 4 as I said before).
if you render only a rectangle or any flat primitive, then ortho should have no effect. did you try the help patch, or with a square?
I get that, I was using the [rectangle] example only to illustrate the invisible render window of 500x500px.
My initial task that got me into investigating changes in [ortho] is rendering a cylinder that fits exactly into a window of a given size. It was very easy to do in the last Gem release, but I don't seem able to do it with current Gem.
See attached patch (it is rendered as intended only in "old" Gem)
I used a Gem version from few month ago. I don't thik there is any significant change since.
So, all in all :
- if you want a square to be redered as a rectangle (to fit the
windows dimention), you have to change the perspective. (see gemwin help / [pd more viewing])
- ortho used to change the perspective, but that was a bug
- ortho does not have any effect on 2d object rendered at Z=0.
- ortho do have a new bug : it's perspective is not affected by a
windows resizing, so it consider the windows to be 500x500.
Thanks for clarifying.
Roman
Le 11/09/2017 à 00:10, Roman Haefeli a écrit :
My initial task that got me into investigating changes in [ortho] is rendering a cylinder that fits exactly into a window of a given size. It was very easy to do in the last Gem release, but I don't seem able to do it with current Gem.
See attached patch (it is rendered as intended only in "old" Gem)
yes, please fill a bug report.
cheers c
Here, your patch using what we said before as a workaround... if needed ! :) ++
Jack
Le 11/09/2017 à 00:10, Roman Haefeli a écrit :
On Son, 2017-09-10 at 23:33 +0200, cyrille henry wrote:
hello,
Le 10/09/2017 à 22:34, Roman Haefeli a écrit :
But how can someone use the full window area with the new default mode?
changing the windows perspective!!! (using the perspec message to gemwin, see help file)
Sorry, I don't understand. Maybe I simply don't understand which question this answers.
question : "But how can someone use the full window area with the new default mode?" answer : "changing the windows perspective!!!"
if you create a 200x100 windows, the perspective is set to 16 unit wide an 8 unit high you can change that to have 8x8 unit thanks to messages send to gemwin.
Ah, I see. The old [ortho] made gemwin width always 8 units (not 4 as I said before).
if you render only a rectangle or any flat primitive, then ortho should have no effect. did you try the help patch, or with a square?
I get that, I was using the [rectangle] example only to illustrate the invisible render window of 500x500px.
My initial task that got me into investigating changes in [ortho] is rendering a cylinder that fits exactly into a window of a given size. It was very easy to do in the last Gem release, but I don't seem able to do it with current Gem.
See attached patch (it is rendered as intended only in "old" Gem)
I used a Gem version from few month ago. I don't thik there is any significant change since.
So, all in all :
- if you want a square to be redered as a rectangle (to fit the
windows dimention), you have to change the perspective. (see gemwin help / [pd more viewing])
- ortho used to change the perspective, but that was a bug
- ortho does not have any effect on 2d object rendered at Z=0.
- ortho do have a new bug : it's perspective is not affected by a
windows resizing, so it consider the windows to be 500x500.
Thanks for clarifying.
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Just don't forget [GEMglMatrixMode GL_MODELVIEW] after [GEMglOrtho -1 1 -1 1 1 20] to manipulate transformations on model (geos) (and view). ++
Jack
Le 11/09/2017 à 00:32, Roman Haefeli a écrit :
On Mon, 2017-09-11 at 00:24 +0200, Jack wrote:
Here, your patch using what we said before as a workaround... if needed ! :)
You were faster than me :-) Yes, this is what I meant to do. Thanks for clarifying.
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Hello Roman,
Le 10/09/2017 à 22:34, Roman Haefeli a écrit :
On Sam, 2017-09-09 at 18:50 +0200, cyrille henry wrote:
Le 09/09/2017 à 12:44, Roman Haefeli a écrit :
On Sam, 2017-09-09 at 12:37 +0200, cyrille henry wrote:
hello, yes, the ortho was buggy and fixed. But the old behaviours is still possible if you send a "compat" message. See help file.
I see, thanks. I should have checked the help file in the first place.
But how can someone use the full window area with the new default mode?
changing the windows perspective!!! (using the perspec message to gemwin, see help file)
Sorry, I don't understand. Maybe I simply don't understand which question this answers.
I guess Cyrille want to say that you can manage the clipping of ortho with the message 'perspec'. 'perspec' seems to work for the frustum (with perspective) and ortho (orthographic mode). I can't test here because, like you in your video, [ortho] not work properly on my system with a recent Gem (ver: 0.93.git 10759c2). Using [ortho] on a square in the center of my gemwin, move this square elsewhere. I can also confirm that message 'compat' do nothing here.
However, you can simulate [ortho] if you need it now with :
[GEMglMatrixMode GL_PROJECTION] | [GEMglLoadIdentity] | [GEMglOrtho -1 1 -1 1 1 20]
With these objects, you reset the projection and use orthographic projection for your geo. -1 1 -1 1 1 20 are the clipping volume in ortho mode.
Don't forget to use just after your geo (if you want your perspective come back) :
[GEMglMatrixMode GL_PROJECTION] | [GEMglLoadIdentity] | [GEMglFrustum -1 1 -1 1 1 20]
Hope it helps. ++
Jack
Why is there a limit?
what limit?
What I am experiencing when using [ortho] is that only the lower left 500x500 pixels of the gemwin can be used for rendering. Also, the center seems to be in the middle of this 500x500px area. This is with current master (cc0d464a) on Ubuntu 16.04 with a Intel graphics. Please check this screen recording:
http://netpd.org/~roman/ramsch/ortho_limit.mkv
"ortho" change the way objawayect appear smaller far away.
This I understand. All parallel lines appear parallel in orthographic projection.
It also use to change the perspective and was in conflict with the gemwin "perspec" message.
This I don't understand.
the conflict have been removed.
I'm a bit confused whether I hit a bug or if there is some big misunderstanding on my part. Can you check the above video and tell me if you get the same?
BTW: the 'compat' method does not work for me. No matter whether I send 'compat 0' or 'compat 1', the rendered output looks exactly the same.
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Le 10/09/2017 à 23:34, Jack a écrit : ...
Don't forget to use just after your geo (if you want your perspective come back) :
[GEMglMatrixMode GL_PROJECTION] | [GEMglLoadIdentity] | [GEMglFrustum -1 1 -1 1 1 20]
this will only work for square windows : unlike the perspec message, frustrum is not affected by the gemwin dimension.
My last patch can be simplified thanks to this message. see attachment (change the windows dimension)
cheers c
Le 10/09/2017 à 23:50, cyrille henry a écrit :
Le 10/09/2017 à 23:34, Jack a écrit : ...
Don't forget to use just after your geo (if you want your perspective come back) :
[GEMglMatrixMode GL_PROJECTION] | [GEMglLoadIdentity] | [GEMglFrustum -1 1 -1 1 1 20]
this will only work for square windows : unlike the perspec message, frustrum is not affected by the gemwin dimension.
Yes, you need [GEMglFrustum -dimenX/dimenY dimenX/dimenY -1 1 1 20].
My last patch can be simplified thanks to this message. see attachment (change the windows dimension)
Yep, we get a rectangle. ++
Jack
cheers c
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On Son, 2017-09-10 at 23:34 +0200, Jack wrote:
However, you can simulate [ortho] if you need it now with :
[GEMglMatrixMode GL_PROJECTION]
[GEMglLoadIdentity]
[GEMglOrtho -1 1 -1 1 1 20]
With these objects, you reset the projection and use orthographic projection for your geo. -1 1 -1 1 1 20 are the clipping volume in ortho mode.
Cool. It works for both, old and current Gem. See attached patch. It illustrates, what I initially wanted to achieve.
Thanks to you and to Cyrille for your patience.
Roman