Forums > Jitter

Gridshape now using internal mesh and jit.gl.material questions

June 5, 2012 | 1:09 pm

Hello

I’ve read somewhere that with max6 jit.gl.gridshape is using a mesh internally.

So My questions are:
- Is that the case only with gridshape or with jit.gl.model / nurbs / sketch… aswel?
- Is there a way to access the tangents (or other vertex attributes) in a shader? A similar way one would do it with the original jit.gl.mesh object?

- And: As jit.gl.material generates its own shader is there a way to use the object with ones self-made shader? Would there be any benefit? Easy texture-storing for example?

Thanks a bunch!
Regards


June 5, 2012 | 6:27 pm

"- Is that the case only with gridshape or with jit.gl.model / nurbs / sketch… aswel?"

only gl.gridshape uses a gl.mesh internally. however, there currently is no way to calculate tangents for gridshapes without output-ing to a gl.mesh. this patch demonstrates:

– Pasted Max Patch, click to expand. –

if a model file contains tangents, they will be loaded and made available to the vertex shader with jit.gl.model.

"- Is there a way to access the tangents (or other vertex attributes) in a shader? A similar way one would do it with the original jit.gl.mesh object? "

you can access tangents from either jit.gl.mesh or jit.gl.model by binding a vertex attribute, in the following manner:


attribute vec3 tangent;

"- And: As jit.gl.material generates its own shader is there a way to use the object with ones self-made shader? Would there be any benefit? Easy texture-storing for example? "

there is no way to provide a user-made shader to the jit.gl.material object.

hope this helps.


June 5, 2012 | 8:13 pm

Yes, this helps.

Thanks alot.


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