OpenTechEngine / OpenTechBFG

Engine based on (RB) Doom 3 BFG aiming to allow the creation of standalone games
Other
84 stars 11 forks source link

Materials not reading png format #59

Closed ghost closed 8 years ago

ghost commented 8 years ago

Png seems to work for light textures, for materials it fails to read the png and replaces it with the shader not found texture.

kortemik commented 8 years ago

Please shared the material definition example.

If I recall right: Also please note that DarkRadiant is unable to use png, just tga but the engine works fine with png. We should also fix that.

On Mon, Jul 27, 2015 at 4:23 AM, Yetta1 notifications@github.com wrote:

Png seems to work for light textures, for materials it fails to read the png and replaces it with the shader not found texture.

— Reply to this email directly or view it on GitHub https://github.com/OpenTechEngine/OpenTechBFG/issues/59.

ghost commented 8 years ago

Engine crashes when loading a map with png textures on materials.

textures/citybuildings/redconc
{
    qer_editorimage textures/citybuildings/concred_ed.tga

    {
            blend bumpmap
        map addnormals( textures/citybuildings/conc00_n.png, heightmap( textures/citybuildings/conc00_h.png, 6 ) )
    }

    {
            blend diffusemap
        map textures/citybuildings/concred_d.png
    }

    {
            blend specularmap
        map textures/citybuildings/concred_s.png
    }
}
DanielGibson commented 8 years ago

Darkradiant and PNG: I think it does support it, just not for doom3, because vanilla doom3 doesn't support it. Try adding <extension>png</extension> to https://github.com/codereader/DarkRadiant/blob/master/install/games/doom3.game#L30 (like it's done in https://github.com/codereader/DarkRadiant/blob/master/install/games/xreal.game). I haven't tried that, but I think it should work.

Regarding the engine crash with PNG textures, I'll try to reproduce/fix that this week (maybe weekend). (Of course, if someone else beats me to it that'd be fine too)

btw @Yetta1 if you wanna post code-like text snippets (like material definitions), try enclosing it in three backticks each, like

```
yourcode = 1;
more_code();
```

which will produce

yourcode = 1;
more_code();
ghost commented 8 years ago

Oh thank you for the tip, was wondering how that was done. I'm not using Doom 3 anymore, only OTE. I have to restart the map, there was a bug in Darkradiant that appears once in a while when it autosaves, creating duplicates of selected brushes, unfortunately i had all the brushes selected when that bug kicked in, couldn't undo.

Deleted all the duplicates in Blender after exporting to .obj, but importing it as brushes again in radiant splits the brushes into planes, so it fails to build under dmap. Not too happy about it, but a restart is the only choice. :/

DanielGibson commented 8 years ago

pull the latest changes and rebuild, the bug should be gone :-)

ghost commented 8 years ago

Thank you Daniel. Will build later tonight.