Notifications
Clear all

[Closed] New material with MAXScript

Hello everyone. I’m new around here, and I’m new to MAXScript.

I’m working on a project where I have to make a new material (or a new mapping technique, or both… that’s what I need to find out in the first place).

It all starts with the Top/Bottom Material provided by 3DSMAX. With it the user specifies two types of materials that are applied at the top and bottom of the object respectively, and they merge in the middle.

So my project consists in expanding this Top/Bottom material so instead of two submaterials, the user could be able to specify up to six and make it a Top/Bottom/Front/Back/Right/Left Material.

So here come my questions:

  • Where can I find more information about making new materials with MAXScript?
  • Where can I learn how to make a mapping technique using MAXScript?
  • For example, I would like to learn how to make these things from scratch, even if it’s something that already exists. Like following a tutorial.

I obviously need to get the basic theory behind mapping and texturing right. So I’d appreciate some books and links suggestions.

Thank you very much in advance.

9 Replies

Look up Scripted Plug-ins in the Maxscript Help. On the topic of the Material:

Scripted Material plug-ins can only extend existing Material plug-ins.
So if you want to create a material from scratch you will need to use the SDK. What exactly do you mean by mapping techniques? Are you talking about unwrapping/mapping the UVW coordinates to the object? Again if you want a unique plugin will you will probably need to resort to the SDK. An example of a new mapping tool for Max is the LSCM Unwrap Tool. He includes the SDK source so that you can see his code.

-Eric

Thank you PiXeL_MoNKeY

Well, by Mapping Techniques I mean something like UVW unwrapping/mapping, yes. Maybe I did not use the correct word. I mean technique, method, etc.

The thing is that after making this new material, I will need to map it in a particular way according to the normals of the faces of the objects. But that’s the second part, I first want to create (or extend) this material.

Thank you very much for your answer, I’ll now check the MAXScript refference as you said.

One more thing: eventhough it already exists a UVW Mapping modifier, is it possible to create the same one using MAXScript? Not for using it, just for learning how to make it.

Creating new Modifiers is a task for the SDK, which requires VC++ and the SDK (which is an optional install off the Max Discs). Maxscript allows you to extend modifiers, but not really create new ones.

-Eric

Thanks again Eric.

This may sound like “can I create a box using MAXScript?”, but here it goes:

Supposing I have a bitmap file and an object, is it possible to map this image to the object writing a MAXScript code without using the material editor?

What I want is to manipulate what I map to an object’s surfaces entirely by programming, either with MAXScript or the 3DS SDK, and I don’t know where to start.

Thank you very much.

The answer is yes you can do it with Maxscript. All objects in Max, should have texture coordinates/vertices. You may want to look up “Ediatble Mesh > Texture Vertex Methods (Mesh Texture Vertex Methods)”, “Meshop General Mapping Methods” and “Editable Poly Mapping Methods”. These tell you how to access the mapping channels and texture vertices. With access to the data you can create and alter the mapping information.

-Eric

Thank you very much Eric. A appreciate your help.

I’ll be working on that.

Later!

Hello again,

First let me verify I’ve got the concepts right. When I say Material/Texture merging, I mean merging as in mixing, fusing, joining, etc. For instance, if I have a plane object (one face only) and I have two materials, one completely black, the other completely white, I want to merge them on that face so I get gray.

Using MAXScript, since these are plain colours, it would be a simple matter of calculating the new colour. What I want to know is how to achieve this merging process with more complicated materials/textures using MAXScript.

Thank you.

You really need to plan out how you want to get the results. There are numerous ways to do this in Max. Easiest way would probably use a Mix Map, which is creatable and editable through maxscript.

-Eric

Ok… I would like to ask for something more specific this time:

I need a script that applies a material to an object but with different propperty values for each face. For example, a plane made up of four faces and an image. I want the image to be mapped to the plane, but I want each of its faces to have a different amount of Specular Level.

Thank you very much. If anyone can help me with a script to achieve this, I could possible get on with my project.

Thanks again.