Forums Aritcles
SEARCH:
LOGIN:
Register Register Register Contact Us
Go Back   Game Artist Forums > Game Art > Support
Register FAQForum Rules Members List Calendar Mark Forums Read
Reply
 
LinkBack Thread Tools Display Modes
Old 07-23-2008, 01:46 PM   #1 (permalink)
Mod Leader
Rhino's User Activity: 1/10
159 - 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!
__________________

Project Reality Mod Lead Mapper

Last edited by Rhino; 07-23-2008 at 02:09 PM.
Rhino is offline   Reply With Quote
Old 07-27-2008, 06:04 AM   #2 (permalink)
Mod Leader
Rhino's User Activity: 1/10
159 - 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 ]
		
		-- 
	)
any help would be very much appreciated, cheers!
__________________

Project Reality Mod Lead Mapper
Rhino is offline   Reply With Quote
Old 07-27-2008, 06:23 AM   #3 (permalink)
Artist
harefort's Avatar
harefort's User Activity: 1/10
82 - 14
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
harefort is offline   Reply With Quote
The Following User Says Thank You to harefort For This Useful Post:
Old 07-27-2008, 06:39 AM   #4 (permalink)
Mod Leader
Rhino's User Activity: 1/10
159 - 8
sounds perfect, dont need to really check for incomplete ones since the only crashes I've had so far are only when it fails to save the render, and got over that prob now

Cheers!
__________________

Project Reality Mod Lead Mapper
Rhino is offline   Reply With Quote
Reply

Bookmarks
Digg del.icio.us StumbleUpon Google
Thread Tools
Display Modes




All times are GMT -5. The time now is 05:29 AM.


Powered by vBulletin® Version 3.7.0 Beta 4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
Copyright © 2006-2008 Game-Artist.Net