• 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.
Showing developer posts only. Show all posts in this thread.
Thanks you two :) Having been my first 3d model I decided I could do a tiny bit better and set out to do it, I feel I did everything the same, but this time it refuses to show ingame despite showing fine in JoroDox, I tried resizing it ingame but it's quite simple invisible for some reason. Could you help me out Joror?

https://www.dropbox.com/s/0sq2yln0h5e87gh/Shield.blend?dl=0

Tried your model, and it is all good, except for one thing - it was facing the wrong way! :eek:

You had the shield facing 'away' from the front (in blender, it should be facing in the direction of the green arrow) - and since your model only has front-facing triangles, you see nothing when looking at the back. :p

UymCGww.jpg
 
Hey, I few questions (regardin Ck2)
1. Does ck2 support some shader with transparency?
2. Can I define my own shaders (I think I can did you try it?)
3. How to set attachment points for weapons and shields.

1. Hmmm, no it does not seems to have one that does. But it might be added. Compare the 'gfx/FX/pdxmesh.lua' of CK2 with the one from EU4. (EU4 has transparant shaders)

2. Yes. And if you want non-animated models to display properly in CK2, you will need to use my 'gfx/FX/pdxmesh.lua' shader definition. (that is broken in CK2s shader) It is included in the Mod example in the first post.

Note: tweaking/adding shaders is a bit expert-level. I have successfully done it in EU4. (see the EU4 mod example file in the EU4 thread for this tool)

3. I think by naming relevant bone-skeleton nodes 'Left_hand_node', 'Right_hand_node' and 'Head'. Have not tried that myself in CK2. Maybe look at the Charlemange DLC for examples. (expand 'dlc/dlc045.zip' and then look at the contents with the Jorodox tool)
 
How is this project going? I ask as it would be very nice to be able to import some models for the necromancy applications of my magic mod :p
Well while it is a process where you need to poke & try a bit, you can currently import your any 3D model (that you can get/convert to the Collada format) into CK2 and EU4. Animations are also possible.

Some things that are currently not possible, but might be in the future:
- Export existing models to tweak / change them (and to re-use the animations they might have)
- Adding 'special effects' (like cannon explosions - or laser beams)

Give it a try! I will answer any questions you might get on the way, and troubleshoot. (there are still quite a few things that can go wrong / can be misconfigured)
 
Progress on exporting PdxMesh models from CK2 for tweaking/changing & animation re-use:

78uDNof.jpg


(note: this is a Charlemange DLC model - and yes, he is missing a critical part of his head. That is why you wear helmets, people!)
 
New version!

Primarily has the added functionality of being able to export PdxMesh models from EU4/CK2 to the Collada 3D format.
Exports animation skeleton, texture mapping and skinning information.
Does not (yet) do: export animations
Known issue: the Jorodox tool does not render the 'export' .dae textures properly (but they are correct in the file - a display issue)

Note: Only models in DLCs of Charlemange and later can be read! (the others are in an older format)

7gmUiek.png
 
Is it true that CK2 doesn't support translucent textures on its models at all? LordKee tells me so, but it'd be nice to double check, because we could really use some. For reasons.

Domes/Shields, eh? ;)

This is not currently in the CK2 shader file, but can easily be added:
7yGEchH.jpg


This is a simple sphere with a semi-transparent texture, the mesh with the 'PdxMeshAlphaBlend' shader via the JoroDox tool, which is usually only present in EU4.

To add this 'PdxMeshAlphaBlend' shader to CK2, simply add
<code>
PdxMeshAlphaBlend = {
VertexShader = "VertexPdxMeshStandard";
PixelShader = "PixelPdxMeshStandard";
ShaderModel = 3;
BlendState = "BlendStateAlphaBlend";
}
</code>
to the file 'gfx/FX/pdxmesh.lua' above
<code>
--[[
------------------------------------------------------------
-- Vertex shaders
------------------------------------------------------------
--]]
</code>
which can be found in the ModelExampleCk2 project.
(or can be copied from the CK2 dir)

For transparency in other types of models (skeleton/animated, I would have to poke around a bit more)

(apologies to skipping some other questions by other people, currently a bit busy - but this is a question I already had an answer for ;))
 
  • 3
Reactions:
Hello @Joror , I want to thank you again for making this tool.

I am running into some very, very niche issues with my models that have come around because of the scale reduction of my full map conversion.

Essentially, I'd like to know if there's a way to make a .mesh always face the player. When a unit is moving, the game forces the unit to look in the direction it's moving, meaning if I want to build in an offset into an animation (make an animation slightly displaced to the side), it will always displace to the side of the way it's facing, rather than always displace in the same direction no matter what.
I saw that there was a special shader that would make a mesh "always face the player" and got VERY excited... but it seems to not make any difference whether I export it with that shader or with the standard shader.

This is the problem I am trying to fix:
Hmm that would be a bit tricky, since that rotation is given from the engine. Theoretically that could be 'ignored' by the shader, but it would require writing a new specific shader for that effect. (the one that always faces the player is the Coat of Arms 3D one, but that one also doesn't get rotated by the engine)

If you feel adventurous, you could see if you can create this new shader, but beware, shaders are a deep subject that will take some time to get into and understand.