TresCom Forums

TresCom : The Trespasser Fan Gateway...
It is currently Tue Dec 11, 2018 2:46 pm

All times are UTC




Post new topic Reply to topic  [ 1097 posts ]  Go to page Previous  1 ... 68, 69, 70, 71, 72, 73, 74  Next
Author Message
PostPosted: Sat Jul 14, 2018 11:27 pm 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Mon Dec 06, 2004 5:21 pm
Posts: 11256
Location: Portland, OR
If it helps, my suspicion is that it's to do with custom meshes with subtle properties of complexity/geometry not interacted with by the Tres devs and so are creating rare errors.

_________________
Image
Image Image T-Script Reference / Trespasser Millennium / JP Dark Secrets / Tres File Box


Top
 Profile  
 
PostPosted: Mon Jul 23, 2018 4:44 pm 
Offline
Parasaurolophus
Parasaurolophus

Joined: Tue Aug 05, 2014 7:09 pm
Posts: 268
TheIdiot wrote:
Code:
.\Source\Lib\GeomDBase\Mesh.cpp

Line #: 930


The "code 1015" message is different, and is what results in the crash, yet I don't know what a "code 1015" even is because it doesn't describe it. My guess is that it's the "too many polys" error, but again, I didn't think that should be a problem, unless the actual face limit is somewhat lower than 3072 (the model has 3068). Any ideas?

Quote:
Lee, is there anything you might be able to do to fix this? The crash seems to be occuring right at the end of the loading phase, just before the level starts, NOT in the middle of the loading bar where it would usually crash if you had high-poly models in retail.

There are two memory heaps (/buffers) directly involved with mesh data. One is used temporary when loading and pre-processing a mesh's data. That one has a max limit of 4096 polys. It also has limits for max total verts, which are based on the max poly count if they were all polygons with 4 verts. That means in theory it could run out of vertex space before hitting the poly limit.

The original limit for that heap was 2048. The original code also had an assert warning if a model had more than 1024 polys though. That's the "Line #: 930" assert above. I wasn't sure if that was a mistake in the original code where they forgot to increase the assert to 2048, or it was intended as a safety margin. To be on the safe side I kept the assert to half of the max limit, so in CE the assert would trigger over 2048. That's the "Line #: 930" you're seeing there.

The second memory heap involved, is the buffer for all loaded mesh data combined. This one has a size of 40MB in CE, and 32MB in original. I'm not entirely sure right now, but I think that is a hard limit, that very well could crash if exceeded.


To find out what's going on, I can either get "crash.dmp" files posted for each crash, and see if they give enough hints. Or you have to give me the content that crashes so that I can run through a debugger while trying to load it. If it just involves increasing some limits, by sane amounts, then that shouldn't be a problem. I could also try adding some more helpful error output, if there's opportunity for that in the code where it crashes.


There's also a heap for rendering, that limits the total number of polygons on-screen (used to be 20k, in CE is 80k). From that perspective it does make sense not to increase the per-mesh poly limit too much. After all, what would be the point in allowing a mesh with say 30k polys, and then only 2 of them could be on screen and then nothing else.


Top
 Profile  
 
PostPosted: Tue Jul 24, 2018 7:40 am 
Offline
T-Rex
T-Rex
User avatar

Joined: Thu Feb 20, 2014 9:13 pm
Posts: 2621
Location: Canada, eh?
Thanks for the input, Lee, all of those details are really useful. I'll send you the level via PM and see if you can figure it out, then. I can also post the crash.dmp if it helps. :)

Quote:
The second memory heap involved, is the buffer for all loaded mesh data combined. This one has a size of 40MB in CE, and 32MB in original. I'm not entirely sure right now, but I think that is a hard limit, that very well could crash if exceeded.

From what you've told me, I'm going to guess that that's the problem, but I'm not certain. There are a lot of fairly detailed meshes in the level, and it seems as if it is some sort of per-mesh poly limit is being exceeded when the level loads up, as tatu and I have discovered through our testing.

Quote:
There's also a heap for rendering, that limits the total number of polygons on-screen (used to be 20k, in CE is 80k). From that perspective it does make sense not to increase the per-mesh poly limit too much. After all, what would be the point in allowing a mesh with say 30k polys, and then only 2 of them could be on screen and then nothing else.

I don't think that should be a problem, unless it also counts the 2D object impostors in that count. I've seen that count exceeded in the past and it definitely seems to me like a different error.

_________________
Image

My currently active projects:
Return to Jurassic Park: A Trespasser Mod - Forum or ModDB | Trespasser HD: Beach (Released!) / Jungle Road | TheIdiot's release thread


Top
 Profile  
 
PostPosted: Tue Jul 24, 2018 11:32 am 
Offline
Parasaurolophus
Parasaurolophus

Joined: Tue Aug 05, 2014 7:09 pm
Posts: 268
So yeah, it was running out of the 40MB mesh heap. I've added an ini option so the fm.ini can specify a larger max heap size. The level loaded after that.

TheIdiot wrote:
I don't think that should be a problem, unless it also counts the 2D object impostors in that count. I've seen that count exceeded in the past and it definitely seems to me like a different error.

The impostors would count as that one (or few) poly of the impostor sprite itself. When the render buffer is maxed, CE is supposed to simply drop additional polys from rendering, not crash.


Top
 Profile  
 
PostPosted: Tue Jul 24, 2018 3:29 pm 
Offline
T-Rex
T-Rex
User avatar

Joined: Thu Feb 20, 2014 9:13 pm
Posts: 2621
Location: Canada, eh?
Quote:
So yeah, it was running out of the 40MB mesh heap. I've added an ini option so the fm.ini can specify a larger max heap size. The level loaded after that.

Alright, excellent. :) Will this be in the next patch, then?

Quote:
The impostors would count as that one (or few) poly of the impostor sprite itself. When the render buffer is maxed, CE is supposed to simply drop additional polys from rendering, not crash.

Hmm, so would using the Cull Distance values in an object's T-script reduce the actual amount of polys being rendered in the scene?

_________________
Image

My currently active projects:
Return to Jurassic Park: A Trespasser Mod - Forum or ModDB | Trespasser HD: Beach (Released!) / Jungle Road | TheIdiot's release thread


Top
 Profile  
 
PostPosted: Wed Jul 25, 2018 12:47 pm 
Offline
Parasaurolophus
Parasaurolophus

Joined: Tue Aug 05, 2014 7:09 pm
Posts: 268
TheIdiot wrote:
Will this be in the next patch, then?

Yes.

I thought I'd wait with an update until I've looked at adding script code for map view, in case I figure out I'd need to extend some engine-side functionality in the script system. Draconisaurus had asked about a map function. I'm waiting for the answer to some questions before doing that.

Quote:
would using the Cull Distance values in an object's T-script reduce the actual amount of polys being rendered in the scene?

If the distance makes an object disappear earlier than normal then I guess so, but I'd say that's the wrong approach. The game/ini settings that control impostor and culling distance etc., should normally control the overall complexity. If a level did too much of that built into the level, then it would be harder to adjust quality settings based on what the computer its played on can handle, or potential future game versions with better performance.

If you make a level you could either target it to run decently with some standard settings, and adjust the level content based on that, or you find a recommended set of settings that work well with that level (or some combination of both). FM.INI does provide functionality to supply such recommended settings.


Top
 Profile  
 
PostPosted: Wed Jul 25, 2018 1:57 pm 
Offline
-=TresCom Website Manager=-
-=TresCom Website Manager=-
User avatar

Joined: Fri Jun 24, 2005 9:40 pm
Posts: 3387
Location: Sweden
Lee Arbuco wrote:
TheIdiot wrote:
Will this be in the next patch, then?

Yes.

I thought I'd wait with an update until I've looked at adding script code for map view, in case I figure out I'd need to extend some engine-side functionality in the script system. Draconisaurus had asked about a map function. I'm waiting for the answer to some questions before doing that.


Sadly I think it would be a long wait until Draco gets back on that. He lost his Laptop and is taking a break so could be months. Just so you know :)

_________________
"...there used to be more benches, but InGen's workers removed them during the evacuation in the name of framerate."

"The main laboratory and administrative buildings. This is where we made our work, where the real magic trick happen. When they are in need of height fixing, they'll come here." - Hammond


Top
 Profile  
 
PostPosted: Wed Jul 25, 2018 4:34 pm 
Offline
Parasaurolophus
Parasaurolophus

Joined: Tue Aug 05, 2014 7:09 pm
Posts: 268
Sorry to hear that. Thank you for the update.

If I understood it right, he mentioned it was a co-production with TheIdiot (JPDS)? I'm not up to speed. Is that a different project from the RTJP level? Is it maybe something you (TheIdiot) could answer, if I asked you instead?


Top
 Profile  
 
PostPosted: Wed Jul 25, 2018 5:28 pm 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Thu Apr 24, 2003 11:20 pm
Posts: 10944
Location: Lima, Peru
JPDS (Jurassic Park: Dark Secrets) is an already released level... I think he meant it included maps which could be displayed using ATX. Personally, I never made use of maps...
RTJP (Return to Jurassic Park) is a different thing altogether.

_________________
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files


Top
 Profile  
 
PostPosted: Wed Jul 25, 2018 6:16 pm 
Offline
Parasaurolophus
Parasaurolophus

Joined: Tue Aug 05, 2014 7:09 pm
Posts: 268
I see. Comparing the map from the test level I got with JPDS, it is indeed the same map. That answers my questions then. That script would in such case be like a drop-in atx replacement for an existing level. I'll try to have a quick look anyway before an update.


Top
 Profile  
 
PostPosted: Wed Jul 25, 2018 6:54 pm 
Offline
T-Rex
T-Rex
User avatar

Joined: Thu Feb 20, 2014 9:13 pm
Posts: 2621
Location: Canada, eh?
Lee Arbuco wrote:
I see. Comparing the map from the test level I got with JPDS, it is indeed the same map. That answers my questions then. That script would in such case be like a drop-in atx replacement for an existing level. I'll try to have a quick look anyway before an update.

I'm not certain what you mean by that, so allow me to clarify - JPDS is a completely different map from RTJP. The level I sent you is the first level of RTJP and is a different map from the JPDS series. You can find JPDS under the Download section on the main site, in 5 parts, if you want to test it out - the first level, JPDS~Streams, makes use of the ATX Map function.

In any case, yes, a map system would be highly appreciated, not just for JPDS, but also for RTJP and the few other ATX-based levels which used it. ATX's map system was essentially a simple key which you pushed to bring up a map of the level, and there was also support for a "GPS-like" system which displayed a blinking icon indicating where the player was. There was also an ATX ActionType which allowed you to change the current Map used in the level. With CE's functionality, I assume it would also be possible to add a definable key to the Controls menu for the Map, as you made for the Sprint script?

If that were implemented, I belive the only features still missing from CE that we had in ATX would be the particle-based percipitation (rain and snow), third-person (which I don't think should be a huge priority, considering how the player model looks in 3rd person), and the toggleable aim-dot.

Also, Lee, would you be able to look into my request a few pages ago to allow the game play better-quality/different format video files? It's not a priority, but it would be nice to eventually have support for that. :)

_________________
Image

My currently active projects:
Return to Jurassic Park: A Trespasser Mod - Forum or ModDB | Trespasser HD: Beach (Released!) / Jungle Road | TheIdiot's release thread


Top
 Profile  
 
PostPosted: Wed Jul 25, 2018 8:04 pm 
Offline
Parasaurolophus
Parasaurolophus

Joined: Tue Aug 05, 2014 7:09 pm
Posts: 268
TheIdiot wrote:
I'm not certain what you mean by that, so allow me to clarify - JPDS is a completely different map from RTJP. The level I sent you is the first level of RTJP and is a different map from the JPDS series.

I was unclear. I wasn't talking about the level you sent. Draco had sent me a test level with a map image, asking if I might want to look into adding support for map view.

That test map used ATX AT 102. I then also saw that you had copied the sample squirrel script for AT102 to your RTJP, so I thought maybe the request was for RTJP after all.

With the new script system there are more elegant (and customizable) ways to implement maps. That's why I was hesitant with the sample code to spend too much time on simulating the AT102 functionality. Not only maps for that matter. It would/should be possible to have more a generic pick-up system and a simple virtual inventory. Not for physical items, in that you can take them out from the inventory into the player hand, but still. In theory maybe even physical items would be doable, but that's more complicated and not something I could spend time on at the moment.

Quote:
Also, Lee, would you be able to look into my request a few pages ago to allow the game play better-quality/different format video files? It's not a priority, but it would be nice to eventually have support for that. :)

Maybe some day, but it's quite a bit of work for very limited gain, so I don't have any immediate plans.


Top
 Profile  
 
PostPosted: Thu Jul 26, 2018 8:48 pm 
Offline
T-Rex Killer
T-Rex Killer
User avatar

Joined: Mon Dec 06, 2004 5:21 pm
Posts: 11256
Location: Portland, OR
Huh confusion abounds lol. I do wish to say for my part that Lee's not superman and can't do everything :yum:

_________________
Image
Image Image T-Script Reference / Trespasser Millennium / JP Dark Secrets / Tres File Box


Top
 Profile  
 
PostPosted: Tue Jul 31, 2018 10:37 pm 
Offline
Parasaurolophus
Parasaurolophus

Joined: Tue Aug 05, 2014 7:09 pm
Posts: 268
The update is available now.

You can add the following to the RTJP fm.ini

Code:
[Memory]

MeshHeapSize=48
ExtraTerrainNodes=20


Top
 Profile  
 
PostPosted: Tue Jul 31, 2018 11:19 pm 
Offline
Parasaurolophus
Parasaurolophus

Joined: Tue Aug 05, 2014 7:09 pm
Posts: 268
I've added a demo implementation of (one way to do) maps to the RTJP scripts. I didn't include the TGA files you already have in the zip. Make backup copies of your current nut files.

This implementation doesn't use ATX AT 102. Instead you define all the map info in "gamescript_inv.nut". There currently is some made up map definition as an example, you'd have to change that or comment it out.

To make a map pick-up item there's the MapPickUp script in "instancescript_items.nut". The T-Script params for that are documented in the nut file. Basically all you have to do is assign the MapPickUp to the map object in the game, tell it the ID name of the map, and you're done. You can then change the map image name, tweak the params etc., in the script file without having to re-edit the level file(s).

It supports any number of maps.


Attachments:
rtjp_scripts-map_demo.zip [13.85 KiB]
Downloaded 19 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1097 posts ]  Go to page Previous  1 ... 68, 69, 70, 71, 72, 73, 74  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group