[TUTORIAL] How to use the Material Editor

Moderator: NADEO

User avatar
Demented
Posts: 2329
Joined: 07 Nov 2010, 13:17
Location: United States

[TUTORIAL] How to use the Material Editor

Post 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?
CPU: Intel I7-4770 64Bit @ 3.4Ghz.
Ram: 32GB DDR3
GPU: Geforce GXT 1060 6.2GB DDR5
Windows: 7 Pro SP1 64bit
User avatar
niebo26
Posts: 149
Joined: 19 Apr 2011, 19:00
Location: Grenoble, France

Re: [Tutorial?] Create Material Mode

Post 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 when custom materials use texture files directly, 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"). BUT if you make a "Custom Game Material" (modifying the properties of a material from the base game / titlepack), it will be embedded :D

Image

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 !

Niebo
"Don't mesh around !" - ® Haagse, 2019

SUPER SONIC SPEED !

Look for niebo26 in TMU & in TM² :)
User avatar
Demented
Posts: 2329
Joined: 07 Nov 2010, 13:17
Location: United States

Re: [Tutorial?] Create Material Mode

Post by Demented »

Wow!
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?
CPU: Intel I7-4770 64Bit @ 3.4Ghz.
Ram: 32GB DDR3
GPU: Geforce GXT 1060 6.2GB DDR5
Windows: 7 Pro SP1 64bit
User avatar
niebo26
Posts: 149
Joined: 19 Apr 2011, 19:00
Location: Grenoble, France

Re: [Tutorial?] Create Material Mode

Post 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)
"Don't mesh around !" - ® Haagse, 2019

SUPER SONIC SPEED !

Look for niebo26 in TMU & in TM² :)
GeP
Posts: 20
Joined: 01 Oct 2019, 15:34

Re: [TUTORIAL] How to use the Material Editor

Post by GeP »

Hi,
I would like to make custom lights, but no matter how i try, i can't get the material to "emit" light. It does indeed self illuminate, but never emit light on surrounding surfaces. Yet there are custom lights available, working nicely, so this seems possible...

Could you or some expert make an in depht tutorial about making lights ? Pleeease...
:)
User avatar
niebo26
Posts: 149
Joined: 19 Apr 2011, 19:00
Location: Grenoble, France

Re: [TUTORIAL] How to use the Material Editor

Post by niebo26 »

Hello,

Lights are not supported on the Mesh Modeler at the moment. The light emitting items you saw were surely made with an extern 3D modelling software and then imported with the Nadeo Importer.
I think you can find some tutorials in the forums here ^^

Niebo
"Don't mesh around !" - ® Haagse, 2019

SUPER SONIC SPEED !

Look for niebo26 in TMU & in TM² :)
GeP
Posts: 20
Joined: 01 Oct 2019, 15:34

Re: [TUTORIAL] How to use the Material Editor

Post by GeP »

Gasp.
:)
Thanks Niebo.

...
But, what are all these Shading options in the Material Editor then ?
Maybe a complete tutorial on these would be nice. There are few to no info on this...
User avatar
niebo26
Posts: 149
Joined: 19 Apr 2011, 19:00
Location: Grenoble, France

Re: [TUTORIAL] How to use the Material Editor

Post by niebo26 »

Hi GeP,

Those shading options are here depending on the needs of the person making the material
Different shaders activate different texture layers (usually the layers have their first letters in the shader's name after the T)
You can find a detailed list of which layer does what here in the appendix

Niebo
"Don't mesh around !" - ® Haagse, 2019

SUPER SONIC SPEED !

Look for niebo26 in TMU & in TM² :)
User avatar
TMarc
Posts: 15441
Joined: 05 Apr 2011, 19:10
Location: Europe
Contact:

Re: [TUTORIAL] How to use the Material Editor

Post by TMarc »

niebo26 wrote: 12 Nov 2020, 16:01 Hello,

Lights are not supported on the Mesh Modeler at the moment. The light emitting items you saw were surely made with an extern 3D modelling software and then imported with the Nadeo Importer.
I think you can find some tutorials in the forums here ^^

Niebo
Actually this is the problem, few people were writing about lights in the past, but there has never been a tutorial about it.
Most often it as about how to change the light textures of the car skins. But adding a light source - nope.

I just tried, using the default basic scene in Blender: a cube with a spotlight. I exported it to Fbx, added the light to the meshparams.xml.

Code: Select all

<MeshParams Scale="0.01" MeshType="Static" Collection="Valley">
<Materials>
   	<Material Name="Material" Model="TDSNI" BaseTexture="Armor" PhysicsId="Concrete"/>
</Materials>
<Lights>
<Light Name="Light" Type="Spot" sRGB="cc1100" Intensity="3" Distance="80.0" SpotInnerAngle="140" SpotOuterAngle="160"/>
</Lights>
</MeshParams>
The first hurdle is... how to import this new object properly?
Add new item, delete the default cube, then import Mesh? import shape?

In the game, there is no new light to be seen. No symbol for a lightsource, no settings, and no emitted light.

The only thing I can see is the glow of the armor texture from the sample cube which I put as a test on my cube.
But there is no effect on the lightmap, and there is no additional light.
Also after doing the shadow calculation.

What are we doing wrong?
User avatar
niebo26
Posts: 149
Joined: 19 Apr 2011, 19:00
Location: Grenoble, France

Re: [TUTORIAL] How to use the Material Editor

Post by niebo26 »

Hi TMarc,

Like i said, lights are not supported in the Mesh Modeler at the moment :p
After you used the Nadeo Importer to create your mesh file, you need to use it again to create an Item file
(this Item file is mainly a "referencer" file, pointing to the mesh and shape files you created with the importer)
This will instantiate the lights properly.

(We're starting to get off-topic here :p)

Niebo
"Don't mesh around !" - ® Haagse, 2019

SUPER SONIC SPEED !

Look for niebo26 in TMU & in TM² :)
Post Reply

Return to “Mesh Modeler”

Who is online

Users browsing this forum: No registered users and 1 guest