Jump to content

FreshLook

Members
  • Posts

    132
  • Joined

  • Last visited

Everything posted by FreshLook

  1. I didn't know that facial bones don't count. I have started to write all the constraints for art content here: https://github.com/Arbos/nwn2mdk/wiki/Tutorial:-FBX-to-MDB-GR2-(drag&drop) In Blender, the default options for exporting a FBX causes simplification of the animation (Armature tab, Simplify = 1.0). So, if all the keyframes of a channel have the same value, the channel isn't exported. For an idle animation, the exported FBX won't contain any animation, so the tool won't generate .anim.gr2. You can set Simplify to 0.0 to disable simplification.
  2. I have finished updating the tutorial about animating the banner of Tyr for version 0.4. https://github.com/Arbos/nwn2mdk/wiki/Tutorial:-Animated-Placeable I'm wondering what future tutorials would be more useful: Animated placeable with attached parts and multiple states (close, open, ...).Creating animated creature from scratch....For next version of the tool, I'm planning adding checks like checking that a skeleton has no more than 54 bones (the maximum supported by NWN2 I think).
  3. I think I'll implement the following: Get rid of the cmd files.Drag&drop directly to nw2fbx.exe and fbx2nw.exe.If the tool is executed from command line, print messages to console.If the tool is executed directly (double-click, drag&drop, ...), print messages to log.txt.
  4. You can also drag&drop directly to nw2fbx.exe and the output should be generated in the same directory as the input files, but it won't generate log.txt because the messages will be printed to the console. In fact, the function of the cmd is only to redirect the messages to log.txt. Could you try to drag&drop directly to nw2fbx.exe? If it works, I would think about getting rid of the cmd files and making the binaries to print the messages to log.txt in addition to the console.
  5. Nice :smile: Does the drag&drop work then or are you using the command line? The drag&drop should generate the output in the same directory that the model and the command line should generate the output in the current directory. More technically, the tool always generate the output in the current directory, what happens is that when you drag&drop a file to an executable, the current directory is where the dragged file is located.
  6. I have released version 0.4. You can download it here: https://github.com/A...wn2mdk/releases Changes: - A skeleton no longer is needed to convert animated placeables.- When converting animated placeables to FBX, all models are positioned and animated correctly.- Fixed issue where drag&drop didn't work if the path to the MDK contained spaces. Working with animated placeables has been simplified. I'll have to modify the tutorial about animating the banner of Tyr (two steps removed and Step 3 simplified). :smile:
  7. I found the bug. It's trivial to fix: edit *-dragdrop.cmd and enclose the command with quotes. For example, replace: %~dp0fbx2nw %* > log.txt 2>&1 with: "%~dp0nw2fbx" %* > log.txt 2>&1 I think this bug is too trivial to make a new release just because of this. Can you edit the cmd? It'll be fixed in the next version, I'm working on simplifying animated placeables.
  8. I think I can simplify working with animated placeables in a way that would solve the issue at the same time. I need to analyze it, not sure if it'll be complex to implement. Have you been able to modify an existing animation? I don't know if you finally did what you wanted.
  9. The skeleton for PLC_MC_ARMY01 is within PLC_MC_ARMY01.GR2. You must convert: PLC_MC_ARMY01.MDB and it's attached models.PLC_MC_ARMY01.GR2 which contains the skeleton.And an animation.I only see two animations for the armoire: PLC_MC_ARMY01_IDLE.GR2 which contains an idle animation with the doors closed and PLC_MC_ARMY01_PLC_OPENIDLE.GR2 which contains an idle animation with the doors open. I'm not sure how the armoire opening/closing animation is done within the game, I guess that the opening/closing animation is the result of the interpolation performed in the transition from the closed-idle animation to the open-idle animation and viceversa. It's the same interpolation tha occurs when, for example, a creature transitions from the walk animation to the run animation. The doors are displaced from their expected positions because the tool doesn't link placeables to the skeleton. For creatures the model is linked to the skeleton through skinning (SKIN packet), but placeables doesn't have skin information. The easiest and logical solution would be that each placeable model is parented to the corresponding bone, but as I explained in a previous post, Blender doesn't import the child-parent relationship between objects and bones from FBX. I decided to not invest more time on this issue because: a) skeletons for placeables usually have few bones so it isn't a lot of work to manually link each placeable model to the corresponding bone and b) I don't know if converting animated placeables to FBX is going to be used a lot. But I would like to get your feedback.
  10. I have released version 0.3. You can download it here: https://github.com/Arbos/nwn2mdk/releases It has all the features I planned for version 1.0. It should be a complete replacement for Expotron plus it's also Impotron. When it's very well tested and polished so to consider it production-ready I'll release version 1.0. Now I could focus on writing tutorials. What would be the most interesting topics? Changes: - Added bone scaling.- Added material flags for rigid meshes and skin meshes.- Complete support for walk meshes.- Added conversion of: collision spheres, hair packets, helm packets and hook packets.- More accurate conversion of animation curves from GR2 to FBX. The animations are now smoother.- Improved keyframe times accuracy (probably unnoticable).- Now nw2fbx also checks for existing tga files and not only dds.- Now fbx2nw doesn't generate MDB if it would be empty.- Now input files can be dragged from any directory and not only from the MDK directory.- Improved log messages.- Fixed issue where nw2fbx missed skeletons contained in some GR2 files.- Fixed issue where nw2fbx didn't always match a model to the right skeleton.- Fixed issue where nw2fbx didn't export the last frame of an animation.- Fixed crash when a bone index was out of bounds. Now a warning message is printed.
  11. I plan to make some changes this week and then I'll release 0.3, probably saturday or sunday. I have an issue with collision spheres. The ideal solution when converting MDB/GR2 to FBX would be that each collision sphere is linked (parented) to the corresponding bone. However, Blender doesn't import the child-parent relationship between objects and bones from FBX. Maybe other DCC's support it, but since I want it to work with as many applications as possible, I have decided to position each collision sphere at the position of its corresponding bone without parenting. When converting FBX to MDB/GR2, the tool associates a collision sphere with it's nearest bone, whether if it's parented or not. In Blender, before modifying a skeleton or when creating a new one, you can add a "Child Of" constraint between each collision sphere and its bone so the collision spheres move with the bones. I suppose there is something equivalent in others DCCs.
  12. The tool will only create bones if there are bones in the input files. You should also convert the file containing the skeleton, which in this case is PLC_NT_Myrkul_roid04.GR2, however, I tried it and the tool doesn't find any skeleton within the file. After investigating it, I found out that the file contains a skeleton but not exactly in the way the tool expects. I need to generalize the code for finding skeletons.
  13. Are you dragging from a directory different than where nw2fbx is located? Currently, the drag&drop only works if the dragged file is in the same directory that nw2fbx. In the next version it'll work from any directory. When executing from the command shell, where are you located? Where is config.yml located?
  14. The tool isn't tied to Blender at all, it's only tied to FBX. You can use any application that supports FBX. When I test a FBX or show something, I only use Blender because I don't have other applications. Maybe this has given the impression that my tool is tied to Blender. The goal of my tool is to interoperate with as many applications as possible (3ds Max, Maya, ...). I chose FBX because, according to my research, it was the most robust format in terms of support across several applications. Since the FBX format hasn't been completely reverse engineered, the only way to fully process FBX is by using the FBX SDK from Autodesk, which is free, but it's incompatible with the GPL license, which is why Blender doesn't use it. My tool isn't GPL, so I don't have issue using it.
  15. Thank you. Very excited about what you did. I have investigated and reproduced the crash. It happens because it tries to link the MDB to the wrong skeleton, the code doesn't handle this right and crashes. For example, you pass P_HHM_skel.GR2, P_HHMtail_skel.GR2, P_HHMcapewing_skel.GR2 and P_HHM_NK_Body01.MDB. The tool tries to link the model to the first skeleton it finds and it found the tail or capewing skeleton. I have to find a way to detect what is the right skeleton for a model. There is a workaround, though: Convert P_HHM_NK_Body01.MDB + P_HHM_skel.GR2. The tool will link the model to the right skeleton because that's the only one passed. Import FBX. Convert P_HHMtail_skel.GR2 + P_HHMcapewing_skel.GR2. Import FBX and then you have all the pieces together.
  16. I don't know much about animation, but Blender supports IK and I suppose other programs too. When Blender exports to FBX it bakes the animation. My tool will convert FBX to GR2 without problem.
  17. I have added bone scaling to the tool. GR2 format has a range of encodings for animation curves. The tool supports the encodings used in Kalister's frog and sphincter. If I find another encoding in the future, I will add it. Kalister's frog also uses bone shear. FBX doesn't support bone shear. I'm ignoring bone shear when converting GR2 to FBX. I don't think that's a important feature: Blender doesn't support it either and I think the same effect can be achieved with the proper translations, rotations and scaling.
  18. I have taken a look. The portcullis door has two attached models: half door at the bottom and half door at the top. The animation consists of the bottom model rising faster than the top model, making the overlap between the two models increase over time. There is no bone scaling.
  19. Thank you. The following is still pending: HAIR, HELM and HOOK packets. Bone scale: I know that GR2 supports bone scale animation. I didn't find any vanilla GR2 that uses it so I didn't investigate it. Now I'm looking the frog created by Kalister68 which uses it. Test it enough to not be considered alpha or beta.
  20. I added conversion of collision spheres to MDB. Now the tool has all the features needed to create new creatures from scratch, although I haven't tried to create one. I have also written a tutorial showing how to animate a placeable (the banner of Tyr): https://github.com/Arbos/nwn2mdk/wiki/Tutorial:-Animated-Placeable
  21. I have added conversion of collision spheres to FBX. Next I will do conversion of collision spheres to MDB. When I have developed the planned features, I'll write tutorials. There is little left, look here: https://github.com/Arbos/nwn2mdk/issues By the way, I have found a way to export a skeleton to FBX in rest position even if it's animated. Before exporting, select the skeleton, go to the armature tab and click "Rest position" button. It will not export animations, so conversion from FBX to GR2 should only generate GR2 skeleton. Then click "Pose position" to return to animation edition.
  22. Based on your quote here, it appears you work with the skeleton / animation separately? I tried importing Skel / GR2 / MDB at the same time into one FBX. I renamed the Skeleton and modified the animations, exported and then used those files. Is this wrong? If you export the skeleton along the animation, the skeleton will be exported to FBX as it's posed in the current frame (this happens with Blender, with other apps I don't know). I tried the trick of reseting the translation, rotation and scaling of the bones before exporting and it doesn't work. So to ensure the exported skeleton is in it's default pose, I first work with the skeleton alone , rename it, export it to FBX, convert it to GR2 and this file will be the final skeleton. Then I work with the skeleton + animation + (optional) mdb, export it to FBX, convert it to GR2 but I only use the GR2 animation file.
  23. I set the name of root bone to "test" and the animation works, although I have tested it again to be sure and the toolset crashes often. Yes, the root bone has to be exactly as the part before _skel or _<animation>. And you need to have a static gr2 file, which as far as I know defines how the bones are linked together, and what their origin is. Then, the animations files store the move/rotate/resize changes of the bones during the animation. Are you sure about the root bone name? We must distinguish three names: The name of the GR2 file. The name of the skeletons or animations that the GR2 file contains. The name of the root bone of a skeleton.Some gr2 files I have examined: P_HHM_skel.gr2: Skeleton name: P_HHM_skelRoot bone name: P_HHM_skelP_HHM_skel01.gr2: Skeleton name: P_HHM_skelRoot bone name: P_HHM_skelP_HHM_skel02.gr2: idem. N_Aldanon_skel01.gr2: idem. N_Lorne_skel01.gr2: idem. P_HHMcapewing_skel.gr2: Skeleton name: P_HHMcapewing_skelRoot bone name: P_HHMcapewing_skelThe pattern I see: The skeleton name doesn't need to match the file name, but follows a convention. For example, it seems that all human male skeletons are named P_HHM_skel.The root bone name matches the skeleton name.
×
×
  • Create New...