Forums > Jitter

models,meshes and multiples

May 06 2010 | 6:43 am

I have been working with animated models(using groups) very nicely in jitter.. texturing them and working with slabs,shaders and meshes. I have started to work with multiple and have got models to work well.
it seems that one can not use mesh ,model and multiple .. I tried various configurations .. naming all etc.. would like to use mesh with multiple as then I could use the matrixoutput to manipulate the geometry.. of the model when it is multiplied.. also found that slab works with 2d texturing shaders but not any shader that effects geometry ( geometry shaders either do nothing, or make my texture go away)( I was told geometry shaders are not supported.. but then why are the included with max?)..also I can texture map videos correctly with slab(shaders) and mesh but not with when I bind the shader(using the shader object) the texture map goes back to 0.. perhaps I expect too much.. Is anyone grappling with similar issues..I have scoured the forum and I know about jitOrge and may deal with at some point
but would like to stay simpler for now.. any thoughts would be helpful..

May 06 2010 | 1:52 pm

you should post your patch !

Anyway I think "automatic 0"attribute should help you…

But whitout a patch, it’s pretty complicated to answer correctly…

May 06 2010 | 6:42 pm

I am working on various patches.. some yes using automatic 0 which gets the mesh to show up in multiple.. the texturing is one of the issues I am exploring in terms of individual textures in multiples.. (256 possible they say ).. but I am interested in using movies.. I found an Andrew Benson patch that does it .. with three to which I added my model system . the first patch does not use a mesh object.. when I add the mesh object in the second patch the models will not show up as multiples.
I’ll post the with and without & see if anyone can figure it out.
note* these are just experiments so may be a bit messy

May 06 2010 | 6:50 pm

i’m not sure if you’re aware, @matrixoutput 1 will spit out a distinct matrix for each drawgroup in the model, every time it’s banged. so you either need to create a separate gl.mesh for each drawgroup (poly~ would be a great help with this), or somehow manage which matrix gets sent to the gl.mesh.

if you’ve named your gl.mesh, gl.multiple should have no problems controlling it. at this point, the gl.mesh is doing the drawing, not the gl.model.

slabs are only for textures, not 3D geometry.

geometry shaders are not currently supported.

binding shaders to geometry in opengl means you lose fixed-fuction capabilities (like tex_map). you handle the texture mapping in the shader.

jit-ogre will be a much better solution for handling animated models, assuming you can export them properly.

May 06 2010 | 6:56 pm

in your first patch, the only thing getting drawn is the gl.model, as you don’t have matrixoutput enabled.

May 06 2010 | 7:21 pm

sorry forgot to add the matrixoutput.. but when you do the model disappears .. I get it that slabs are for textures but if I want to mix slabs with shaders which does work .. how do I get my textures to map correctly ?.. with texshaders first and geometry next? ..I might do jit-orge in future and will have no prob exporting but adds a thick layer to max .. my system is working nicely and I would like to solve some annoying details if possible. btw if not supported then why are geometry shaders included frustrating when something is there in max but not functioning.

thanks rob for your help..

May 06 2010 | 7:44 pm

if you want to texture a gl.model, you will need to either export the model with texture coords, or use tex_map to generate coordinates.

if you want to bind a shader to your model, you no longer have the tex_map option, and you must either to texture coordinate generation in the shader, or export tex-coords with the obj.

for shaders that work with 3D geometry (as opposed to shaders meant to be loaded in a slab), take a look in the jitter-shaders/material folder. unfortunately, none of these examples show how to bind a texture as well. however there are plenty of online shader tutorials for this.

here is a basic example of a blinn shader for a single directional light with a diffuse texture:




-- Pasted Max Patch, click to expand. --

May 06 2010 | 10:46 pm

Thanks rob,

I’ve actually done a bit of that and textured my models very successfully.. and combined them with shaders but with slab not shader.. I think in relation to using the shader object it is the tex-coord issue that is the crux of my prob.. I will research how to generate it in my modeling prog.. which is now Maya… perhaps if it is exported with the model my textures will automatically map correctly.. will let u all know if I can make it work..

May 07 2010 | 5:47 pm

just to reiterate, slab is only used for processing 2D textures, and has nothing to do with 3D geometry. if you apply a slab to 3D geometry, you are simply applying a texture to that geometry.

if you want to process 3D geometry, you must bind with

May 07 2010 | 6:35 pm

yes.. I know that and that is the source of one of my problems (I have a few). I would like to use some of the geometry shaders to vary the rigidness of the models.. which can be accomplished in interesting ways with ( even though they are not supported some of the geometry shaders work fairly well).. but the tex coordinating
(tex_map) of the object is lost when I bind to the shader object.. I am using my 2d animations as well as live capture as texture and need to map it correctly. Is there a way to accomplish this in jitter?

thanks again

May 08 2010 | 4:28 am

I looked on line for shader tutorials that textured coordinated and I could not find ones that specifically seemed to apply to the issue of mapping textures(movies or images). If you can suggest any I would greatly appreciate it. Also if I found one that would work I am guessing the texturing info would need to be included in the whole shader as it does not seem like one can combine objects the way you can slabs.So one would need to write a new shader with the effect and the texturing included. If I am off on this please tell me.

I avoided texture mapping in Maya as( when I began experimenting with all this) it didn’t seem necessary ( for jitter ) and I’m not into traditional 3d animation but I will try that route as well( when I can manage it).

again thanks

May 10 2010 | 6:59 pm

if you are modeling something in maya, you should export the tex coords from maya. you will then be able to access the texcoords from you shader in jitter.

perhaps do some experimenting with you shaders using the apple.obj, which already has texcoords exported with the model.

also, i’m not entirely sure if you mean geometry shaders, or shaders that operate on geometry. geometry shaders are a special type of shader, distinct from vertex and fragment shaders. they are only supported on more recent graphics cards and rendering APIs. shaders that operate on geometry are absolutely supported in jitter, assuming your graphics card also supports them.

May 11 2010 | 5:20 am

Just checked and apple object works as you said.. I will try the coordinates in Maya with my new objects & maybe will get closer to what I want.. I did mean shaders that operate on geometry.. semantic confusion.. and yes my graphic card supports them.. but well it seems in my experimenting that there were some than unbinded the vertexes which caused errors.. but as I am just getting into this I know I have a lot to learn.. but am excited about the potential..
again… thanks so much for your help

Jun 29 2010 | 5:22 am

Hi, This is specifically for Robtherich.. I just performed a patch with several animated models.. shaders/slabs textures layered with multiple video planes.. all worked fairly well..but now I would like to try your jit-ogre..

I’ve looked at the wiki and the tutorials which are great ..I am preparing to tackle it soon. It would be helpful to see some examples of projects that use it but can’t seem to find any but the couple of examples you’ve posted a while ago . I am specifically concerned about layering the imported animated models with other elements of jitter like video planes etc.. I am worried about the frame rate.. or does the ogre engine deal with that issue.. as it seems the heavier the mesh the slower things run ( which is expected.. and I’ve been able to optimized my simple patches with some success)It looks like the models imported with your system would have to be quite heavy if any complexity were involved. Does jit-ogre resolve that issue?

thanks in advance

Jun 29 2010 | 7:19 pm

i would also love to see examples of projects that use jit-ogre :)

here is a link to a project i was involved in last winter:
i used jit-ogre to project 3 different 3D environments from 3 projectors simultaneously. the characters were controlled by 3 dancers outfitted with several wii-motes.

layering of jit-ogre with normal jitter opengl objects is possible, however there are some kinks. the main issue is that there is no way to "interleave" jitter opengl with jit-ogre if you turn depth_enable off (eg, for transparency). because all jit-ogre objects must be drawn at the same time, and therefore you can’t control render order manually.

however this is a special case, and i hope to find a solution at some point in the future. for the most part the two interact perfectly well together.

ogre can handle heavy polygon models as well as any 3D engine.

please feel free to ask more questions, and i’ll do my best to answer.

Jun 29 2010 | 10:49 pm

I appreciate your reply Rob, I looked at the link.. its sort of hard to see the video but looks like an interesting set up..I wish I had known about it as I am in NYC and would have loved to see it. I am also working with the wii but my models are abstract rather that representational..and I also have and would like to continue to work with dancers ( not so easy) .. It would be great if you could do some sort of workshop for jit-ogre.. Of course I will carry on on my own but no one seems to know much about this except you.. and I’ve bent a lot of peoples ears. I am fairly new with all this and still have to get up to speed with Maya..& 3d modeling in general ..but am making progress.. its a lot on the plate.. all good though..I don’t know much about game engines.. So the Orge engine runs the models and animation within max so your are not as limited in poly count weight as you would be running in jitter on its own ( which slows down frame rate with big models) Am I correct.. If so that is a big reason to use jit-orge .as my patch slowed down real fast with with many different models open at same time..which brings me to next question.. can you open and control more that one model at a time in jit-ogre..It seemed in the DTW piece there was one controllable model for each computer. That is fine for a performance setting but I am also considering creating installations that would hopefully need only one computer. Thanks for your advice..

Jul 06 2010 | 3:37 pm

Please answer Rob.. I have been reading the other thread about Jit.orge and someone was asking about the layering issue.. It is a critical element.. If one cannot at this point layer an environment for the moving models when using jit-orge than its usability is restricted.. Thats okay if that is the situation but I need to know before I spend a lot of time .. as would like to avoid frustration.. I would like to design my project knowing the scope of the parameters. When looking at the link you gave me it did seem that there were background environments in the projections but were they generated in jitter or in the 3d program and then imported with the model to open all in jit-orge..? Thanks again

Jul 06 2010 | 4:59 pm

hi there, dont known if this will help you but
this is a workaround that i am using, it send the orge to a video plane then mixs them with normal 3d,

you need vades shaders

this is the one i used

-- Pasted Max Patch, click to expand. --

Jul 06 2010 | 6:53 pm

Thanks so much.. looks like it should work.. will let you know when I try it out.

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

Forums > Jitter