Garux / netradiant-custom

The open-source, cross-platform level editor for id Tech based games.
https://garux.github.io/NRC/
Other
334 stars 59 forks source link

JPG is looked for even if PNG is specified in a OBJ's MTL file #136

Closed FrancescoBis closed 1 year ago

FrancescoBis commented 1 year ago

OBJ Models try to use JPG files as textures even if filepaths to PNGs are specified in the MTL file, this also happens when there's no JPG file at all resulting in the model being displayed with missing textures. EDIT: This happens to MD3 models too, not sure if there's a way to specify PNG files for MD3s.

Garux commented 1 year ago

Tools handle paths as shader names, not raw texture paths. Game engine does the same, you have no way to say it to use this format of clashed texture name and not that.

missing textures

png should be displayed, if it is enabled in config for your game, likely it's not.

FrancescoBis commented 1 year ago

Tools handle paths as shader names, not raw texture paths. Game engine does the same, you have no way to say it to use this format of clashed texture name and not that.

missing textures

png should be displayed, if it is enabled in config for your game, likely it's not.

The missing textures are not missed in the game, they are missed in NRC, I can see them ingame as I have a map with those same models made with NR.

Garux commented 1 year ago

This is long chain with many variables to use it for conclusion. Does NRC display any png for you? How does NR display these models?

FrancescoBis commented 1 year ago

This is long chain with many variables to use it for conclusion. Does NRC display any png for you? How does NR display these models?

NR displays the PNG texture as is while NRC shows the "SHADER NOT FOUND" texture. Can you reproduce this issue?

Garux commented 1 year ago

No, works as expected. Faster way would be to examine concrete issue, e.g. if you would provide model, textures and game name.

FrancescoBis commented 1 year ago

No, works as expected. Faster way would be to examine concrete issue, e.g. if you would provide model, textures and game name.

The game is Enemy Territory (Legacy), I'm pretty sure it happens with any model as I have had this issue with 3 models (all of them exported using Blender 3.6).

Garux commented 1 year ago

png should be displayed, if it is enabled in config for your game, likely it's not.

Enemy Territory

it's not

FrancescoBis commented 1 year ago

png should be displayed, if it is enabled in config for your game, likely it's not.

Enemy Territory

it's not

Then why can I see the same models with the PNG textures applied in the game (at least when building through NR) ?

Garux commented 1 year ago

Game is not related. We're speaking about problem in radiant and about its config for your game.

FrancescoBis commented 1 year ago

Game is not related. We're speaking about problem in radiant and about its config for your game.

Oh sorry, I misunderstood then. Is the config you're talking about the one found in "gamepacks/et.game"? If so, is there a way I can let NRC to display PNGs for ET?

Garux commented 1 year ago

gamepacks\games\et.game, add png to texturetypes

Garux commented 1 year ago

Btw there are many model formats supported now, e.g. FBX, q3.game for reference.

FrancescoBis commented 1 year ago

gamepacks\games\et.game, add png to texturetypes

Thanks, it worked! I'm not sure if it'd be good idea to commit the change as I'm not sure about the ET capabilities as opposed to ETL ones.

Btw there are many model formats supported now, e.g. FBX, q3.game for reference.

I know, I've seen the various model type extensions in the menu, as of now I was using md3 instead of obj cause of this issue but I've noticed md3 has a details limit.

ensiform commented 1 year ago

gamepacks\games\et.game, add png to texturetypes

Thanks, it worked! I'm not sure if it'd be good idea to commit the change as I'm not sure about the ET capabilities as opposed to ETL ones.

Btw there are many model formats supported now, e.g. FBX, q3.game for reference.

I know, I've seen the various model type extensions in the menu, as of now I was using md3 instead of obj cause of this issue but I've noticed md3 has a details limit.

ETe and ETLegacy both support png so I don't see any reason why not support png in the et config. Vanilla q3a doesn't support png either but nobody uses it anymore.

Garux commented 1 year ago

Ok, let's add it.