Re: [PD] transparency in models
On Fri, 2008-04-04 at 22:42 -0400, marius schebella wrote: Hi, I want to apply colors (or textures) with alpha values to obj. models and then turn them around, but I am having problems if I rotate the objects. this actually causes problems with standard geos, too... I searched the archives for that problem but I found no real answer. maybe because there is none? iirc, it was discussed before (otherwise i wouldn't be able to write you a reply). from what i understand, alpha rendering depends on rendering order. first, the textures most behind need to be rendered in order to get transparency for textures more in front. what is necessary to get transparency working from all different viewpoints? i don't know if there is a general solution. would be interested as well. I tried to play around with GEMglDepthFunc and other stuff, but not with the correct result. (correct maybe, but not what I wanted.) any help? thanks, i don't know about [GEMglDepthFunc], but a not very realistic approach could be to split a model into its planes and change the rendering order of the planes dynamically, so that most-behind planes are rendered first and most-in-front planes rendered last. calculating the correct rendering order needs a lot of math and i don't quit know how to do it. roman ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] transparency in models
hi H, list in my experience the proper order of objects is gemhead I pix_image I alpha 1 I colorRGB I pix_texture I model you can then play with the last inlet of [colorRGB] to fade in/out geos/models. Correct me if im wrong - [alpha 1] should be before [pix_texture] in the chain to be rendered correctly. here are two of my patches using a lot of transparency tricks, hope this helps www.njeremic.ecobytes.net/files/vj-live1.zip www.njeremic.ecobytes.net/files/baum_pd_patch.zip greetings n. Roman Haefeli wrote: On Fri, 2008-04-04 at 22:42 -0400, marius schebella wrote: Hi, I want to apply colors (or textures) with alpha values to obj. models and then turn them around, but I am having problems if I rotate the objects. this actually causes problems with standard geos, too... I searched the archives for that problem but I found no real answer. maybe because there is none? iirc, it was discussed before (otherwise i wouldn't be able to write you a reply). from what i understand, alpha rendering depends on rendering order. first, the textures most behind need to be rendered in order to get transparency for textures more in front. what is necessary to get transparency working from all different viewpoints? i don't know if there is a general solution. would be interested as well. I tried to play around with GEMglDepthFunc and other stuff, but not with the correct result. (correct maybe, but not what I wanted.) any help? thanks, i don't know about [GEMglDepthFunc], but a not very realistic approach could be to split a model into its planes and change the rendering order of the planes dynamically, so that most-behind planes are rendered first and most-in-front planes rendered last. calculating the correct rendering order needs a lot of math and i don't quit know how to do it. roman ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] transparency in models
hello, for what i know, this is a openGL limitation, with no generic hardware solution. cyrille marius schebella a écrit : Hi, I want to apply colors (or textures) with alpha values to obj. models and then turn them around, but I am having problems if I rotate the objects. this actually causes problems with standard geos, too... I searched the archives for that problem but I found no real answer. maybe because there is none? what is necessary to get transparency working from all different viewpoints? I tried to play around with GEMglDepthFunc and other stuff, but not with the correct result. (correct maybe, but not what I wanted.) any help? thanks, marius. ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] transparency in models
On Sat, 2008-04-05 at 12:47 +0200, niko wrote: www.njeremic.ecobytes.net/files/baum_pd_patch.zip hi again. i stumbled across a rendering of this one somewhere, can't recall where exactly. however, i just wanted to say, that i really enjoyed it. roman ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] transparency in models
On Sat, 2008-04-05 at 12:47 +0200, niko wrote: hi H, list in my experience the proper order of objects is as far as i understand marius, he doesn't have troubles with implementing transparency in general. the problem is rather, that if you have a cube for example and you apply a texture with transparency to it, it works well, but if you rotate the cube around 180°, transparency doesn't work anymore. or more correct: transparent parts of the plane in front don't show parts of the plane behind, but of the background (or whatever was rendered first _and_ is behind the front plane). sorry, if i repeat myself, but i have troubles finding a better explanation. roman gemhead I pix_image I alpha 1 I colorRGB I pix_texture I model you can then play with the last inlet of [colorRGB] to fade in/out geos/models. Correct me if im wrong - [alpha 1] should be before [pix_texture] in the chain to be rendered correctly. here are two of my patches using a lot of transparency tricks, hope this helps www.njeremic.ecobytes.net/files/vj-live1.zip www.njeremic.ecobytes.net/files/baum_pd_patch.zip greetings n. ___ Der fr�he Vogel f�ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] transparency in models
thanx i already posted it here before there is a videoof it http://www.njeremic.ecobytes.net/njeremic/videos/baum_net.mov greets. n. p.s. sorry for not understanding the original post question i also needed a long time to understand transparency in gem/openGL Roman Haefeli wrote: On Sat, 2008-04-05 at 12:47 +0200, niko wrote: www.njeremic.ecobytes.net/files/baum_pd_patch.zip hi again. i stumbled across a rendering of this one somewhere, can't recall where exactly. however, i just wanted to say, that i really enjoyed it. roman ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] transparency in models
but I have the impression that some program manage to solve that problem. I am not sure how, but if there is a solution, then it should also be possible to use it in gem. often I am not sure if people are talking about single objects or secenes. but afaik it has something to do with a z-buffer, like it would be possible to render the obj coordinates from the camera viewpoint into a special alpha channel/buffer and then use that information to define the renderorder for the texture. but not sure at all, if this is my fantasy or if that is really how it works. I know that shadows also se weird buffers and viewpoint manipulations to work. thanks roman, cyrille for your answers, I am aware of the discussions in the archive, maybe some more talk brings us further... marius. cyrille henry wrote: hello, for what i know, this is a openGL limitation, with no generic hardware solution. cyrille marius schebella a écrit : Hi, I want to apply colors (or textures) with alpha values to obj. models and then turn them around, but I am having problems if I rotate the objects. this actually causes problems with standard geos, too... I searched the archives for that problem but I found no real answer. maybe because there is none? what is necessary to get transparency working from all different viewpoints? I tried to play around with GEMglDepthFunc and other stuff, but not with the correct result. (correct maybe, but not what I wanted.) any help? thanks, marius. ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] transparency in models
Hello Roman, Marius, Niko and list ! Here a small patch for this problem. Sorry, i have not enough time for a patch with dynamic creation of geos. ++ Jack testorder1.pd Description: Binary data Le 5 avr. 08 à 13:06, Roman Haefeli a écrit : On Sat, 2008-04-05 at 12:47 +0200, niko wrote: hi H, list in my experience the proper order of objects is as far as i understand marius, he doesn't have troubles with implementing transparency in general. the problem is rather, that if you have a cube for example and you apply a texture with transparency to it, it works well, but if you rotate the cube around 180°, transparency doesn't work anymore. or more correct: transparent parts of the plane in front don't show parts of the plane behind, but of the background (or whatever was rendered first _and_ is behind the front plane). sorry, if i repeat myself, but i have troubles finding a better explanation. roman gemhead I pix_image I alpha 1 I colorRGB I pix_texture I model you can then play with the last inlet of [colorRGB] to fade in/out geos/models. Correct me if im wrong - [alpha 1] should be before [pix_texture] in the chain to be rendered correctly. here are two of my patches using a lot of transparency tricks, hope this helps www.njeremic.ecobytes.net/files/vj-live1.zip www.njeremic.ecobytes.net/files/baum_pd_patch.zip greetings n. ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/ listinfo/pd-list ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] transparency in models
In fact, it's not very good, because the position depends on the center of the geos. But it can be useful in certain case. ++ Jack Le 5 avr. 08 à 15:23, Jack a écrit : Hello Roman, Marius, Niko and list ! Here a small patch for this problem. Sorry, i have not enough time for a patch with dynamic creation of geos. ++ Jack testorder1.pd Le 5 avr. 08 à 13:06, Roman Haefeli a écrit : On Sat, 2008-04-05 at 12:47 +0200, niko wrote: hi H, list in my experience the proper order of objects is as far as i understand marius, he doesn't have troubles with implementing transparency in general. the problem is rather, that if you have a cube for example and you apply a texture with transparency to it, it works well, but if you rotate the cube around 180°, transparency doesn't work anymore. or more correct: transparent parts of the plane in front don't show parts of the plane behind, but of the background (or whatever was rendered first _and_ is behind the front plane). sorry, if i repeat myself, but i have troubles finding a better explanation. roman gemhead I pix_image I alpha 1 I colorRGB I pix_texture I model you can then play with the last inlet of [colorRGB] to fade in/out geos/models. Correct me if im wrong - [alpha 1] should be before [pix_texture] in the chain to be rendered correctly. here are two of my patches using a lot of transparency tricks, hope this helps www.njeremic.ecobytes.net/files/vj-live1.zip www.njeremic.ecobytes.net/files/baum_pd_patch.zip greetings n. ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/ listinfo/pd-list ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/ listinfo/pd-list ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] transparency in models
hmm, something in your patch is crashing my pd, the transparency is also not working correct, in some situations the render order is still wrong (when circles are rotated and the scene as a whole) and I also get flicker when the render order changes. plus, this still does not help me with wavefront models... but in theory something like changing the render order is the solution. marius. Jack wrote: Hello Roman, Marius, Niko and list ! Here a small patch for this problem. Sorry, i have not enough time for a patch with dynamic creation of geos. ++ Jack Le 5 avr. 08 à 13:06, Roman Haefeli a écrit : On Sat, 2008-04-05 at 12:47 +0200, niko wrote: hi H, list in my experience the proper order of objects is as far as i understand marius, he doesn't have troubles with implementing transparency in general. the problem is rather, that if you have a cube for example and you apply a texture with transparency to it, it works well, but if you rotate the cube around 180°, transparency doesn't work anymore. or more correct: transparent parts of the plane in front don't show parts of the plane behind, but of the background (or whatever was rendered first _and_ is behind the front plane). sorry, if i repeat myself, but i have troubles finding a better explanation. roman gemhead I pix_image I alpha 1 I colorRGB I pix_texture I model you can then play with the last inlet of [colorRGB] to fade in/out geos/models. Correct me if im wrong - [alpha 1] should be before [pix_texture] in the chain to be rendered correctly. here are two of my patches using a lot of transparency tricks, hope this helps www.njeremic.ecobytes.net/files/vj-live1.zip www.njeremic.ecobytes.net/files/baum_pd_patch.zip greetings n. ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] transparency in models
You want to sort by Z which requires special depth sorting code in the external. The model object uses a display list so you would have to stop using that and move to vertex arrays for decent performance. On Sat, Apr 5, 2008 at 7:21 AM, marius schebella [EMAIL PROTECTED] wrote: but I have the impression that some program manage to solve that problem. I am not sure how, but if there is a solution, then it should also be possible to use it in gem. often I am not sure if people are talking about single objects or secenes. but afaik it has something to do with a z-buffer, like it would be possible to render the obj coordinates from the camera viewpoint into a special alpha channel/buffer and then use that information to define the renderorder for the texture. but not sure at all, if this is my fantasy or if that is really how it works. I know that shadows also se weird buffers and viewpoint manipulations to work. thanks roman, cyrille for your answers, I am aware of the discussions in the archive, maybe some more talk brings us further... marius. cyrille henry wrote: hello, for what i know, this is a openGL limitation, with no generic hardware solution. cyrille marius schebella a écrit : Hi, I want to apply colors (or textures) with alpha values to obj. models and then turn them around, but I am having problems if I rotate the objects. this actually causes problems with standard geos, too... I searched the archives for that problem but I found no real answer. maybe because there is none? what is necessary to get transparency working from all different viewpoints? I tried to play around with GEMglDepthFunc and other stuff, but not with the correct result. (correct maybe, but not what I wanted.) any help? thanks, marius. ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] transparency in models
Hi, I want to apply colors (or textures) with alpha values to obj. models and then turn them around, but I am having problems if I rotate the objects. this actually causes problems with standard geos, too... I searched the archives for that problem but I found no real answer. maybe because there is none? what is necessary to get transparency working from all different viewpoints? I tried to play around with GEMglDepthFunc and other stuff, but not with the correct result. (correct maybe, but not what I wanted.) any help? thanks, marius. ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list