HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]  (Read 3772 times)

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile

After Quartz.D update system start spam error for every model with hair:

ERROR:Material:MATERIAL REDEFINITION ERROR:  Material [SatyrHair01Mat] was first defined in file [/character/dynamic_2/satyr/satyr/parts/satyrhair01.hgm] and then redefined by file [File not specified]   Reason: The second material's setting for Effect (hair.fx) does not match the first material ({Auto Select}).  Materials sharing a name must have identical settings, fix the art by eliminating the differences or renaming one of the materials and then restart HeroBlade.

I don't export any char models or parts. And don't change any material. I think Quartz.E fix it, but it don't. Maybe I can fix it by myself?

P.S.: Re-export of model don't help.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]
« Reply #1 on: Jun 18, 15, 07:33:13 PM »

I used to see many of the old speed tree "errors" also, until I removed the old art files that I downloaded when 1st getting into the engine. I don't see them anymore.
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]
« Reply #2 on: Jun 18, 15, 08:26:34 PM »

firstly, if you make changes to fix this, you have to restart the blade to see the changes and get rid of error.

I cannot tell you what caused the problem, but heres how to fix the error.


Open satyr model up in 3dsmax/maya

select the satyr hair mesh by itself, and hide unselected.

open the materials editor (if in 3dsmax) and rename the material or append a incremented number
and then in Hero Tools Exporter select dynamic character part and export selected.
Overwrite  satyrhair01.hgm.

Upload the new file to the server in the repository.


Just a note:  for every material you create, make sure no other material will ever use the same name.
you can use the same material on multiple meshes, but cannot have two different materials using the same name.  This caused your error.

close the blade, and restart it, the error should be gone.
While it doesnt show the name of the second file, you do know the first, and so renaming the material for that mesh will solve the conflict.

You have two meshes using the same material but one of them has the following:

in material editor under shader options, the shader is set to "hair.fx" and the other is set to "auto select".

You can either fix this so that they both match, or rename the material as i described above, I cant tell you which would be proper without knowing if they're supposed to match or not.


Hope this helps.
« Last Edit: Jun 18, 15, 08:29:00 PM by ToY-Krun »
Logged

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]
« Reply #3 on: Jun 19, 15, 01:31:29 AM »

To ToY-Krun:
1. I know about it. And I entirely sure - there is only one model which use this material.

2. Well, I try to re-export before - but it is didn't help. But, since you insisted on it, I rename material and re-export it again. So now error message:

ERROR:Material:MATERIAL REDEFINITION ERROR:  Material [SatyrHair02Mat] was first defined in file [/character/dynamic_2/satyr/satyr/parts/satyrhair01.hgm] and then redefined by file [File not specified]   Reason: The second material's setting for Effect (hair.fx) does not match the first material ({Auto Select}).  Materials sharing a name must have identical settings, fix the art by eliminating the differences or renaming one of the materials and then restart HeroBlade.

And this not only about this model - all models with hairs spam this error (of course with its own materials names and paths)!
« Last Edit: Jun 19, 15, 01:34:25 AM by GlorianLanTarini »
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]
« Reply #4 on: Jun 19, 15, 01:57:47 AM »

Interesting...

Quote
The second material's setting for Effect (hair.fx) does not match the first material ({Auto Select})

Perhaps you could try ticking the "hair" setting for shader in the "SatyrHair02Mat" material (without renaming it).

By any chance is this "hair" mesh a Group?

Our hair meshes are behaving as they should, but, i've not uploaded any new ones recently.

I'm curious if it has something to do with the hair shader (which we don't use).

Sorry I wasn't more help, if its more than one mesh doing this, then I don't know where you'd look to find the answer.
Have these always worked before now?  Or are these all new meshes that have never worked without this error?

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]
« Reply #5 on: Jun 19, 15, 03:23:26 AM »

Have these always worked before now?  Or are these all new meshes that have never worked without this error?

Yes, all this meshes work fine before Quartz.D update. No, this meshes not a group. Each one is single mesh. With one material.

I think - it's something about hair shader.

Sorry I wasn't more help, if its more than one mesh doing this, then I don't know where you'd look to find the answer.

It's okey. Honestly, I hope for a response from the engineers of the engine. It's look like a shader bug.
Logged

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]
« Reply #6 on: Jun 23, 15, 03:59:43 PM »

It's possible that there are some false positives happening when checking for material redefinition errors - we've been doing  a good deal of work in those areas.  We'll take a look at this, I'll let you know if we need further information from you.  Thanks!
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]
« Reply #7 on: Jun 23, 15, 05:17:11 PM »

@Bennett

Just a note, I got one of these last night when I removed a mesh from a group.  when i reuploaded the model, it pointed out that the material of the now missing mesh , was missing... but did not specify file.
This is the first time I've seen it.

for me, renaming the material in use and uploading again fixed the error.

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]
« Reply #8 on: Jun 25, 15, 02:47:02 PM »

That's good information, thanks.  Renaming will almost always resolve the issue, even if it is a false positive. 
Logged

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]
« Reply #9 on: Jul 10, 15, 10:37:32 PM »

That's good information, thanks.  Renaming will almost always resolve the issue, even if it is a false positive. 

I'm happy for ToY-Krun. But unfortunately, for me it does not work. Is there any new information on the problem?
Logged

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]
« Reply #10 on: Jul 13, 15, 11:57:35 AM »

Hmmm, so you have an asset that has the hair shader applied.
It worked fine before, but now it throws material redefinition errors even though this material is only used on one asset?

And you've tried to re-export this asset with the material named something else and it didn't fix the error?
Logged

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]
« Reply #11 on: Jul 14, 15, 02:12:54 AM »

Hmmm, so you have an asset that has the hair shader applied.
It worked fine before, but now it throws material redefinition errors even though this material is only used on one asset?

And you've tried to re-export this asset with the material named something else and it didn't fix the error?


You are absolutely right. In every word.
This is what I wrote in all messages of this thread which I started.
Logged

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]
« Reply #12 on: Jul 14, 15, 10:42:22 AM »

Ok, just checking to make sure I understand.  That is a very odd issue.  I can't seem to reproduce the error, so it may be something specific to your world or assets.  Can you tell me the world name and cluster?  I can just jump in and take a look to see if we can get this resolved for you :)
Logged

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: Annoying bug MATERIAL REDEFINITION ERROR [File not specified]
« Reply #13 on: Jul 14, 15, 11:00:42 PM »

APAC Server 4
Heroes of the Bastion
Any player character model which can be created with CCS (they all have hair part with hair shader - all meshes and materials have unique names).

If you are going to create a character to run through the world - better to use the Satyr race. I haven't had time to hook up the correct animation for other races. By the way, if I did everything correctly, the game code must determine that language your OS is not Russian and show all the game text into English.
« Last Edit: Jul 14, 15, 11:09:42 PM by GlorianLanTarini »
Logged