Forums > Jitter

gl.model: "texgroup 0" message crashes max.. and stuff

June 8, 2012 | 11:51 am

Hello,

I am experiencing crashes when I try to assign textures to a model using the "texgroup 0 xx" message.

If I open the jit.gl.model help-patcher, load seymour, create a jit.gl.texture and try to assign it to the model with "texgroup 0 mytex": Max crashes instantly.
It does not matter how I format the texgroup message, nor does the texture-type.

If I use the normal "texture tex1 tex2 .." message It works like one would expect. Except if I try to assign more textures than there are drawgroups. –> Max crashes.

I did not work very often with jit.gl.model yet, so am I doing something unexpected? Or is it just that you have to define all textures for a model within a .material file?

The reason I want to use several textures are: Lighting. E.g. A color map, a normal map, a specular map ….

Thanks alot!
Regards.


June 8, 2012 | 3:25 pm

I forgot: OsX 10.6.8, Nvidia GT330M, Max6.0.5


June 8, 2012 | 5:20 pm

hello.
thanks for the report regarding the texgroup crashing. i can reproduce.

the first texgroup argument should be a number between 1 and the number of drawgroups in the mesh (not 0).

you probably don’t want to be using the "texgroup" message to achieve what you are describing. texgroup is legacy functionality, from previous versions of the jit.gl.model.

jit.gl.model creates internal jit.gl.material objects for all the materials loaded from the model-file. you can get a dictionary-description of these materials with the "getmaterial_dict" message, followed by the material index. the material index corresponds to the drawgroup index (however materials can be shared among drawgroups).

you can modify the materials with different texture properties by using the sendmaterial message. there is an example patch that demonstrates this functionality found here:
Max6/examples/jitter-examples/render/model/model.material.edit.maxpat

any message or attribute of the jit.gl.material object can be handled using the "sendmaterial" message.

you can also change the properties of the internal textures, using the "sendtexture" message, although this won’t help you if the existing model-file doesn’t already contain the textures.

please check this out and let me know if you have any more questions, or need some clarifications.


June 9, 2012 | 7:52 am

Awesome. I’ll dig right in.
Thank you for the informations.


July 21, 2013 | 3:27 pm

I cannot find the example mentioned:

Max6/examples/jitter-examples/render/model/model.material.edit.maxpat

Can someone send an updated source or url for this maxpat, the Cycling ’74 literature is really cloudy on jit.gl.material properties and anything that can help make it clearer would be helpful.

Thanks


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