HeroEngine Forums

HeroEngine Support => Art & Art Pipeline => Topic started by: Coryxinyaynix on May 15, 17, 08:56:46 AM

Title: Texture Flashing
Post by: Coryxinyaynix on May 15, 17, 08:56:46 AM
So I am New to Hero Engine and I've been watching every tutorial I can find. I watched "Making a Textured Cube in the HeroEngine" https://www.youtube.com/watch?v=tFsBSs6aJgY but I am still having trouble I dont know why my Textures wont load in. Please Help
Title: Re: Texture Flashing
Post by: nocake on May 15, 17, 11:51:06 AM
Open:

C:\HeroEngine\ArtDepot\HeroEngineArtPipeline\HeroEngineViewer.exe

Drag and drop your model onto the HE Viewer application you just opened.

Screen shot the tab "Texture List" and post it on here.
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 15, 17, 12:23:22 PM
Here's my file setup in the repository
Title: Re: Texture Flashing
Post by: nocake on May 15, 17, 01:15:04 PM
That is just the texture. I am talking about the model itself.

Drag and drop that into the Hero Engine Viewer so we can see the information of the model you trying to import.
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 15, 17, 01:38:09 PM
This is what it shows up as inside hero engine
Title: Re: Texture Flashing
Post by: nocake on May 15, 17, 03:01:26 PM
Can you locate HeroEngineViewer.exe inside your art depot set up?

Can you open this .exe and then drag and drop your model onto the application it opens up.
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 15, 17, 03:04:38 PM
HeroEngineViewer.exe is in my ArtPipeline not my ArtDepot
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 15, 17, 03:07:49 PM
But Yes i can open it and it load fine
Title: Re: Texture Flashing
Post by: Amanda_Brooks on May 15, 17, 04:26:27 PM
Have you set up your art pipeline so that it's laid out as an exact mirror of the file structure in the repository browser?
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 15, 17, 04:28:16 PM
Yeah! Im pretty sure i did it correct at least.
Title: Re: Texture Flashing
Post by: Amanda_Brooks on May 15, 17, 04:36:35 PM
Can you post an image of both file structures?
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 15, 17, 04:55:05 PM
I Hope this is what you were asking for.
Title: Re: Texture Flashing
Post by: Amanda_Brooks on May 15, 17, 05:28:44 PM
Sort of - but I can see that you've got HE\Assets and HE\GameAssets - that's not a 100% mirror - the wording of the pipeline and Repository browser file structures always needs to match each other.

EDIT:

I's suggest a simple file structure for your project to start with - set up your ArtDepot to have 2 paths to start with:

HE\WorldofKingdoms\Assets\Meshes

and:

HE\WorldofKingdoms\Assets\Textures

Put your textures in the texture folder, and export your models to the mesh folder.



Then make the exact same two identical paths in the repository:

HE\WorldofKingdoms\Assets\Meshes

and:

HE\WorldofKingdoms\Assets\Textures


Then drag and drop the meshes and textures from your ArtDepot to their correct folders in the repository.
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 15, 17, 06:11:52 PM
Ok so I did that and still no luck?!
Title: Re: Texture Flashing
Post by: Amanda_Brooks on May 15, 17, 08:48:26 PM
Are the textures in the texture folder on both your computer and the repository?
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 15, 17, 09:46:00 PM
Yes
Title: Re: Texture Flashing
Post by: Amanda_Brooks on May 15, 17, 10:31:26 PM
And you have properly converted the textures to the dds format?
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 15, 17, 10:32:49 PM
Yep I used photoshop with Nvidia tools
Title: Re: Texture Flashing
Post by: Amarak on May 15, 17, 10:53:05 PM
Another question, did you set up the texture as a Hero Material on the model in Maya before exporting it?
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 15, 17, 10:55:52 PM
yep i used hero shader then for the image i used the .dds file then exported it as a static model 
Title: Re: Texture Flashing
Post by: Amanda_Brooks on May 16, 17, 03:41:53 PM
Can you post a screenshot of the whole left side of your repository with the folder paths opened?
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 16, 17, 05:20:30 PM
Here you go
Title: Re: Texture Flashing
Post by: Amanda_Brooks on May 16, 17, 07:34:11 PM
There are 3 files in the meshes folder in the repository - are those the mesh plus the 2 textures?
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 16, 17, 07:56:53 PM
no the texture one is in the texture file
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 16, 17, 07:59:44 PM
It is exactly mirrored as my directory
Title: Re: Texture Flashing
Post by: Amanda_Brooks on May 16, 17, 08:01:38 PM
And when you add the textures to the mesh in Max/Maya, you're loading them from the texture folder?
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 16, 17, 08:04:17 PM
yeah
Title: Re: Texture Flashing
Post by: FI-ScottZ on May 17, 17, 12:21:14 PM
If I am reading this right, you have the model in the Assets folder, and the textures for it in the Textures folder, and those folders are siblings to each other?

That could be the problem.  When a model is exported, it will expect to find the textures in the same location relative to the model file as they were relative to the original model file location from where it was exported.

That is to say, if when exported the texture was in the same folder as the source model, then wherever the hgm file gets put, the texture must be in that same place.  If the texture was in a Textures folder that was a child to the location of the source model, then there also must be a Texture folder directly below wherever the hgm file gets uploaded to.

Since you have a texture location that does not descend from the location of the source model file, I am not sure how it exports that as a relative location.  But if you try having the texture in a location that descends from the location of the source model file when you export, and then maintain that same relative positioning in your uploading, that might work.

TLDR; For each model type, have a folder for it that has all of its relevant files. Either put the textures directly in there, or in a folder within that folder. When uploading, put the hgm file anywhere but then put the textures in the same place relative to the location of that hgm.
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 17, 17, 12:27:16 PM
so what you are saying is i need to move the texture folder to be a child of the mesh folder on both mine and the server directory and then go back into maya and set the model to get its texture from that file correct?
Title: Re: Texture Flashing
Post by: FI-ScottZ on May 17, 17, 12:28:44 PM
I updated my answer, but basically, yes.
Title: Re: Texture Flashing
Post by: FI-ScottZ on May 17, 17, 12:38:24 PM
Also of note, this is for the default specifying of textures.  For regular models (not characters) there is the "_MaterialOverrides" property that will allow you to change the texture of a model at run-time for individual instances.  When you have such a model selected, the properties panel will have a line for "_MaterialOverrides" and a button to press for its dialog. You can change some properties there and it will only be for that instance.

If you wanted to do it dynamically from code, what we do is first create a test instance of the model in some area. Then set its  "_MaterialOverrides" properties how we want which sets that property to a long, complicated string.  We then copy that string and set that as the value to a given instance in client-side code as such:

Quote
someHBNodeInstance["_MaterialOverrides"] = complexStringHere

If ["_MaterialOverrides"] is set to an empty string, then it goes back to the default settings as it was exported.

Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 17, 17, 04:41:19 PM
so i did that went back into maya and changed the directory to get the texture to to new file and it still doesnt seem to work
Title: Re: Texture Flashing
Post by: FI-ScottZ on May 17, 17, 07:21:03 PM
Hmm. Try creating a instance of the model somewhere, selecting it, then opening the _MaterialOverrides dialog from the Properties Panel. What does that dialog look like, in particular for the Diffuse texture?  If you click that and navigate to the texture file, does that make the texture show up?
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 17, 17, 10:45:56 PM
ok so it shows up there but when i click on it says its not there, and talks about a different file should i place the texture in the file its looking at ?
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 17, 17, 10:55:53 PM
UPDATE That folder does not exist
Title: Re: Texture Flashing
Post by: HE-SARRENE on May 18, 17, 04:49:47 PM
Hello! Hopefully I can help out here. I see the problem you are having. The textures you have do not match the absolute pathing between your local and the server/Repo.  There are actually a few issues, but lets sort out the texture one first for you to get rid of that bloody flashing for you eh?

ERROR:System:ERROR: Not found (0xFACE000F) loading resource: /c:/users/cory/pictures/herotextures/medieval_brick_wall_sjpg9552.jpg
ERROR:System:ERROR: Not found (0xFACE000F) loading resource: /c:/heroengine/artpipeline/textures/medieval_brick_wall_d.dds

The textures that the tower are looking for are on your c drive, therefor the engine itself cannot find them since it does not have the same pathing. This is also why it is saying that the path/directory does not exist.

Your model is in:
\worldofkingdoms\assets\meshes\blue_tower\blue_castle_tower1.hgm

Therefor it would be good to put your texture for this model in a related directory:
\worldofkingdoms\assets\meshes\blue_tower\textures\medieval_brick_wall_d.dds
-or-
\worldofkingdoms\assets\textures\blue_tower\medieval_brick_wall_d.dds
-or-
anything else similar. (Textures can even be in the same directory as the mesh)

The key thing is to have the assets and textures under the HE\ directories to match 100% HE folder is relative. You can have that anywhere you like on any drive. However anything else inside that must be absolute.

So I would move the texture in a corresponding folder locally inside your HE somewhere, then open the model in max/maya, then select the correct texture in the correct location. Save and re-export. Then upload both the model and the the texture in the same directories to the repo.

Let me know if this works or if you need some more assistance.
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 19, 17, 10:19:56 AM
I am pretty sure I have already done that and it still wont load, unless maybe I'm reading that wrong
Title: Re: Texture Flashing
Post by: Amarak on May 19, 17, 12:54:43 PM
Just to make sure...what is the directory/folder where the texture is on your hard drive? And was it there when you set up the material in Maya? And what is the Directory/Folder for where it is in the Repository?
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 19, 17, 04:22:48 PM
MY PC

C:\HeroEngine\ArtDepot\HE\WorldofKingdoms\Assets\Meshes\Blue_Tower\Textures

REPOSITORY

//HE/WorldofKingdoms/Assets/Blue_Tower/Textures

MAYA

C:\HeroEngine\ArtDepot\HE\WorldofKingdoms\Assets\Meshes\Blue_Tower\Textures
Title: Re: Texture Flashing
Post by: Amarak on May 19, 17, 04:44:13 PM
C:\HeroEngine\ArtDepot\HE\WorldofKingdoms\Assets\Meshes\Blue_Tower\Textures

REPOSITORY

//HE/WorldofKingdoms/Assets/Blue_Tower/Textures

According to this, the Repository doesn't have the Meshes folder in there...but your Image up above does show it so you probably just forgot to put it in this post...hmmm...
Title: Re: Texture Flashing
Post by: Amarak on May 19, 17, 04:49:21 PM
You didn't forget to upload the texture to the repo did you?
And another thought, is the texture very large? It could just take some time to load up in HE.

This also reminds me of another issue I helped with in the past. no-cake had some problems with texture banks, and it turned out part of it was I had to export the objects from Max instead of Maya, so it might be a problem with the Maya Hero Exporter.
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 19, 17, 05:09:15 PM
how would i go about doing that? and I placed the object and waited like 10 min and still nothing
Title: Re: Texture Flashing
Post by: HE-SARRENE on May 19, 17, 10:57:08 PM
Hello and good evening Cory,
    I sent you a PM. :)
Title: Re: Texture Flashing
Post by: Coryxinyaynix on May 19, 17, 11:01:34 PM
I found a work around