textures or shader _i'm not quite sure

timmy_b's icon

Hey,

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.

Cheers
Tim

Rob Ramirez's icon

see if this helps clarify. post back some questions if it doesn't.

Max Patch
Copy patch and select New From Clipboard in Max.

timmy_b's icon

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.

Rob Ramirez's icon

> 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.

Rob Ramirez's icon

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.

timmy_b's icon

thanks again Rob, lots to be looking into. nice

marta_verde's icon

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?
Thank you¡

Wesley Smith's icon

have a look at this forum post for an example of glow with Max6:
https://cycling74.com/forums/instantiating-jit-gl-lights-with-jit-gl-multiple

marta_verde's icon

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..