Forums > Jitter

Creating Real time shadows with Jitter – PAID assignment – Is it possible :)

April 8, 2014 | 1:25 am

Hi there,

I’m looking to use realtime shadows in Jitter, I don’t have enough experience with Shaders to implement the technique myself.
Touch designer is free and implements this in the software. I’d rather stick with Max/Jitter as I’ve made my own VJ program which only uses 3d models in realtime (no video).
I normally use two jit.gl.lights in my scene which can move around, and sometimes a touch of ambient light to brighten everything up.
The shadows need to be cast on the object itself and onto a basic plane.

Heres an example from the awesome guys at 1024

http://1024d.wordpress.com/2014/03/19/hadow/

and a better example

http://www.ozone3d.net/tutorials/glsl_lighting_phong.php

Ambient occlusion would be nice but not at all necessary.

Is this possible in Jitter ? Most models I use don’t have more than 600 faces.

This would be used to do realtime 3d mapping.
I wish Jitter would implement this as standard, though I do understand its not a simple thing to do, it just seems to be on the wish list for a good few years now.

Plus all tips are welcome ( I think I’ve exhausted the options on the forum)


April 13, 2014 | 6:37 am

bump !


April 13, 2014 | 12:53 pm

not sure, however I am thinking of various way to ray trace this, but I am not sure how to create a ray tracing in max…
not a big help but you could:

step 1 – given a view get the x y z of the surfaces visible in it

step 2 – trace a vector from x y z to the light source, for all points

step 3 – write 0 if light is occluded by something, 1 if not (intersection is void)

step 4 – create a mask for pixels with 0 and 1 as per step 3.

step 5 – multiply picture by mask

slow? probably so…


April 13, 2014 | 1:10 pm

Found something about points 1 – 3 in the lua information page… It may be a good start.

This is it:

function castray(x, y)
local raystart = jit.gl.screentoworld(x, y, 0)
local rayend = jit.gl.screentoworld(x, y, 1)
return raystart, ray end
end

I guess by using jit.gl.lua it is possible to achieve 1 – 3.
but I am not familiar with lua…
anybody else taking the challenge and willing to help?


April 13, 2014 | 3:47 pm

I had quite a bit of trouble with shadow casting in Jitter a few years back. Keeping everything in Max became more trouble than it was worth, and I ended up rendering models/shadows in Quartz Composer instead. Syphon might be your friend these days.

Taking a quick glance back at the forums, several people have also come up against this problem. Have you tried some of the suggestions in this thread?


April 22, 2014 | 6:02 am

Thanks for all the replies !!
Geotrupede, like I said my experience with shaders is complete noob level, I’ve only just started learning how to do the basics with 2d shaders. I don’t want to spend a few years learning how to do raytracing in Jitter, I only want to VJ and learn over time how to make my own 2d shaders, 3d raytracing is far too hardcore for me to learn.
It’s not that I don’t want to learn, I’m just very aware this is way beyond my abilities with Max and programming.
:(
I’m really happy with the VJ software I made,it’s custom built from the ground up and do’s exactly what I need.
Unity and Quartz composer do this in the simplest way, you just turn shadows on and then decide the quality.

This is why I’m willing to pay for somebody to make this, and pay them well, I understand these things take time to build.
I’d rather pay a few hundred euro to someone than spend the next 6 months learning how to do the same with Jitter in Touch designer or unity.
It’s not that I don’t want to learn, I’m just very aware this is way beyond my abilities with Max and programming.

People have been asking for this feature for years though, why isn’t it implemented into Jitter ?? Why is there no date for its release ?? If cycling 74 would just say we’re not gonna make this for the next 4 years then I at least know where I’m up to and can start studying software that will allow me to play with light and Shadows real time.


April 22, 2014 | 12:34 pm

I feel your pain, Andro.
I’ve said before in these forums that I would love if one day Jitter could offer things like depth of field, global illumination, shadows or motion blur in a more straightforward way (a checkbox in jit.gl.render properties?), like the majority of current game engines do nowadays. Of course, without negating users the possibility to build their own implementations, if they so desire.

You say that you don’t want to spend time learning how to do shadows in Jitter, which is completely understandable, given your intended use of Max/Jitter. But, to me, by the lack of implementation examples, the type of comments here on the forums, and the lack of "official" responses on the subject, I’m inclined to think that in the current Max/Jitter incarnation, it’s not really feasible at all.

In an older thread, Vade commented:

Personally, I think a better solution than some generic shadow implementation would be to allow for @capture to use multiple render targets, allowing for very strong deferred rendering support.

In that thread I asked a question that never got answered, so I take this opportunity to ask again:
Is it possible in the current incarnation of Max to implement a proper real-time shadow technique in Jitter? Has anyone done it? Are there any examples/videos? Or is the lack of multiple rendering targets withholding it?

I (and I’m sure many others) would like to be able to do this kind of images with Jitter (this was done with vvvv):

So, is it possible/feasible at all? It’s just a question of programming complexity or is Jitter really lacking some technical requirement/implementation that’s preventing it? I don’t want to learn all about OpenGL and GLSL only to realize that it’s not possible/feasible/practical to do it in Jitter.

Thanks in advance!


April 24, 2014 | 6:13 am

Hi Pedros ! Thanks for explaining things in even more depth. Cycyling 74 ? Rob Ramirez ?
Any short simple answer on the above ?


April 24, 2014 | 2:32 pm

hi guys, we’re working on some new Jitter features to make shadows and other effects easier to accomplish, but won’t be releasing any details or timeframe at this time. these new features include drawing to multiple-render-targets via jit.gl.node.

it certainly should be possible to render shadows using the existing tools available in 6.1, however it is not easy, or user-friendly.

i’ll try and throw together a basic example sometime in the near future.


April 25, 2014 | 11:27 am

yes yes *beat box* yeeeees yesssss yes yes yes !!!


April 25, 2014 | 11:59 am

Hi, Rob. Good to know that this is one of the areas you’re working on. I’ll be waiting for the Max version with MRT support (I guess in Max 7?)! Meanwhile, I think that one of your nice example patches would certainly be well received by the community ;-)
Thanks for the reply!
Pedro


April 28, 2014 | 6:12 am

Awesome Rob ! Could the example patch really have a very clear interface, I’d be more than happy with a basic primitive floating over a plane with one light to just get going.
And a couple of comment boxes would be a lifesaver ;-)


Viewing 12 posts - 1 through 12 (of 12 total)