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

Author Topic: [Resolved] Asset Materials  (Read 1444 times)

Cowless

  • World Owners
  • ****
  • Posts: 5
    • View Profile
[Resolved] Asset Materials
« on: Nov 10, 12, 12:41:47 PM »

Hello, I've been making a few assets as of late in 3DS and transferring them into Hero with no issue.
But I've started running into a slight problem; In 3DS, the materials are as they should be.  but when I load everything into the repository and put it in game, the texture is completely wrong. 

Example:
Yesterday I loaded in my wooden table, but when I put it in game, it's texture was that of one of my stone walls. 

Any way I can stop this from happening? I've looked other places for this and have yet to find anything.

thanks.
« Last Edit: Nov 12, 12, 10:08:55 AM by HE-BENNETT »
Logged

Versalis

  • World Owners
  • ****
  • Posts: 22
    • View Profile
Re: Asset Materials
« Reply #1 on: Nov 10, 12, 12:50:00 PM »

Did you make sure that the material has a unique name? I ran into the same problem (using Maya) and it turned out that it was due to a material name that I had been using previously for another purpose and with another texture. The console complained about that as well, pointing me in the right direction. Changing the material's name solved the issue on my side.

I am not sure if your problem has the same root cause, but maybe this hint helps (-:
Logged

Cowless

  • World Owners
  • ****
  • Posts: 5
    • View Profile
Re: Asset Materials
« Reply #2 on: Nov 10, 12, 12:54:22 PM »

thanks for the reply! I don't believe that is the issue though.

the material i paint the model with for the table is wood_table_d.dds
but the one hero slaps onto it is wallstone_01_d.dds

unless this isn't what you meant, but the material names are different.
Logged

Versalis

  • World Owners
  • ****
  • Posts: 22
    • View Profile
Re: Asset Materials
« Reply #3 on: Nov 10, 12, 12:58:51 PM »

Hi Cowless

I don't know 3DS Max, but in Maya the material (HeroShader) is different from the texture (pointing to a .dds file, which also has its own name). Therefore, in Maya I have to consider three names:

1. Filename of the .dds texture
2. Name of the Maya texture that holds the .dds texture
3. Name of the HeroShader material, that will be assigned to the object/mesh

File --> Texture --> HeroShader (--> will be applied to object/mesh)

Again, I don't know the concept in 3DS Max, but in Maya it helps to keep all three names distinguishable.

What could also help is to check in the console (in the HeroBlade) for any warnings or errors. And maybe to check the relative paths to the .dds both locally and in the repository browser.

Hope it helps (-:
« Last Edit: Nov 10, 12, 01:01:46 PM by Versalis »
Logged

Cowless

  • World Owners
  • ****
  • Posts: 5
    • View Profile
Re: Asset Materials
« Reply #4 on: Nov 10, 12, 01:08:04 PM »

So basically all three of these have to be unique? It is more or less the same in 3ds.  you apply the hero material(which, now that I think about it, is given a number which I'm sure should not be used more than once.)
If this is the case, then I may have just been accidently using the same hero mats, even though i put different textures into it.  thanks!
Logged

Dragorth

  • General Accounts
  • *
  • Posts: 25
    • View Profile
Re: Asset Materials
« Reply #5 on: Nov 10, 12, 03:33:14 PM »

That would be correct. The engine looks for the HeroMaterial name to assign textures. It loads the first instance of the name it finds. It does this to help us have minute control over what gets loaded in a scene.

I attached an image with the area in the slate editor to change the name. After you create the HeroMaterial, double click it to get the materials properties dialog. Then the nam is at the top of the screen.

 :)
Logged

Cowless

  • World Owners
  • ****
  • Posts: 5
    • View Profile
Re: Asset Materials
« Reply #6 on: Nov 10, 12, 09:55:31 PM »

that seems to have fixed my issue ! thanks  :)
Logged