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

Jun 8, 2012 at 11:51am

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

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.

#50654
Jun 8, 2012 at 3:25pm

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

#181701
Jun 8, 2012 at 5:20pm

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.

#181702
Jun 9, 2012 at 7:52am

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

#181703
Jul 21, 2013 at 3:27pm

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

#256674

You must be logged in to reply to this topic.