can you achieve transparency in 3D environment?
hello, i am a first year digital media student and have just introduced myself to max/MSP. i am working on project right now for my uni assignment and i am trying to create chromakeyed plane in 3D space with 3D cubes spinning around it. i have tried so many things and still it doesn’t work as needed and i really need some help and professional advice.
achieve this sort of effect in max/MSP
+ use live green screen video feed
+import it in scene with 3D elements around it
+track the movement of person from live feed and apply these values to trigger 3D elements.
i managed to apply live feed onto a plane as a live texture and import it in 3D space along with the cubes
i also managed to sort out tracking and applying in on movement of 3D cubes
every time i was doing chromakeying the keyed areas appeared as black on my 3D plane. i have to get rid of those black areas and make them transparent. i don’t know how to achieve that!
the only problem i am facing is getting my videoplane transparent in 3-d space.
i have explained the process and supported it with patches i was working on in my blog here:
i am very confused and apparently there isn’t a teacher in my department who can help me to sort my problem. i have read many forums and tutorials, maybe i am looking in wrong direction, please open my eyes!
–i need to know how to achieve transparency on 3-d plane and apply transparency on green areas.
i might be doing wrong thing by chromakeying it, all i want to achieve is just body appearing in that plane without black areas which are keyed.
well, sounds like you have two problems to sort out.
the first is to enable alpha based transparency on a textured 3d gl object.
this can be achieved by first ensuring that you are actually sending a matrix with a proper alpha channel to your videoplane, and then setting @blend_enable 1 and @depth_enable 0 on your videoplane.
the second, more difficult problem, results from the fact that you need to turn off depth_enable in order to properly display transparency. therefore you can’t rely on automatic depth sorting and you have to handle it yourself.
one way to do this is with gl objects @layer attribute.
here is a very simplistic example, but should get you started.
you use the z value of the circling gl object to change it’s layer attribute. this assumes the videoplane is at a z value of 0, and that the camera is in it’s default position and default lookat.
you could encapsulate the circling object code in a poly~ and have several of these going simultaneously.
----------begin_max5_patcher---------- 2071.3oc6alsbaaCE.8Y6uBNZxCscrUH.H3RalNt+D8k1NYnHgkXBEgBIkic xj+8hMISaKBBQAAyzz3XyEIacuGb2.tfe8xKlsfdOoYl2u58WdWbwWu7hKD2 heiKTWewr0o2mUl1HdayxnqWSpZmck70ZI22Jt+6t9Zuu3cWZ4VxtWqZ65hp RRq3WD73Moaa2cWe0c2j1lspnZ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LO6xTfIxD1sxDxDYJvswmLQl3O4LNTlB MZryswLCMIlYHzsxjI9cgtMN9yPPOxDZBJSt0ui+3bO0xsXjemPvQtSlPlJS fIleWnSG6Pmi5Lg9w7ZyCfxUPWV2t3pSUZiNGRKN7LIsgmAoEIm2yYPZwmCo MJ37HsffymcqpcdJoUbkKpVB61Jcwl3Kgc6LB.l3w.ba02.S7K.tsxDfI1S. 2VYBzDORjasmPlr5.H2VoKzDYJ3HswQHYjUD+mP79KNUY0D6LjasyPFYm41X oPSlo.xswHPFM141pMg.SjI2NaXjQic3oWLBnaWcESF5bKkLJPfaskLYXysV RlTnfasi7MQjbrLYhwsaKSf+oAGZsLctD4O4jng5oQnykHz.RzoTBL6huc4+ Bo7e8b. -----------end_max5_patcher-----------
thank You for replying and directions, i will get straight on this one, thanks a million!
thanks to your explanation and example patch i am nearly there, bit more tweaking and i should be sorted. i will post my final crit results here, thank you soo much, i do appreciate your help>>>>
Forums > Jitter