Oct 23 2007 | 1:27 pm

can someone explain, or point me towards relevant documentation -

why does jit.gl.model output the geometry matrix in a different way to other standard gl objects (nurbs, gridshape)?

it seems jit.gl.model outputs 8 planes of float32 data, and the dim size is just one number. on the other hand nurbs outputs 12 planes with a default dim size of 20x20.

as a test, i'm trying to do 3d geometry morphing using jit.xfade between a jit.gl.model and nurbs. when i xfade all the way to nurbs the geom disappears (or goes flat?).

is there any way to convert a dim 20x20 geom matrix to a dim 400 matrix... would that work?

any advice appreciated,

j

- Oct 24 2007 | 1:27 pmbump...
- Oct 24 2007 | 1:32 pmthose of us who use email to read the forums need a little more to bring topics back to our attention. can you quote the original thread please, instead of just bumping?On Oct 24, 2007, at 9:27 AM, justin wrote:> > bump... >
- Oct 24 2007 | 1:44 pmapologies for bump without question, didnt realise that was the case.below is the original question:can someone explain, or point me towards relevant documentation -why does jit.gl.model output the geometry matrix in a different way to other standard gl objects (nurbs, gridshape)?it seems jit.gl.model outputs 8 planes of float32 data, and the dim size is just one number. on the other hand nurbs outputs 12 planes with a default dim size of 20x20.as a test, i'm trying to do 3d geometry morphing using jit.xfade between a jit.gl.model and nurbs. when i xfade all the way to nurbs the geom disappears (or goes flat?).is there any way to convert a dim 20x20 geom matrix to a dim 400 matrix... would that work?any advice appreciated,JustinQuote: joshua goldberg wrote on Wed, 24 October 2007 14:32 ---------------------------------------------------- > those of us who use email to read the forums need a little more to > bring topics back to our attention. can you quote the original > thread please, instead of just bumping? > > On Oct 24, 2007, at 9:27 AM, justin wrote: > > > > > bump... > > > > ----------------------------------------------------
- Oct 24 2007 | 2:09 pmif you send a single bang to a jit.gl.model @matrixoutput 1, you will see a few things. you'll see that a primitive is output after the matrix name, and you'll see that there are several matrices from each bang- one for each disconnected shape in the model. if you need to crossfade geometry, you're going to have to take in account all of those individual matrices.On Oct 24, 2007, at 9:44 AM, justin wrote:> > apologies for bump without question, didnt realise that was the case. > > below is the original question: > > can someone explain, or point me towards relevant documentation - > > why does jit.gl.model output the geometry matrix in a different way > to other standard gl objects (nurbs, gridshape)? > > it seems jit.gl.model outputs 8 planes of float32 data, and the dim > size is just one number. on the other hand nurbs outputs 12 planes > with a default dim size of 20x20. > > as a test, i'm trying to do 3d geometry morphing using jit.xfade > between a jit.gl.model and nurbs. when i xfade all the way to nurbs > the geom disappears (or goes flat?). > > is there any way to convert a dim 20x20 geom matrix to a dim 400 > matrix... would that work? > > any advice appreciated, > > Justin > > Quote: joshua goldberg wrote on Wed, 24 October 2007 14:32 > ---------------------------------------------------- >> those of us who use email to read the forums need a little more to >> bring topics back to our attention. can you quote the original >> thread please, instead of just bumping? >> >> On Oct 24, 2007, at 9:27 AM, justin wrote: >> >>> >>> bump... >>> >> >> > ---------------------------------------------------- > > >
- Oct 24 2007 | 3:39 pmThe issue is that jit.gl.model reads arbitrary lists of triangles. It doesn't do any kind of downsampling internally so if you give it a 10,000 triangle model for example, how is it going to fit into a 20x20 matrix? Because the data is arbitrary, it is strung out into a 1D matrix. Hope this makes sense. It's 8 planes for (xyz) texcoord(uv) normal(xyz).wes
- Oct 24 2007 | 3:41 pmAlso check out the jit.gl.render helpfile which explains the geometry where plane 0 to 11 of the matrix represents x,y,z,s,t,nx,ny,nz,r,g,b,a.s and t are your texture coordinates. nx,ny,nz are normal components for the point and the rest are colors.I was looking at open GL documents to get a better understanding of these parameters..... anybody have some good links that explain in detail all these parameters?
- Oct 24 2007 | 4:13 pmi understand what you are saying, but is there a way of doing it the other way round...so say you took the geometry from nurbs in a 20 x 20 matrix, can u put that in a 1 x 400 matrix? then you could xfade with an equivalent model of the same matrix size - in theory!or is it possible to create your own jitter patch for downsampling of arbitrary geometry matrices?your answers are much appreciated!jps. i'm familiar with the jit.gl.render helpfile - and the 12 plane matrix format doesnt seem to apply to jit.gl.model, which is partly why i asked this question.Quote: wesley.hoke@gmail.com wrote on Wed, 24 October 2007 16:39 ---------------------------------------------------- > The issue is that jit.gl.model reads arbitrary lists of triangles. It > doesn't do any kind of downsampling internally so if you give it a > 10,000 triangle model for example, how is it going to fit into a 20x20 > matrix? Because the data is arbitrary, it is strung out into a 1D > matrix. Hope this makes sense. It's 8 planes for (xyz) texcoord(uv) > normal(xyz). > > wes > ----------------------------------------------------
- Oct 24 2007 | 4:22 pm> so say you took the geometry from nurbs in a 20 x 20 matrix, can u put that in a 1 x 400 matrix? then you could xfade with an equivalent model of the same matrix size - in theory!Yes, but you'll have to align the vertices appropriately. That might be tricky to do but you can try it.wes
- Oct 24 2007 | 10:13 pmcant u just take one row at a time and put one after the other, or is "aligning vertices appropriately" more difficult than that?jQuote: wesley.hoke@gmail.com wrote on Wed, 24 October 2007 17:22 ---------------------------------------------------- > > so say you took the geometry from nurbs in a 20 x 20 matrix, can u put that in a 1 x 400 matrix? then you could xfade with an equivalent model of the same matrix size - in theory! > > Yes, but you'll have to align the vertices appropriately. That might > be tricky to do but you can try it. > > wes > ----------------------------------------------------
- Oct 24 2007 | 10:24 pmTry using jit.scanwrap to shape the matrix similarly to the model and see what happens.wesOn 10/24/07, justin wrote: > > cant u just take one row at a time and put one after the other, or is "aligning vertices appropriately" more difficult than that? > > j > > Quote: wesley.hoke@gmail.com wrote on Wed, 24 October 2007 17:22 > ---------------------------------------------------- > > > so say you took the geometry from nurbs in a 20 x 20 matrix, can u put that in a 1 x 400 matrix? then you could xfade with an equivalent model of the same matrix size - in theory! > > > > Yes, but you'll have to align the vertices appropriately. That might > > be tricky to do but you can try it. > > > > wes > > > ---------------------------------------------------- > > >
- Oct 24 2007 | 10:49 pmOn Oct 24, 2007, at 3:24 PM, Wesley Smith wrote:> Try using jit.scanwrap to shape the matrix similarly to the model and > see what happens.Going to be really odd since triangles -> quad_grid isn't going to look right. In general I would say you can't easily morph between jit.gl.model with jit.gl.nurbs unless you *really* know what you're doing..i.e. you understand how to generate models so that the triangle ordering is specific, and you understand how to unwind a quad_grid (or tri_grid) to a set of triangles. It is pretty tricky. Most people that want to morph with jit.gl.model model their equivalent nurbs/gridshape/etc object in the same modelling environment as their model and use very specific rules. There's at least one thread on this somewhere in the archive.-Joshua
- Oct 25 2007 | 10:16 amhere's a patch to illustrate the idea. it seems joshua's comments on triangles -> quad_grid persist...i admit i'm not one of those who *really* knows what they are doing with regard to unwinding vertices from quad_grid to triangles, but i'm happy to read up on it and find out a little more before i decide whether or not it's *really* too difficult!if anyone has any relevant documentation (other than Jitter help) i'd appreciate any links.i have also searched the forum archives, but not found anything of much help on this topic.j
- Oct 25 2007 | 9:25 pmit looks to me like you've done a good job realizing your initial theory. you *are* morphing from a gl.model to a gl.nurbs, no?what else do you want to achieve. i don't think you'll be able to get much more control with this basic morphing paradigm. are you trying to get specific vertices of the mushroom to morph to specific areas of the nurbs shape? this would be very hard (impossible) to do without modeling the nurbs shape in advance, or without knowing how the gl.nurbs vertices are indexed and modeling your gl.obj with this indexing in mind.3d morphing requires the objects have the same number of vertices and prior knowledge of where a vertex in one model is going to end up in the second model. i would think this would be achieved by modeling the first object, and then very carefully, in a 3d editor reshaping the first model to look like the second model, moving each vertex in the first to where it should go in the second.don't know if that is much help.
- Oct 25 2007 | 10:43 pmthat is helpful... a different approach to morphing from gl.model to standard gl gridshape / nurbs.thanksjQuote: robtherich wrote on Thu, 25 October 2007 22:25 ----------------------------------------------------> 3d morphing requires the objects have the same number of vertices and prior knowledge of where a vertex in one model is going to end up in the second model. i would think this would be achieved by modeling the first object, and then very carefully, in a 3d editor reshaping the first model to look like the second model, moving each vertex in the first to where it should go in the second. > > don't know if that is much help. ----------------------------------------------------
- Jan 31 2013 | 4:54 amHi allI am trying morphing dae files too, according to Robs words, I can not successfully morph my dae files under triangle mode, is that because of my models don't have same amount of vertex? there's always display error or broken faces while i morphing them, only the left inlet of the xfade displayed well.ThanksL
- Jan 31 2013 | 9:50 pmis that because of my models don't have same amount of vertex?probably. how can we say more without seeing the patch and the models in question?
- Jun 07 2017 | 7:29 pmim dealing with the same thing, and have created a post about it here, patch included:https://cycling74.com/forums/morphfade-wave-forms--objswould be super nice to read some reflections