Page 1 of 1

[TUTORIAL] How to use the Material Editor

Posted: 30 Oct 2018, 16:50
by Demented
Could someone write a simple TUT for using the Materials Mode / Create Material mode?
I'm not familiar with its use or purposes. Also can these materials be embedded with items?

Re: [Tutorial?] Create Material Mode

Posted: 19 Dec 2018, 02:02
by niebo26
Hello Demented !

Sorry for the late answer, but here are some explanations on the Material Editor.

Before explaining the editor, you have to know that since custom materials use texture files directly (even if you get a game image file), no embedding is possible right now. So for other people to use your items containing the material, you'll have to either give the .Mat.Gbx and the textures (and tell people to put these files in the exact same folders as you did when you created the item) OR make your own titlepack and add the material in the titlepack files (if so, the Mesh Modeler of that titlepack will use it "naturally")


Anyway, to the editor itself :
- First line is the Model Shading line : it'll depend on what you want your material to be used for (does it emit light ? Does it emit light only at night ? Is it dynamic ? etc (usually for simple blocks / items, you'll stick to TDSN)
- Then you have the Textures lines : they depend on the Model Shading you selected and they are the images the material gonna use (since you won't have to change stuff above, you'll mainly have Diffuse (the main texture), Normal (relief) and Specular (reflectivity))
- The Tiling lines are there to know if the material is repeatable on an a direction (U is horizontal, V is vertical) : Wrap is repeat normally, Clamp is no repeat (so last pixel gets used as an infinite point), Mirror repeats by mirroring etc
- Texture Size in Meters is for the MM and the automatic projections to apply your material correctly etc
- PhysicsID is what the surface type the material will be (gameplay wise) : Dirt, Asphalt, WetGrass, etc (you can also type the name of the surface type directly : if it exists, it'll be set to this one)
- Finally IsNatural is used by the MM when generating the Crystal : if it's Natural, it will smooth the vertices like in the game terraforming for example (it's only a visual enhancement but it adds really something ^^)

As usual, if you have more questions, i'll be glad to answer them :thumbsup:
Hope you'll like the Material Editor !


Re: [Tutorial?] Create Material Mode

Posted: 19 Dec 2018, 15:30
by Demented
Thanks again Niebo for explaining things in a easy to comprehend way. You really do explain things well :thumbsup:

Curious, if we made a material that emits light but gave it no texture or texture files, could it still be applied to an object (as a light source) and be embeddable? Or would it not be accepted without a texture source attached to it?

Re: [Tutorial?] Create Material Mode

Posted: 19 Dec 2018, 17:14
by niebo26
If the SelfIllum texture field is filled, it will emit light based on the texture (black = no light etc)
I think if you don't put anything in this field, it doesn't work (no light emitted), but you can try (in the next update because we fixed something about SelfIllum in TDSNI_Night :p)