TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

MAX - 2022.02.18 - Illumination Textures Missing From Standalone #2144

Closed OldFlak closed 2 years ago

OldFlak commented 2 years ago

2022.02.18 Tuesday Build

MAX doesn't copy over _illumination textures to standalone in this build I still have a few models not updated yet that use the _illumination naming convention

LeeBamberTGC commented 2 years ago

@OldFlak No worries, I will extend support for the emissive system to recognize _illum and _illumination though certainly for our own stock and game kit files we will be using the naming convention of _emissive.

I think this is the same as the issue: https://github.com/TheGameCreators/GameGuruRepo/issues/315

Here is the code we use to detect and include support texture files, let me know if you spot anything odd that might cause your standalone not to include your ILLUM texture:

                int iNewPBRTextureMode = 0;
                if ( cstr(Left(Lower(Right(t.tfile_s.Get(),10)),6)) == "_color" ) iNewPBRTextureMode = 6+4;
                if ( cstr(Left(Lower(Right(t.tfile_s.Get(),11)),7)) == "_albedo" ) iNewPBRTextureMode = 7+4;
                if ( iNewPBRTextureMode > 0 ) 
                {
                    cstr pToAdd;
                    pToAdd=cstr(Left(t.tfile_s.Get(),Len(t.tfile_s.Get())-iNewPBRTextureMode))+"_color."+t.tfileext_s; addtocollection(pToAdd.Get());
                    pToAdd=cstr(Left(t.tfile_s.Get(),Len(t.tfile_s.Get())-iNewPBRTextureMode))+"_albedo."+t.tfileext_s; addtocollection(pToAdd.Get());
                    pToAdd=cstr(Left(t.tfile_s.Get(),Len(t.tfile_s.Get())-iNewPBRTextureMode))+"_normal."+t.tfileext_s; addtocollection(pToAdd.Get());
                    pToAdd=cstr(Left(t.tfile_s.Get(),Len(t.tfile_s.Get())-iNewPBRTextureMode))+"_specular."+t.tfileext_s; addtocollection(pToAdd.Get());
                    pToAdd=cstr(Left(t.tfile_s.Get(),Len(t.tfile_s.Get())-iNewPBRTextureMode))+"_metalness."+t.tfileext_s; addtocollection(pToAdd.Get());
                    #ifdef WICKEDENGINE
                    pToAdd = cstr(Left(t.tfile_s.Get(), Len(t.tfile_s.Get()) - iNewPBRTextureMode)) + "_surface." + t.tfileext_s; addtocollection(pToAdd.Get());
                    #endif
                    pToAdd=cstr(Left(t.tfile_s.Get(),Len(t.tfile_s.Get())-iNewPBRTextureMode))+"_gloss."+t.tfileext_s; addtocollection(pToAdd.Get());
                    pToAdd=cstr(Left(t.tfile_s.Get(),Len(t.tfile_s.Get())-iNewPBRTextureMode))+"_mask."+t.tfileext_s; addtocollection(pToAdd.Get());
                    pToAdd=cstr(Left(t.tfile_s.Get(),Len(t.tfile_s.Get())-iNewPBRTextureMode))+"_ao."+t.tfileext_s; addtocollection(pToAdd.Get());
                    pToAdd=cstr(Left(t.tfile_s.Get(),Len(t.tfile_s.Get())-iNewPBRTextureMode))+"_height."+t.tfileext_s; addtocollection(pToAdd.Get());
                    pToAdd=cstr(Left(t.tfile_s.Get(),Len(t.tfile_s.Get())-iNewPBRTextureMode))+"_detail."+t.tfileext_s; addtocollection(pToAdd.Get());
                    pToAdd = cstr(Left(t.tfile_s.Get(), Len(t.tfile_s.Get()) - iNewPBRTextureMode)) + "_illumination." + t.tfileext_s; addtocollection(pToAdd.Get());
                    pToAdd = cstr(Left(t.tfile_s.Get(), Len(t.tfile_s.Get()) - iNewPBRTextureMode)) + "_illum." + t.tfileext_s; addtocollection(pToAdd.Get());
                    pToAdd=cstr(Left(t.tfile_s.Get(),Len(t.tfile_s.Get())-iNewPBRTextureMode))+"_emissive."+t.tfileext_s; addtocollection(pToAdd.Get());
                    pToAdd = cstr(Left(t.tfile_s.Get(), Len(t.tfile_s.Get()) - iNewPBRTextureMode)) + "_cube." + t.tfileext_s; addtocollection(pToAdd.Get());
                }

Notice that your main color texture needs to be called _color or _albedo to activate the extra includes.

OldFlak commented 2 years ago

@LeeBamberTGC Yes thanks for looking at this Lee.

I don't need this myself, as I am using _emissive on my models and updating them as I prep them for the import process (just updated the few stragglers I had) so I be happy for it to stay as is.

For me this is not an issue, but rather an observation: I was just thinking of when others try to import from Classic, a lot of models out there were using the _illumination extension so it may affect those users.

So is probably ok to close thread :)

OldFlak commented 2 years ago

@LeeBamberTGC Hi Lee just FYI - this is not fixed. Left a few illumination stragglers in order to test. Created standalone with 2022.02.25 Friday release build and still same issue with not being copied to standalone.

Some audio files do not get copied over, and some don't play although they have been copied over.

Also copies over files that are not used at all. For example all particles from both default and custom folders get copied even when only one or two custom ones are used.

LeeBamberTGC commented 2 years ago

@ZakJudges Bouncing any save standalones to you, let me know if you need any insights :)

ZakJudges commented 2 years ago

Hi @OldFlak, I tried to reproduce this one but the standalone had the _illumination correctly copied across. Are you still seeing this issue in the latest build? If so, would you mind sending me a model you are seeing the issue with? Or alternatively, if you let me know the filepath of the texture not being copied over, that may give me some insight as to where things are going wrong :)

OldFlak commented 2 years ago

@ZakJudges Thanks for looking into this

Sorry for late reply. Have not tried for a awhile as Standalones have been quite a mess in other areas since bug bash began.

So made standalone using 2033.03.31 EA.

Issue remains: The bars on this fencing are all meant to be illuminated. image

This is the folder where the illumination texture should be: image

This is the folder where it should be copied from: image

It has always worked fine since MAX was given standalone capability - then it just got broken as of date of op.

Personally I think the time would be better spent on performance as it is still mostly quite bad on outside levels with any complexity.

ZakJudges commented 2 years ago

@OldFlak Thanks for the extra info. I agree that other areas need more work before this so I will change it to medium priority for now :)