• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
In the materials properties of your object, you can assign materials based on faces selected in edit mode. Assign your faces to dumby materials (diffuse node setups in cycles). When ready to export, create the number of dumby materials you have as PDX materials (left side in the pdx tools menu), name them so you remember and write it down.

Later, in your gfx code, you can use meshsetting = {} blocks to assign each shader a diffuse texture, a normal texture, and a specular texture.

If you are looking to use different UV layouts as well, just make sure to have your UV's set up properly, in one uv set. I'm not sure if you can "merge" uv sets in blender, but from my testing i can't figure out how to export multiple uv sets. This also means you can't have diffuse-specific uv layouts!

https://docs.google.com/document/d/...SH6yMTymA8B0jpTog/edit#heading=h.kmyblpvdg80d

You can find the relevant section in my guide here.

Just to recap:
Assign sections of your mesh to different material slots
Assign PDX Shaders created with the tool to those material slots
Use meshsettings = {} blocks to call each shader (that you made earlier) and assign your textures
 
Oh I think I managed to figure out how to apply Code's solution.

I think it wasn't enough to just insert a keyframe and then "shift it" left/right on the dopesheet. But to actually grab the point on the F-Curve (say the X quaternion component) and then move it up/down a couple of sticks to create the more "triangular" looking curve.

AFAIK this should do weird things to the quaternion but it seems to work?

I've never normalized my keyframes before, and I'm not 100% sure what I'm looking at haha, but could you do this process without using linear interpolation? The issue definitely stems from some bug with the math somewhere due to the acceleration of a bone, which you only see with non-linear graphs (2nd derivative of it for a line is 0). As for the baking question, I use constraint based rigs, so it's imperative to bake off, as for sampling, ross' plugin automatically "samples" in that it exports every transform every frame, but I like to sample ahead just to make sure that it works, as those are REAL keyframes, not just a visual representation of blender's interpolation.
 
In the materials properties of your object, you can assign materials based on faces selected in edit mode. Assign your faces to dumby materials (diffuse node setups in cycles). When ready to export, create the number of dumby materials you have as PDX materials (left side in the pdx tools menu), name them so you remember and write it down.

Later, in your gfx code, you can use meshsetting = {} blocks to assign each shader a diffuse texture, a normal texture, and a specular texture.

If you are looking to use different UV layouts as well, just make sure to have your UV's set up properly, in one uv set. I'm not sure if you can "merge" uv sets in blender, but from my testing i can't figure out how to export multiple uv sets. This also means you can't have diffuse-specific uv layouts!

https://docs.google.com/document/d/...SH6yMTymA8B0jpTog/edit#heading=h.kmyblpvdg80d

You can find the relevant section in my guide here.

Just to recap:
Assign sections of your mesh to different material slots
Assign PDX Shaders created with the tool to those material slots
Use meshsettings = {} blocks to call each shader (that you made earlier) and assign your textures
I managed to figure out my previous predicament, I needed to separate 2 joined meshes to the textures would apply to only those parts, now I need to figure out how to add a glow map
 
My issue with the flickering/spazzing animations (specifically my hair bones) have returned. :(

I was working on a different set of assets for a different custom species portraits and while every part of the skeleton appears to be fine; the hair bones will randomly freak out and only for two subsets of hair bones (Short hair and very long hair).

I've tried:
-Adding an additional duplicate keyframe after each key frame to add a slight "drag".
-Taking those duplicate keys and slightly reversing the rotation/animation.
-Doing rotations one bone at a time (prev. was all of them via "individual origins")
-Rotating just one bone *period*.
-Playing with the F-curve in random ways.
-Setting interpolation mode to linear.
-Extrapolation to cyclic.

No success. While "Ponytail", and "Long" hair sub-armatures are all fine without notable issue.
 
Now that mesh export is working in Maya I am going to ignore animation export for now and focus on finishing the Blender version of this tool. Happily much of the code I've written is not Maya specific, so it will progress fairly quickly.

the "export animation" box is grayed out because of that, right? Or am I missing some newer information?
 
Your guide is really very helpful in every way, thank you for the effort to write this!

But I have another problem:
When I try to export this error pops up: "animation export failed unsupported animation speed. film"
My Playback speed is realtime. I baked the keyframed before trying to export. I only rotated joints to create a walking animation, no IKs used.
Are there any special settings I need to change in maya?

When I import the cavalry mesh and a cavalry animation the export works fine without changing any settings.

Maybe some important settings are:

Framerate: 24 fps
Playback Speed: realtime - 24 fps x 1
Playback start/end: 1 49
Animation start/end: 1 250

Default in tangent: Linear
Default out tanget: Linear

Steps before current frame: 3
Steps after current frame: 3
Frames per step: 3

I attached a .ma file with my Model and Animation. Maybe it helps to understand my problem.
I hope I haven't overlooked an already given solution. If that was the case, I'm sorry, of course.

EDIT1:
Okay I found out that the animation have to be in 30 fps. I think I already read that somewhere. At least a simple fix. When I switch to 30fps my animation begins at frame 1.25 and that's not supported, right now I am looking for how to move the whole animation to another starting frame ^^

EDIT2: Oh yesss Its working! Btw thanks to this forum it carried me the last 2 month through my modelling work :D I'll leave this post if someone has the same problem as I had.
Have a nice weekend.
 

Attachments

  • ATRTwAnim.zip
    1,1 MB · Views: 13
Last edited:
You can also animate higher than 30 FPS, I animate at 60, I just don't think sub 30 is supported due to the way the clock works most likely, might also have issues with weird framerates like 72 or 53 etc etc
 
Good morning!

Maybe I'm asking a trivial question. But I'm newbie to 3D modeling. So, Why I can`t export .mesh file? I can export animation but not mesh/pdx.
Screenshot
https://ibb.co/dMP5dVV
Code:
    def execute(self, context):
        try:
            export_meshfile(
                self.filepath,
                exp_mesh=self.chk_mesh,
                exp_skel=self.chk_skel,
                exp_locs=self.chk_locs,
                merge_verts=self.chk_merge
            )
            self.report({'INFO'}, '[io_pdx_mesh] Finsihed exporting {}'.format(self.filepath))
        except Exception as err:
            msg = '[io_pdx_mesh] FAILED to export {}'.format(self.filepath)
            self.report({'WARNING'}, msg)
            self.report({'ERROR'}, err)
            print(msg)
            print(err)
            raise

        return {'FINISHED'}

// This is a piece of code containing lines 416 and 422


    if len(blender_meshobjs) == 0:
        raise RuntimeError("Nothing to export, found no meshes with PDX materials applied.")

// This is a line 1063
 
Last edited:
you need to create a paradox shader from the plugin GUI, then assign it to your object material slot(s). If you just make a new material it won't export, as that is how the plugin distinguishes shader objects for the .mesh format.
 
Blender officially released version 2.8! Hopefully there isn't much trouble in updating the plugin for the new version, very excited to combine to one version in the soon(tm) future
There is some trouble doing it, but it's not unexpected as lots of changes were made to Blenders API. But I've already started work on it. :) Next update will have both 2.79 and 2.80 versions, then I'm probably going to drop 2.79 support.

the "export animation" box is grayed out because of that, right? Or am I missing some newer information?
I need to make a new thread or update the OP at some point yeah. This link is for the LATEST RELEASE there are still some work in progress bits, but mesh and animation export does work.

Maybe some important settings are:

Framerate: 24 fps
Animation speeds are allowed to be 15, 30, 60 (possibly 60 is just in my development version atm). I am debating whether to remove that requirement though, as the game will support any speed really (though you're making difficult work for yourself if you make a 12.75fps animation!) But as you've found, changing scene framerate will make all your keys appear between frames instead of directly on them.
 
I seem to have found an import bug. When importing flat objects (planar) it likes to recalculate the normals /flip them. There was another bug with texture locations, though I made an issue on the git as I'm not sure what is going on there.
 
Gosh.. okay I'm still having trouble with this. All I want to do is have a 3d model of a space ship in stellaris with a normal map, diffuse, and specular map work inside my mod, and have it be easier than using jorodox to set up. Not interested in learning animations yet or anything. Hrrrmmmm...