Mapping 3d Objects.

Michele de Candia's icon

Hi.

I'd like to create a simple installation based on a 3d real object (a church portal) "mapped" with Jitter.
The important thing to do is not what I'll render in this surface, but how I'll render shapes based on a real 3d object survey and mapping.
I made this with vvvv in the past. There is an how to do: http://vvvv.org/tiki-index.php?page=How+To+Project+On+3D+Geometry
but we are interested to realize the same thing in Jitter.
How I can do this?

I'm on a Macbook Pro Intel.

Thank you.

jin's icon

I've seen several posts about keystone.
search for 'keystone'

But I haven't seen about fake shadow.
I'm very interested in achieving realtime fake shadow in jitter.

Michele de Candia's icon

Yes, I've seen. A keystone shader can be useful for my goal but I would like to see how Jitter manages 3d object and then lets to see an output on these surfaces.

Scott Fitzgerald's icon

A good starting point may be to look at HC Gilje's video projection tools

Michele de Candia's icon

The HC Gilje's video projection tools is a standalone patch that deny me to add further stuff into the patch.
However, i found the way of. I play with jit.aphablend and with jit.lcd which allow me to "draw" black at the same HC Gilje's patch way. This black will be the non-projected part of the video on the complex 3d objects.

Thank you guys.

seejayjames's icon

With standalone patches, you should still be able to open the collective (mxf) in a text editor, then copy and paste the JSON code (starting after the header stuff) for the patch into a new patcher window. On Mac you need to do "Show Package Contents" from the application icon in order to get to the collective.

Don't know if that matters in your case, but possibly for the future it may be helpful.

Michele de Candia's icon

Thank you very much seejayjames for the suggestion! I don't knew it until you had enlighten me. Now I'm find new solution also with seeing hcgiljie's patch.
I only notice that my patch use the entire RAM when I play with it. Then I'll post it for some helps from forum.

will76's icon

hey seejayjames,

just tryed your JSON code copy trick.
it works perfectly for the main patch (mxf)!

but how i get the included bpatcher to work ?

do you also have a nice trick for that problem ?

all the best,
will

seejayjames's icon

if the bpatcher is embedded in the main patcher, it should work already. apparently it's not, so I'm not totally sure... maybe somewhere in the collective / app folder there's the patch that the bpatcher uses? if so, you could just copy that and use it, have it in the same folder as your newly pasted patch. I haven't tried this particular combination though.

In the new patch you've made from pasting the code, do you see the empty boxes where the bpatchers should be? Their Inspectors should say what patch it's looking for and any arguments they each take. So if you can find that patch somewhere in the application folder, that should be ok. Maybe make a new filepath (Options--File Preferences) and point it to your new patch folder just to be sure Max finds everything it needs.

jazmatajz's icon

Opening standalone apps in max could also be achieved, if you open menubar help pache in standalone app or max runtime you gate the save as option in file drop menu.

will76's icon

thank you jazmatajz and seejayjames !
with your techniques, i am able to save
the .mxf as an editable .maxpat patcher.

but it does not include the bpatcher.

if i open the .mxf in max i can see the
bpatchers. but in my saved .maxpat version
i cant see them anymore ....

perhaps, i have to extract them first from
the .mxf file.

but i dont know how to find the right selection.

perhaps someone can help me out,

will

hc gilje's icon

I find it pretty lame to try to break my standalone before even asking me if I could share the relevant code.

VPT is mainly intended as a tool for non-max users, and contains very few secrets, but it is a very messy patch which I have been reluctant to share.

The most exciting part of the VPT, the cornerpin-keystoning, has been available on the forum since JKC demonstrated an elegant way of doing it:https://cycling74.com/forums/index.php?t=msg&goto=163012&rid=245&S=05f1418b59672fb03356f42740f716f7&srch=keystone#msg_163012

The "secret" of the layers is then basically a combination of the cornerpin keystoning and using jit.gl.mesh + jit.gl.texture instead of jit.gl.videoplane

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

If you combine this info with the example patch found in max5/examples/jitter/render called jit.gl.videoplane-multi.maxpat
you have everything you need to explore multiple opengl layers in max/msp/jitter on your own.

Optionally, it is quite easy to combine VPT with your own max patch: You can use VPT to only position,scale,mask the layers, and then send content from your own patch into the different layers, so you can add fx chains, mix sources etc.
The sourcenames that are accepted are listed in the dropdownmenu on each layer, but bascially they are 101source,102source, etc

So, by using your favourite videopatch and add a send 101source, it will end up in the layers of VPT set to 101source.

Hope this was useful.

hc

jhdkfj39929's icon

I thought I would resurrect this. I had a look at VPT and its technique does seem to imply a flat surface as it is based on keystoning (please correct me if I am wrong).

But what about projecting of a complex (perhaps even curvilinear surface? Can Jitter replicate (or improve upon) the vvvv technique? See, "Projection on an arbitrary surface" here: http://vvvv.org/documentation/how-to-project-on-3d-geometry

The concept of a projector seems to be the only thing needed.

Thank you for the help.

maybites's icon

Even if most of you posters have lost interest in this topic by now or have found suitable solutions elsewhere: my petproject http://meshwarpserver.org should solve the problem described above. and it is opensource. and of course a max-patch, eventhough it can be downloaded as a standalone app.