Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Modding

Reply
 
Thread Tools
Old 02-04-24, 23:10   #361
Czarpos
Member
 
Czarpos's Avatar
 
Joined: May 2016
Posts: 106
Default Blender Addon Update

Updated Blender TRM plugin to v0.7.0!
Here's another update to the addon and moved to my GitHub page instead of sharing dropbox file links. Main major features are armatures and Photo Mode poses! You can now load, edit and mod new poses for Lara into the game.

Download link: Blender Addon GitHub
Click on the releases on the right side of the page where it says "TR123R Blender Addon v0.7.0" and download the zip file. Hopefully there won't be a need to keep lurking to get new updates since an auto-updater has been integrated into the addon, enjoy!

Installation goes as always - File->Preferences->Add-ons->Install and choose the .zip file. If you have other TRM plugin versions installed, disable them first.

Full documentation of everything that you may want to know can be found on the GitHub page as well, so if you're struggling with understanding some solutions here, refer to GitHub. If there's something I missed that you think should be added, let me know.

Changelog:
  • attempting to fix errors on disabling/enabling the addon
  • integrated an automatic addon updater
  • added some missing vertex group names on head import
  • added tools for Photo Mode Poses (import/export, enabling/disabling)
  • armatures should be imported with Lara models now
  • added Skeleton Data Generator to Addon Preferences
  • updated paths in Addon Preferences
  • fixed error on importing models for Blender 4.1
  • added UI information on error caused by "Merge by UVs" option on some imported models
  • cleanup of some names and descriptions
Czarpos is offline   Reply With Quote
Old 03-04-24, 12:49   #362
MuruCoder
Member
 
MuruCoder's Avatar
 
Joined: Jan 2018
Posts: 1,333
Default

Congratulations, nicely setup Github README as well.

So many codes I wonder how bigger this'll get.

So about that lone integer formatted pose. In pose_ops.py:
Code:
# TODO: INTEGER PROCESS LATER !!!
x,y,z = [0]*3
Something like this seems to import it, optimise to your liking. For export don't bother of course, I'd say just keep them all in ZYX() format.

Code:
# angle 
a = int(angles[f])
# 10 bits per component
x = (a >> 20) & 0x3ff
y = (a >> 10) & 0x3ff
z = a & 0x3ff
# convert angle
x = -x % POSE_ANGLE_SCALE
x = (x / POSE_ANGLE_SCALE) * tau
y = -y % POSE_ANGLE_SCALE
y = (y / POSE_ANGLE_SCALE) * tau
z = -z % POSE_ANGLE_SCALE
z = (z / POSE_ANGLE_SCALE) * tau
Click image for larger version

Name:	pose_integer_angles.jpg
Views:	30
Size:	116.3 KB
ID:	4561
MuruCoder is offline   Reply With Quote
Old 03-04-24, 15:25   #363
Tms2
Member
 
Joined: Apr 2024
Posts: 11
Default

Great job! No more animating using a calculator. Already created a pose that's quite complex.
Tms2 is online now   Reply With Quote
Old 03-04-24, 16:23   #364
another_tr_fan
Member
 
another_tr_fan's Avatar
 
Joined: Feb 2020
Posts: 7
Default

Hey everyone! First of all, thank you and congratulations on the amazing work on all the work you've done so far!
I get this error with 7.0 whenever I try to import a TRM File into Blender:
Python: Traceback (most recent call last):
File "C:\Users\deles\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\iosceneTRR1-3\trm_import.py", line 770, in execute
bpy.ops.io_tombraider123r.generate_skeleton_data()
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\4.0\scripts\m odules\bpy\ops.py", line 109, in __call
ret = _op_call(self.idname_py(), kw)
RuntimeError: Operator bpy.ops.io_tombraider123r.generate_skeleton_data.p oll() failed, context is incorrect

I went back to 6.2 and it works just fine. The error persists regardless of how many options i check/uncheck as far as i've tried.
Also, this is is on Blender 4.0 but Ive also updated to 4.1 and I still get this.
Hope you can look into it soon! Can't wait to try this update
another_tr_fan is offline   Reply With Quote
Old 03-04-24, 18:42   #365
Czarpos
Member
 
Czarpos's Avatar
 
Joined: May 2016
Posts: 106
Default

Quote:
Originally Posted by MuruCoder View Post
Congratulations, nicely setup Github README as well.
Thanks, glad you like it!

Quote:
Originally Posted by MuruCoder View Post
Something like this seems to import it, optimise to your liking. For export don't bother of course, I'd say just keep them all in ZYX() format.
Oh awesome, you figured it out, well done! I'll incorporate it into the addon on the next update. I also agree that it's best to stick with just the euler format, though I wonder how on earth they ended up with integers for that single line.

Quote:
Originally Posted by another_tr_fan View Post
I get this error with 7.0 whenever I try to import a TRM File into Blender
Seems like I didn't do a safe check if Game Directory is set up and while I did write about it in the documentation on the github page, it's still a good catch, thanks! That said, just fill out a path in Game Directory field in the preferences and it should work fine.

EDIT: actually just bad operator call that somehow slipped through my tests, I'll get it fixed

Last edited by Czarpos; 03-04-24 at 18:47.
Czarpos is offline   Reply With Quote
Old 04-04-24, 08:47   #366
Jiraz
Member
 
Jiraz's Avatar
 
Joined: Feb 2024
Posts: 131
Default

however still doesn't work, if i divide into 2 materials the lion body (material A) is visible but still remain a strange ghost effect around the layers of the mane (material B), the transparent areas erase the tufts of the mane underneath.

maybe this thing isn't really designed by the game engine, i think i'll just delete the transparent part and model the mane in 3D
Attached Thumbnails
Click image for larger version

Name:	cdddd.jpg
Views:	14
Size:	208.3 KB
ID:	4622  
Jiraz is online now   Reply With Quote
Old 04-04-24, 09:07   #367
MuruCoder
Member
 
MuruCoder's Avatar
 
Joined: Jan 2018
Posts: 1,333
Default

If you want I can experiment too. Upload the blend file and textures somewhere and DM me the link.
MuruCoder is offline   Reply With Quote
Old 04-04-24, 09:21   #368
ObiHan Skywobi
Member
 
Joined: Mar 2024
Posts: 12
Default

Quote:
Originally Posted by Jiraz View Post
however still doesn't work, if i divide into 2 materials the lion body (material A) is visible but still remain a strange ghost effect around the layers of the mane (material B), the transparent areas erase the tufts of the mane underneath.

maybe this thing isn't really designed by the game engine, i think i'll just delete the transparent part and model the mane in 3D
There are different types of alpha transparencies in game engines and they can give you all sorts of trouble. What you're seeing is a sorting issue, the game engine basically doesn't know in which order to draw the geometry. Sometimes, game engines offer modes to select whether to sort alpha transparencies automatically (by z-depth from the camera), sometimes there are ways to implicitly force a drawing order, by vertex oder in the geometry (vertices which have a higher number in the model get drawn later than earlier ones -> this may result in the shown error when the transparent triangles are drawn first, you can try to detach and re-attach them to the model to sort them last).

Another way is to use hard cut-out (alpha test instead of alpha blend) - the drawback of this is that it doesn't allow partial transparency, it will always be a hard cut-off at a certain alpha value. The benefit is that it renders faster and it also doesn't suffer from sorting issues.

Having that said, I don't know if the TRR engine even offers this split between alpha test and alpha blend.
ObiHan Skywobi is offline   Reply With Quote
Old 04-04-24, 09:23   #369
ObiHan Skywobi
Member
 
Joined: Mar 2024
Posts: 12
Default

Quote:
Originally Posted by Czarpos View Post
Updated Blender TRM plugin to v0.7.0!
Here's another update to the addon and moved to my GitHub page instead of sharing dropbox file links. Main major features are armatures and Photo Mode poses! You can now load, edit and mod new poses for Lara into the game.

Download link: Blender Addon GitHub
Click on the releases on the right side of the page where it says "TR123R Blender Addon v0.7.0" and download the zip file. Hopefully there won't be a need to keep lurking to get new updates since an auto-updater has been integrated into the addon, enjoy!

Installation goes as always - File->Preferences->Add-ons->Install and choose the .zip file. If you have other TRM plugin versions installed, disable them first.

Full documentation of everything that you may want to know can be found on the GitHub page as well, so if you're struggling with understanding some solutions here, refer to GitHub. If there's something I missed that you think should be added, let me know.

Changelog:
  • attempting to fix errors on disabling/enabling the addon
  • integrated an automatic addon updater
  • added some missing vertex group names on head import
  • added tools for Photo Mode Poses (import/export, enabling/disabling)
  • armatures should be imported with Lara models now
  • added Skeleton Data Generator to Addon Preferences
  • updated paths in Addon Preferences
  • fixed error on importing models for Blender 4.1
  • added UI information on error caused by "Merge by UVs" option on some imported models
  • cleanup of some names and descriptions
That's awesome man, thank you so much! I've tried it, it seems to even work with Blender 4.0.

Just for shits and giggles, I overlayed my brute-forced armature with the original one imported from the game. I must say, I shed a small tear of pride...
Attached Thumbnails
Click image for larger version

Name:	Armature_Overlay.png
Views:	18
Size:	374.7 KB
ID:	4623  
ObiHan Skywobi is offline   Reply With Quote
Old 04-04-24, 14:25   #370
Tms2
Member
 
Joined: Apr 2024
Posts: 11
Default

Quote:
Originally Posted by ObiHan Skywobi View Post
That's awesome man, thank you so much! I've tried it, it seems to even work with Blender 4.0.

Just for shits and giggles, I overlayed my brute-forced armature with the original one imported from the game. I must say, I shed a small tear of pride...
You really should be, because it was really well done!

I created a Pose creator of sorts:
https://drive.google.com/file/d/1EuA...usp=drive_link

I wouldn't mind if you did the whole dummy head thing again (I also use Blender 4.0 so it should work without any problems)! Because I successfully put almost every hand to match the body (every hand has a separate armature), but I can't find any solutions regarding her head! If you attach any Lara head to her armature you only get a varition of this:

Click image for larger version

Name:	2024-04-04 (1).png
Views:	13
Size:	941.6 KB
ID:	4626

I am not exactly a Blender expert, so I don't even have a temporary solution.

The Plane is there as a reference point towards the in game ground. It's the same height as this pose:
Name:  poses_format_1.jpg
Views: 60
Size:  8.4 KB
Code:
0, -442, 0, ZYX(0,0,0), ZYX(0,0,0), ZYX(0,0,0), ZYX(0,0,0), ZYX(0,0,0), ZYX(0,0,0), ZYX(0,0,0), ZYX(0,0,0), ZYX(0,0,0), ZYX(0,0,0), ZYX(0,0,0), ZYX(0,0,0), ZYX(0,0,0), ZYX(0,0,0), ZYX(0,0,0)
Tms2 is online now   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 19:55.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.