|
||||||||||||||
|
|
|
|||||||
| Register | FAQ | Forum Rules | Members List | Calendar | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Mod Leader
![]() 153
- 8
|
3Ds Max - Max script editing
Hey guys, could really do with some help on editing some max scripts so that I can lightmap my map more easily with the current scripts there are.
Basically I'm using the POE2, BF2 tools for 3DsMax, which is a improved version of the main BF2 Max tools thou the lightmapping part of them wasn't improved much. You can find the tools here, they are a simple plugin: POE_MAX_BF2_TOOLS.zip - FileFront.com What im looking to do is change how the lightmapping render works, so that it basically has a "resume from previouse" feature where it checks if it has already rendered lightmaps for a object, if it has it skips that object and checks the next. if it finds a object without any lightmaps already done then it dose that object, once finished, it moves onto the next object and repaets the process again. Right now it just renders new lightmaps regardless of if some are already done for the object, which means if the lightmapping crashes part way though, which is very common then the work you have already done is useless. So ye any help on doing this would be very welcome. Cheers! Last edited by Rhino; 07-23-2008 at 02:09 PM. |
|
|
|
|
|
#2 (permalink) |
|
Mod Leader
![]() 153
- 8
|
dose any one have any info, tuts etc that may help me here on editing max scripts? Or dose any one have any idea how I could get a line of code checking a folder to see if the file existed before it rendered it? File name being done by "element.filename" (i think) and the directory to check done by "OutDir", and I think insert the check some where into this bit of code would do the trick, just before the rendering process.
Code:
select obj local wasCancelled = false try ( render rendertype:#bakeSelected frame:currentTime to:g_bf2VFB vfb:off cancelled:&wasCancelled \ outputSize:[renderWidth , renderHeight ] -- ) ![]() |
|
|
|
|
|
#3 (permalink) |
|
Artist
![]() 78
- 13
|
You can use doesFileExist() to check whether a certain file exists already.
But you cannot really check whether a file is incomplete, which might happen when the renderer crashes. So I would go with some kind of array or list that contains the names of all the objects that you want to be baked. After baking an object successfully you let maxscript remove its name from the list. This way you could also directly control which objects should be baked. Apart from that, here's a very good maxscript-forum: The Area | MaxScript |
|
|
|
| The Following User Says Thank You to harefort For This Useful Post: |
![]() |
| Bookmarks | |||
Digg
|
del.icio.us
|
StumbleUpon
|
Google
|
| Thread Tools | |
| Display Modes | |