CSG Papa Conversion Troubles

Discussion in 'Mod Support' started by acesoyster, March 14, 2018.

  1. acesoyster

    acesoyster Active Member

    Messages:
    110
    Likes Received:
    154
    Is there anyone out there who’s had any experience with custom CSG brushes, and the papa conversion process for such files? I seem to be fairly close, but the referenced filepaths for textures in my papa exports are always “pa/filename.papa”, rather than in the appropriate terrain textures folder. Otherwise the system loads my CSG fine, it’s just unfortunately textureless. Can anybody lend a hand?
    okeanos likes this.
  2. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,326
    Likes Received:
    2,118
    What are the steps you take to convert now? Like, what commands and parameters do you use? That might make it easier for us to spot where it goes wrong.
  3. acesoyster

    acesoyster Active Member

    Messages:
    110
    Likes Received:
    154
    So i think I have figured it out. It seems papatran will generate that path correctly if the path to the source file begins with 'pa/'. So I am currently running this command, having put the .fbx and .pngs (in textures) in the pa game folder as specified.

    Code:
    .\papatran.exe "..\..\media\pa\terrain\moon\fbx\crystal_mountain_1.fbx" --texture-mode reference -o "..\..\media\pa\terrain\moon\fbx\crystal_mountain_1.papa"
    When given this output file, papadump generates the following:


    Code:
    2 textures:
        0:
            name: "/pa/terrain/moon/Textures/crystal_mountain_1_diffuse.papa"
            format: TF_Invalid
            width: 0
            height: 0
            mips: 0
            srgb: 0
        1:
            name: "/pa/terrain/moon/Textures/crystal_mountain_1_material.papa"
            format: TF_Invalid
            width: 0
            height: 0
            mips: 0
            srgb: 0
    1 vertex buffer:
        0:
            format: Position3Normal3Color4TexCoord4
            number vertices: 1406
    1 index buffer:
        0:
            format: IF_UInt16
            number indices: 2514
    1 material:
        0:
            shader: "textured"
            0 vector parameters.
            1 texture parameter:
                0:
                    name: "DiffuseTexture"
                    texture index: 0
            0 matrix parameters.
    1 mesh:
        0:
            vertex buffer index: 0
            index buffer index: 0
            1 material group:
                0:
                    name: ""
                    material index: 0
                    first index: 0
                    num primitives: 838
                    primitive type: PRIM_Triangles
    0 skeletons.
    1 model:
        0:
            name: "crystal_mountain_1"
            model2scene:  1.000000   0.000000   0.000000   0.306128
                          0.000000   1.000000   0.000000  -0.871981
                          0.000000   0.000000   1.000000  29.674000
                          0.000000   0.000000   0.000000   1.000000
            skeleton_data: -1
            1 mesh binding:
                0:
                    name: "crystal_mountain_1"
                    mesh index: 0
                    mesh2model: 1.000000  0.000000  0.000000  0.000000
                                0.000000  1.000000  0.000000  0.000000
                                0.000000  0.000000  1.000000  0.000000
                                0.000000  0.000000  0.000000  1.000000
                    0 bone mappings.
    0 animations.
    There are a couple of notable differences from one of PA's CSG .papas.

    • The capital T on textures in the filepath is lowercase in the PA papas. Not sure if it's case-sensitive, but it's still odd.
    • The material format is just 'textured' instead of 'textured_normal', also lacking the second texture parameter.
    • Potentially less relevant, but my vertex buffer is in Normal3Color4 format instead of Normal3Tan3Bin3.
    Uploaded is a zip containing the .fbx and associated pngs.

    Attached Files:

    okeanos likes this.
  4. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,326
    Likes Received:
    2,118
    The capital T could be a problem on macOS and Linux, which have case-sensitive file systems. Is the actual folder called Textures with a capital? I'm not sure why else it would make it a capital.

    I don't know about the other things though as I usually don't do anything with models or CSGs.

    @killerkiwijuice , did you ever do custom CSG?
  5. acesoyster

    acesoyster Active Member

    Messages:
    110
    Likes Received:
    154
    Every texture folder in terrain is lowercase at least. Worst comes to worst I can manually edit that though given it's a single character exchange. I'll keep digging for now.
    okeanos likes this.
  6. mikeyh

    mikeyh Post Master General

    Messages:
    1,882
    Likes Received:
    1,535
    The capital T is from your source directory:
    • D:\CSGPacks\Crystal\Textures\ (make sure your source matches the PA structure)
  7. w33dkingca

    w33dkingca Active Member

    Messages:
    183
    Likes Received:
    59
    Do you think you could also make terrain features like trees to manually usable CSG? I had a go at trying to do it but I couldn't get anywhere.

Share This Page