Long exporting

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Long exporting

Postby Justintime9 » Mon Jan 12, 2009 2:23 pm

Forgive me if this isn't the right section for this, but it seemed as logical as any :D
Anyway, I'm pretty close to being done adding stuff to my age (soon I"ll just be animating doors, adding journals, perfecting the exterior etc.) However, I have a really annoying problem: Since I had a skydome with a big texture, a grassy plain with lots of verts, and an exterior building texture and plane, exporting is getting longer and longer (and i mean looong, it literally took a whole day, starting when I woke up in the morning, and ending when I was brushing my teeth to go to bed.)

What I'm wondering is, is there any python script, or files that will reduce the export time? I'm sure cyan ages had lots of verts, I don't think they could afford to wait all day to export. At this rate, it'll take forever for me to finish the age, if exporting takes so long. Anyone know what I can do?
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Re: Long exporting

Postby GPNMilano » Mon Jan 12, 2009 2:46 pm

Justin, Break up the age into different pages. With large ages you don't want all the stuff on the same page. For instance, for the interior section of your age, keep that on one page, and the exterior on another. This should help with the export time, as everything isn't being dumped into the same page.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Long exporting

Postby Justintime9 » Mon Jan 12, 2009 2:48 pm

How do I do that? Is there a tutorial somewhere, on the subject? Is there a limit of pages I should break it into? (if I make a page for each room, will it be laggy or something)
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Re: Long exporting

Postby GPNMilano » Mon Jan 12, 2009 5:04 pm

Justintime9 wrote:How do I do that? Is there a tutorial somewhere, on the subject? Is there a limit of pages I should break it into? (if I make a page for each room, will it be laggy or something)


It's actually pretty simple. In the Book.Txt file in Blender (where you set your age sequence) There's a script that looks like this:


Code: Select all
pages:
      - index: 0
        name: mainRoom


For each page you'll need to add a new Index and page name. So, as an example:

Code: Select all
pages:
      - index: 0
        name: mainRoom
      - index: 1
        name: Exterior
      - index: 2
        name: interior


Then, for every object that will be on a specific page. Like all your exterior objects on the Exterior page you'll need to add this in the properties setting in blender for each object:

Code: Select all
string|name:page_num|1


The properties setting is where you set the bounds for an object. just click the "Add Property" button and it will set a default float property. change it to a string with the drop down menu, and then put your 'page_num' into the one that says 'Name: 'and the # into the last box.

For easy setting of these properties, set it for a single object. Select every other you want on that page with the
You can do this with just one object, and then select all the other objects you want on that page, SHIFT+RMB one at a time, and then finally select the object you first added the properties to last. then just type CTRL+C it will give you a list of choices to copy, choose Properties, then in the next menu it pops up "page_num"

One you export, pyprp will export each page individually, starting with the first index and then working to the last. Some pages will export faster than others because those with less objects require less time etc. All pages are loaded upon link in to an age, so you shouldn't notice a performance issue in game.

Cyan for instance used multiple pages in almost all their ages. Even Negilahn and Dereno had two pages. The only thing you need to be careful of is that pyprp does not, by default, set referencing for objects on other pages. So if you have an object you need to click on, make sure everything tied to that object (cameras, click regions, lights etc) are on the same page, even responders and pythonfile mods, otherwise pyprp will create them with blank settings.

You can also speed up the export time by cutting back on vertex counts and using smaller textures. As a general rule:

background textures (like sky's, and background vista's) should be the larger textures, while general textures (like rock, sand, etc) should be 512 x 512. Smaller textures for things like plants, books etc should be about 512 x 256 and 256 x 256. Everything else (like lamp glares etc) can be 128 x 128 or 64 x 64 as they require even less detail. For instance the rock used by Cyan for the hood and cavern is only 512 x 512.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Long exporting

Postby Aloys » Mon Jan 12, 2009 5:31 pm

Such a long export time sounds suspect; PyPRP is pretty fast, even on large Ages.. At least after the first time, because it has to convert and compress all the textures which is what takes the most time. After that all the textures should be in the cache and shouldn't be exported again, if you see that the exporer spends time converting the textures something is wrong here.
Also:
What version of PyPRP are you using?
What kind of computer do you have? (processor speed and memory size)
How many vertexes are there in your Age?
How many objects are there in the Age?
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Long exporting

Postby GPNMilano » Mon Jan 12, 2009 9:08 pm

Aloys wrote:Such a long export time sounds suspect; PyPRP is pretty fast, even on large Ages.. At least after the first time, because it has to convert and compress all the textures which is what takes the most time. After that all the textures should be in the cache and shouldn't be exported again, if you see that the exlporer spends time converting the textures something is wrong here.
Also:
What version of PyPRP are you using?
What kind of computer do you have? (processor speed and memory size)
How many vertexes are there in your Age?
How many objects are there in the Age?


If i recall correctly, Justin is working on an age with quite a few lights in it. Its possible he may need to get rid of these to reduce the export time, as each light needs to be appended to each object depending on what flags he has set. Plus the vertex count and random variables could account for the long export time.

AFAIK An age really doesn't need all that many lights in it anyway. Yes they're useful for lightmapping, but only a few are generally needed to light an age properly.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Long exporting

Postby Grogyan » Tue Jan 13, 2009 12:53 am

I might be over stating the obvious, but have you installed psyco, its was claimed to increase the speed at which the script ran

http://psyco.sourceforge.net/


Also if you get a chance use the importer from the wiki to import an Age like Teledahn and wander through it with blender, Shift+F, and you can see what areas Cyan put into seperate pages, that could give you some help too
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Long exporting

Postby Justintime9 » Tue Jan 13, 2009 4:26 am

Hmm... never heard of that, is psyco just python scripts that make it faster?

If i recall correctly, Justin is working on an age with quite a few lights in it. Its possible he may need to get rid of these to reduce the export time, as each light needs to be appended to each object depending on what flags he has set. Plus the vertex count and random variables could account for the long export time.

AFAIK An age really doesn't need all that many lights in it anyway. Yes they're useful for lightmapping, but only a few are generally needed to light an age properly.


Actually, what I do is, I change everything I need to change in my age, save it, and then delete all the unnecessary lights before exporting. I gets rather annoying, but I keep them there in case I want to re-lightmap an area.
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Re: Long exporting

Postby GPNMilano » Tue Jan 13, 2009 6:08 pm

Justintime9 wrote:Hmm... never heard of that, is psyco just python scripts that make it faster?

If i recall correctly, Justin is working on an age with quite a few lights in it. Its possible he may need to get rid of these to reduce the export time, as each light needs to be appended to each object depending on what flags he has set. Plus the vertex count and random variables could account for the long export time.

AFAIK An age really doesn't need all that many lights in it anyway. Yes they're useful for lightmapping, but only a few are generally needed to light an age properly.


Actually, what I do is, I change everything I need to change in my age, save it, and then delete all the unnecessary lights before exporting. I gets rather annoying, but I keep them there in case I want to re-lightmap an area.


The page trick will help with that, set every light you don't want to export with an extremely high page num (don't add the page to the book though) this will eliminate the need for deleting, as the properties stores your page numbers for each object, and this is what pyprp goes by, it reads that page num and puts it on the appropriate page. So if there's no index number in the book.txt matching the page_num in the properties section of an object, it won't export the object.

This will save on deleting all the unneccesary lights before each export. They'll always be there, they will just never export.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Long exporting

Postby Justintime9 » Wed Jan 14, 2009 4:15 am

Wow! That'll really help me, deleting those lights has been a real pain.
User avatar
Justintime9
 
Posts: 1188
Joined: Sat Sep 29, 2007 5:37 am

Next

Return to Building

Who is online

Users browsing this forum: No registered users and 0 guests