textures or shader _i'm not quite sure
I have come to a dead end in my understanding – which isn’t to much of a stretch since I’m relatively new but I was hoping someone could point me in the right direction.
Essentially I’m trying to create a glow/soft bright light or halo type effect for a 3d object. But I’m confused as to whether the answer to this lies in the glsl Shader or the objects texture. Or more likely – a combination of both.
I have read with great interest vade’s and andrews post on opengl shaders but can’t quite see if they are actually the answer to my question.
I also came across a great combination shader that created a bloom type effect and rendered it to a video plane via jit.gl.slab. I attempted to use this texture as the texture for a 3d object – which worked but didn’t have any of the luster of the 2d / video plane version.
I’m not sure whether this is because of lighting or other environmental settings – or because a texture is never going to be a source of luminescent values.
Another thought was, alpha values might help in this regard – but again I wasn’t sure which part of the chain to apply this too.
I hope this makes some sense – and any help is much appreciated.
see if this helps clarify. post back some questions if it doesn’t.
----------begin_max5_patcher---------- 2909.3oc6bs0iihiE94p9UXEsOrqTpLXy8QiVUyJsutOrSq8ktGUxAbRb2Db Fvo5plQy+8w2nBj.DBPnRup6VUHFHvwemK9bN9X+G2e2rkrWH4y.+H3if6t6 Ot+t6TmRdh6Lsua1V7KQI3b0sMKhscKIkOat9ZbxKb04oq.ux1CVS3.LX49z nM.1J.IKikkOGvydEjQdflR4TbB82ooqA7Mzbf72uOiT73RnojH19T0yDYNY 59sr87DBWQAVlythkxyo+NQdNn0hhSSiUjCa4me.5Oqz8lh2pt2Y+ORVLNEW bscXdzFA87TFIhqQBaO4yC.g5Ct9xC1vEVfe8.IQSKnHn7b+482K+XdGgwTx WEj3InXLIA+pn6XYMq1NOr8Nu9N4utin6HyVhSWO6MptD13zWrwAo.EGe0AO OEBEVBZ1PiiIokI1JfEpGfUSxb+zCO.9OLN4GAeXCAvRSdUJToDsvbfP5BGw 2iSDmdIQd5XZ9NA9RhAbl3dHfuRSiYeUdmxVOSiILwMjdcDGc75q3XfBqQZw Qji63KNxYqWmPZWl6DgKpDWpS1xosNCpRm4sOGu9xVRdNdM4DoERJdYBA72f iipU8ccTe4wFjvVqVoM732DrL1JQ+WRZLIC7AF3CZ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5TG4BQ8o.bc7uRfqw19ofqnwed+eA.5vQEE -----------end_max5_patcher-----------
Thats really perfect, thanks exactly what I was talking about.
Its brought up some really interesting questions for me though. I’m quite confused!!
I’m intrigued as to how you can have a 3d scene within a video plane – I thought it was a 2d concept.
So is the texture you are sending to the bloom computation the 3d sketch created elsewhere in the page? I notice the similar name ‘cap’ on their attributes but I am unfamiliar with the @capture attribute associated with jit.gl.sketch object. Speaking I couldn’t find reference to the attribute in the help file, the jit.gl.sketch reference page, or the ob3d reference page. Is there a reference somewhere else?
Finally, I was getting a lot of errors originally when I loaded the patch. This was fixed when I enabled the videoplane before firing up the patch. Any idea as to why this occured?
Thanks again for the example , This incapsulation sort of thing must enable an incredible amount of possibilities.
> I’m intrigued as to how you can have a 3d scene within a video plane – I thought it was a 2d concept.
this is the "Render To Texture" or "RTT" concept. google is your homeboy.
> So is the texture you are sending to the bloom computation the 3d sketch created elsewhere in the page? I notice the similar name ‘cap’ on their attributes but I am unfamiliar with the @capture attribute associated with jit.gl.sketch object. Speaking I couldn’t find reference to the attribute in the help file, the jit.gl.sketch reference page, or the ob3d reference page. Is there a reference somewhere else?
oddly enough, it looks like capture is not in the reference page. don’t know why that is. basically you give a 3D gl object’s capture attribute a named texture to render itself to. the 3d obj then no longer renders to the window, but instead render’s to the texture object. search the forum for "capture" and "texture". also study andrew benson’s jitter recipes.
> Finally, I was getting a lot of errors originally when I loaded the patch. This was fixed when I enabled the videoplane before firing up the patch. Any idea as to why this occured?
yeah, that’s what i was trying to comment about in the patch. hopefully some of these texture initialization issues will get resolved in a future update.
also note, there is another tricky thing going on in that patch. the gridshapes are not drawing themselves at all (either to the window or to the texture). instead they are named, and then the gl.sketch object draws them with the "drawobject" command.
thanks again Rob, lots to be looking into. nice
Someone tryed to apply this shader to a 3d object with jit.gl.model? I´m trying to apply some "glow" effect to a .obj with no success… any ideas?
Wow, so fast¡
Thank you Wesley, that´s the other patch i´ve trying; it works perfectly, but I need the object to be rendered with jit.artkmulti of Andrew Roth; but the object just dissapears when I create the object jit.gl.node, I´m trying to deal with it..