project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding > Modding Tutorials
01 Oct 2024, 00:00:00 (PRT)
Register Developer Blogs Members List Search Quick Links
Modding Tutorials Information and tutorials related to modding BF2.

Reply
 
Thread Tools Display Modes
Old 2010-01-07, 02:52   #1
[R-DEV]​Dr Rank
PR:BF2 Developer
Supporting Member

Dr Rank's Avatar
Default How to Avoid A Lot of Editor Crashes When Working With Undergrowth

If you're familiar with mapping you will find the editor likes to frequently crash the moment you start working on undergrowth, even with a decent amount of RAM. Here are some tips that can help.


Tip 1

This is particularly relevent for anyone working on a large scale map (2km+). Its basically a way of setting up/making changes to your undergrowth outside of your main map, very useful if you want to edit one of your undergrowth types or set up some new ones.

All you need to do is:
  1. Create a new map in the editor (I've called this temporary small map 'undergrowth' to help organise it a bit) - choose the smallest size possible to save on memory i.e. 256 scale 1. (the editor is still vulnerable to crashing when working with an empty map of this size but it should happen a lot less frequently.)

  2. Close the editor then copy all of you undergrowth files from your main map folder into this new map folder (you can also copy the sky.con across to help you see what the undergrowth will look like)

  3. Reload the editor with this new 'undergrowth' map (you can quickly paint a section of the terrain in the same texture as the one you wish to put the undergrowth on so as to give you a better idea of what it will look like in your main map)

  4. Set up your new undergrowth, make changes to you existing undergrowth setup etc (NOTE you cannot change how the undergrowth is painted onto the map here as that data is saved in the .raw file which we don't want to edit here. This process is only for setting up new undergrowth types/making changes to current types, adjusting densities, meshes, textures etc. However make sure you paint away so you can see what your new undergrowth looks like.)

  5. Save the changes, close the editor

  6. Copy all of the undergrowth files EXCEPT the undergrowth.raw file from your 'undergrowth' map to you main map (make sure you've backed up your main map first in case anything goes wrong)

  7. Load up your main map in the editor. Bingo, your new undergrowth is set up ready to be painted!

NOTE: Make sure that when you load your main map in the editor in the final step you re-save you undergrowth before you try to test your map in game otherwise it won't correctly update your undergrowth atlas.


Tip 2

ALWAYS save your map before you do any work on your undergrowth, then save it regularly when your working on it and save it again before you work on anything else in the map. That way you minimise the risk of losing work.


Tip 3

If you've forgotten to save your undergrowth and have made other changes to the map that need saving make sure that you deselect the undergrowth the first time you save. Once you have safely saved all of your other changes run the save again and save the undergrowth separately.

I hope this helps!



Dr Rank is offline
Last edited by [R-DEV]Dr Rank; 2010-01-07 at 21:43.. Reason: mini update
Reply With Quote
Old 2010-01-31, 05:56   #2
AFsoccer
Retired PR Developer
Supporting Member

AFsoccer's Avatar
Default Re: [Map Tip] How to avoid a lot of editor crashes when working with undergrowth

Great post Dr.Rank.

I have to agree that undergrowth is the worst culprit for crashes (I think the second is roads). There's one other hint I'd like to offer that seems to help when working with undergrowth.

If making changes to the density or anything that would affect currently placed undergrowth, do the following:
  • Turn off undergrowth rendering first
  • Make the change needed and save.
  • Then turn rendering back on.

It seems to minimize the number of crashes and memory errors. Hope others have the same experience.

AFsoccer is offline Reply With Quote
Old 2010-05-31, 12:56   #3
Outlawz7
Retired PR Developer

Outlawz7's Avatar
Default Re: [Map Tip] How to avoid a lot of editor crashes when working with undergrowth

Here's something interesting I found out while running the editor and watching the memory usage in Task manager - every time I did something with UG, no matter what it was, the memory usage increased.

I was tweaking UG on a 1024x2 map which initially took up 1300 Mb and as said, no matter what I did, added new type/material, changed mesh/texture, even tweaking the numbers (scale, density) increased memory usage until it got to around 1700 Mb where I got a clear memory crash error.

Tweaking UG again, this time on a 256x2 map, the initial mem usage was 200Mb and again each change increased the usage, even worse it seemed to have increased exponentially - from 10Mb increases at start to over 100Mb though with initial usage I had more time to tweak UG before I hit the memory limit.

I'm not sure if this is an isolated case, so anyone reading this and working with UG; monitor your memory in Task manager while working with UG and see what happens.

Outlawz7 is offline
Last edited by [R-DEV]Outlawz7; 2010-05-31 at 13:11..
Reply With Quote
Old 2010-07-12, 03:04   #4
=]H[= JakCurse
Supporting Member

=]H[= JakCurse's Avatar
Default Re: [Map Tip] How to avoid a lot of editor crashes when working with undergrowth

Cheers. This is driving me bonkers.

=]H[= JakCurse is offline Reply With Quote
Old 2010-07-12, 03:52   #5
Rudd
Retired PR Developer
Supporting Member

Rudd's Avatar
Default Re: [Map Tip] How to avoid a lot of editor crashes when working with undergrowth

Quote:
Here's something interesting I found out while running the editor and watching the memory usage in Task manager - every time I did something with UG, no matter what it was, the memory usage increased.
yeah its not a matter of if the editor will crash, only when :P

as I said to Andy, the editor works in mysterious ways, like an evil god.

But this is a great method of working with UG,

working with these kind of work arounds saves you ALOT of time making maps.


Rudd is offline Reply With Quote
Reply


Tags
avoid, crashes, editor, lot, map, tip, tiphow, undergrowth, working

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 17:28.