Tomb Raider Forums  

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

Reply
 
Thread Tools
Old 28-08-16, 11:28   #11
Tombraiderplay
Inactive
 
Joined: Aug 2015
Posts: 1,237
Default

Ill test ASAP
Tombraiderplay is offline   Reply With Quote
Old 29-08-16, 03:44   #12
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

Quote:
Originally Posted by Titak View Post
What would incorrect animations be exactly?
Mistakes in the animation, like not having assigned keys properly for example?
No. The actual number of keys in the animation data doesn't match what TRViewer calculates for the number of keys.

I don't know why this happens for some animations or how the TR engine manages to overcome the problem.
sapper is offline   Reply With Quote
Old 12-09-16, 03:47   #13
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

Incorrect animation values (eg. FrameRate, FrameOffset, FrameEnd, FrameStart) cause a lot of TRViewer's crashes.

I tried to avoid these crashes by skipping problem animations but this means the animation may be missing if the level is saved.

Adding code to handle these problem animations is too big a task for me so instead I will let TRViewer process the animations as normal and so maybe crash.

I added code to this version to write to Paolone's error log.txt the problems with animations instead of skipping animations or showing a pop up message.

Studying the Last Revelation levels revealed that there are some animations that do not have any keyframes stored according to the FrameOffset values.
These deleted/unused animations appear to be always designated by a FrameRate of 5.
Since TRViewer calculates the number of keyframes from FrameStart and FrameEnd it will assume the keyframes exist and thus read incorrect data.
If you view a non custom animation in TRViewer that has a Framerate of 5 then it does not exist.
TRViewer, however, will save these false animations when it saves a level!

In custom levels sometimes the animations have incorrect FrameStart and FrameEnd values. I think Wadmerger causes a lot of these.
Paolone's code tries to fix these errors but may not be successful.
This means TRViewer may calculate a huge incorrect number of keyframes and so will try to read keyframe data beyond the end of the actual keyframe data.
TRViewer usually crashes in this case.

This version of TRViewer was compiled in Visual Studio 2013 Community Edition so MicroSoft's VC++2013 redistributable may be needed.


Version 5 revision E:

-Removed animation skipping code.
-Added code to report problems with animations in the [level_name]_log.txt file
-Compiled in VS2013.

Instructions:
-Copy the exe file to an existing TRViewer folder. Download full package (revision 5) in first post if you don't have TRViewer already.

http://www.mediafire.com/download/1y...r1083rev5e.zip

Here is a program I used to examine the animation values for TR4 files and show what problems there may be for TRViewer.

http://www.mediafire.com/download/p8...TRExplorer.zip

EDIT: Actually upon further study I might be able to have TRViewer create a 1 keyframe animation using zero angles and translations for those animations that have no keyframes stored in the level instead of displaying false animations. No idea if this will affect gameplay however.

Last edited by sapper; 12-09-16 at 10:48.
sapper is offline   Reply With Quote
Old 14-09-16, 07:05   #14
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

TRViewer 1.083 revision 5g readme Sep 2016

This version tries to prevent crashes due to incorrect animation values.

Added code to create an animation of 1 keyframe when an animation with no keyframes stored is detected.

Added code to prevent out of range moveable animation indices being used to create an animation.(eg. Talos' Fireworks.tr4)

For some animations with FrameRates greater than 1, TRViewer calculates the number of keys to be less than actual number of keys stored according to FrameOffset info. This means keyframe data was lost when a level was saved.

Changed calculation of number of keyframes to use FrameOffsets instead of FrameEnd, FrameStart and FrameRate.

Added treeview icon for Scorpion and Wild Boar.

Compiled with Visual Studio 2013 CE so MicroSoft's VC++ 2013 redistributable may be needed.

Instructions:

Copy the exe to an existing TRViewer folder.
Copy TRCatalog.xml into existing "TRViewer\resources" folder to use new icons.

http://www.mediafire.com/download/f3...r1083rev5g.zip
sapper is offline   Reply With Quote
Old 19-09-16, 05:05   #15
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

TRViewer 1.083 revision 5h readme Sep 2016

I noticed that when a TR4 level was saved the number of unused textures actually increases even if you say "No" to keeping unused textures.
I found that unused room textures were saved always for TR4 levels.
I found that the sprites are added to the object textures and are counted as unused textures also.

If you said "Yes" to keep unused textures the unused room textures were added to the object textures possibly each time.
If you said "Yes" to keep unused textures the sprites were also added to the object textures each time.

So the number of unused textures increases rapidly if you opt to keep unused textures.
Using PixStr to check the textures showed some corruption of the added textures each cycle.


Saying "No" after many times saying "Yes" appeared to restore the textures but the object texture array still contained many more texture records and loading the file crashed TRViewer.

Revision 5h changes: (Note: only tested on TR4 levels)

-For TR4 levels unused room textures are no longer flagged as unused since they are not removed anyway.
-The sprites are no longer added to the object textures when a level is saved.
-The number of unused textures is written to the error log [levelname]_log.txt when a level is loaded.
-"Keep unused textures" dialog only shown if there are unused textures.

Compiled with Visual Studio 2013 CE so MicroSoft's VC++ 2013 redistributable may be needed.

Instructions:

Copy the exe to an existing TRViewer folder.

http://www.mediafire.com/download/62...r1083rev5h.zip
sapper is offline   Reply With Quote
Old 19-09-16, 07:17   #16
SrDanielPonces
Member
 
SrDanielPonces's Avatar
 
Joined: Apr 2012
Posts: 10,346
Default

That's nice to hear! This maybe might fix some crash issues i've been having when attempting to export a total customized .tr4 file with new animations (from 3dsmax) - I always have to use an original .tr4 file instead to make things work :s

Anyways thanks for keeping contributing for this community, I and many more appreciate this

EDIT: Can I make a suggestion about this program?

For example: I open city.tr4. Then, suddently, I forget to add something, so I add an object to the wad, and compile it. So I try to open it again, this time, an updated version of city.tr4... however, it doesn't open again because it was already opened, so I have to close and then open the program so I can load the .tr4 file properly. Can this be changed? I'm sure this isn't a bug and was intentional.. just a suggestion though

Last edited by SrDanielPonces; 19-09-16 at 07:23.
SrDanielPonces is offline   Reply With Quote
Old 20-09-16, 06:52   #17
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

If you change the file on disk while it is already open in TRViewer you should only have to close the file and reopen not close the program but I will test.
sapper is offline   Reply With Quote
Old 21-09-16, 05:40   #18
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

I updated wrong TRCatalog.xml for new icons.

Please replace TRCatalog.xml in TRViewer\resources folder with this one.

http://www.mediafire.com/download/em.../TRCatalog.xml

EDIT:

TRViewer 1.083 revision 5i readme Sep 2016

-Compiled with XP support. Other versions compiled with VS2013 won't work on Windows XP
-Linked MFC statically so MFC120.dll from VC++ 2013 redistributable not required. Means bigger exe size.

Compiled with Visual Studio 2013 CE so MicroSoft's VC++ 2013 redistributable may be needed.

Instructions:

Copy the exe to an existing TRViewer folder.

http://www.mediafire.com/download/bk...3rev5i_exe.zip

Last edited by sapper; 23-09-16 at 06:16.
sapper is offline   Reply With Quote
Old 05-11-16, 04:08   #19
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

Quote:
TRViewer 1.083 revision 5j readme Nov 2016

-Changes made to handle animations with no keyframes in previous version 5g inadvertently meant all animations in TR1 files were deemed to have no keyframes due to their FrameSize field being zero apparently.

This version restores TR1 animations by calculating number of keyframes the old way.

Compiled with Visual Studio 2013 CE so MicroSoft's VC++ 2013 redistributable may be needed.

Instructions:

Copy the exe to an existing TRViewer folder.
http://www.mediafire.com/file/mm63od...r1083rev5j.zip
sapper is offline   Reply With Quote
Old 22-11-16, 10:11   #20
sapper
Member
 
sapper's Avatar
 
Joined: Sep 2007
Posts: 1,684
Default

Quote:
TRViewer 1.083 revision 5k readme Nov 2016

- Fixed automatic calculation of bounding box for imported animations.
TRViewer was getting it wrong because it assumed the "no animation" pose was stored in the mesh data section of the 3DS file which is not the case.

- Added option to recalculate bounding box for the current animation in the menu when a moveable is right clicked.

Compiled with Visual Studio 2013 CE so MicroSoft's VC++ 2013 redistri.butable may be needed.

Instructions:

Copy the exe to an existing TRViewer folder

Link removed due bug.

Download 5L instead. http://www.tombraiderforums.com/show...4&postcount=26

Last edited by sapper; 23-11-16 at 07:00.
sapper is offline   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:29.


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.