PDA

View Full Version : Render in BG: new lscript



jeremyhardin
03-29-2006, 04:04 PM
I'll be putting this online when I get home today.

Basically it takes your scene (as it was last saved), and sends either the current frame or the entire scene to a commandline render.

So you can continue working in LW in the meantime, or close LW and let the render continue.

Note: it saves using the saving options in your scene, so make sure your RGB saving options are checked.

(great for those that aren't on good terms with Screamernet)

jeremyhardin
03-29-2006, 04:48 PM
ok, should this be called Render in BG...BG Render...or Batch Render? Just curious.

Also, when you click it, should it save the scene for you or just work with the last saved version of the scene?

what do you guys think?

Elmar Moelzer
03-29-2006, 04:59 PM
Hey!
Looks like a very useful script.
I think I would call it "BG Render Frame" and "BG Render Scene"

jeremyhardin
03-29-2006, 05:14 PM
Thanks! I'll go with that (barring further input).

About scene saving, I could see both sides of the coin. In one hand, you don't want to waste render time to find out the BG render isn't reflecting the changes (because you haven't saved in a while).
On the other hand, if I have this script save for them, then it could save changes the user doesn't want to make permanent.

Thoughts?

Elmar Moelzer
03-29-2006, 05:20 PM
hmm, maybe you could save to a temporary scene file. On the other hand the saving problem might still apply to the objects in the scene too and saving them to temporary files as well might end up being slow and problematic.
So I would probably just go with the last saved version for consistency.
As long as it is mentioned in some docs somewhere it should be fine.
CU
Elmar

jeremyhardin
03-29-2006, 05:29 PM
i thought about the temporary scene file, but if I save the temp scene file in the content directory...I can't delete it until the render is done (which is beyond the running of the generic script). I could try to save it in a temp folder, but since Screamernet is so content directory dependent, I thought that might throw up problems.
Plus the Object files are another matter.

So I think I'll just take your advice and note the fact that it will render the scene/objects as they were last saved.

Thanks for the input, Elmar.

Weetos
03-29-2006, 05:44 PM
Thanks a lot ! that's a brilliant idea :thumbsup:

just a thought : a pop up panel with different options
_______________________________________
Save as $current_filename (radio button)
Save as BG_$current_filename (radio button)
Save as ... (radio button)(text field)
Use Last Saved Scene (radio button)

OK / Cancel
_______________________________________

But this obviously requires an interface

hrgiger
03-29-2006, 05:49 PM
Looks very userful Jeremy. I have a few questions though, does it take up a lot of system resources or does it depend on the scene you are rendering? I know you said you can keep working in Lightwave while it's rendering in the background. Also, how do you check the status of the render to know when it's done or how long it might have to go?

jeremyhardin
03-29-2006, 05:51 PM
Thanks for the input Weetos.

Questions.

1. are you suggesting the interface pops up when the script is run, or are you suggesting a separate interface elsewhere for 'options'?
2. I tend to think this type of thing works better as a 'one-click' run thing than another interface. is that just me? would adding the suggested options make this more likely to be used or just more cumbersome?

jeremyhardin
03-29-2006, 05:54 PM
hrgiger...the buttons basically just handle screamernet commands for you, package up the right parameters, and submit the scene to screamernet on Standalone rendermode (so there's no controller or no network shiz or anything like that).

so on pc it opens up a Dos window with the render going. you can use your task manager to throttle system resources to/from that task. on mac it opens up a console, and you can use 3rd party apps or another terminal window to throttle system resources there.

with both it shows what pass of what frame it's rendering. same as a screamernet window, except you didn't have to do any of the finicky setup.

jeremyhardin
03-29-2006, 05:59 PM
something like this...

Weetos
03-29-2006, 06:07 PM
hmm good points Jeremy

I really don't know what most users prefer concerning this kind of things. Even though I like one-click operation myself, I thought having the choice between different behaviours is more 'user-friendly'. Having this thing popping up each time I press the button won't bug too much - but that's just me - others might prefer an separate option panel or no panel at all :hey:

Exception
03-29-2006, 06:48 PM
That sounds awesome!
Good idea... i'm looking forward to it. Thank you.

Ade
03-29-2006, 07:04 PM
2 questions, wheres the download and is it for macs?
Also can you up that LW theme your using, its a nice grey one i need.


[email protected]

jeremyhardin
03-29-2006, 07:09 PM
Exception...thanks!

Ade...download will be up when I get to the home computer in a few hours.
it should work for macs too. haven't tested it yet.
and the theme i'm using is default. I just highlighted the buttons in Photoshop so it was obvious what I was pointing to.

MooseDog
03-29-2006, 07:59 PM
submit the scene to screamernet on Standalone rendermode

is this what you're talking about? (taken directly from the manual btw):

"Rendering Without LightWave
The LWSN program has a third option that lets you render a scene without running LightWave. There is no control machine and thus it is not a distributed rendering situation. You must tell the program specifically what to render. The method is run from a DOS prompt using the following syntax (one line):

LWSN -3 [-c<config dir>] [-d<content dir>] <scene file> <first frame> <last frame> [<frame step>]

As you can see, you supply the program with the basic information needed to render a scene."

It's fantastic that people dig around and find this stuff, and release it into the wild. Many thx! Question tho:D , how will your one-click solution find the config files if I've put them somewhere besides a default location? Or am I missing something where it's not an issue? :stumped:

jeremyhardin
03-29-2006, 08:33 PM
moosedog...yep. that's exactly what i'm talking about. and custom config locations are not an issue. the script detects the config settings and takes that into account when it passes the command (at least in my tests).

jeremyhardin
03-29-2006, 08:34 PM
and now they're up on my website.

http://jeremy.lwidof.net/lscript/#bg_render

be sure to grab the appropriate version (mac or pc).

MooseDog
03-30-2006, 08:40 AM
works like a charm! both on a highly customized 8.5, as well as a default installation of an app we dare not mention. the one-click solution worked out great.

will be a real boon to those who are screamernet challenged and don't see the need running only one machine. congrats!

(oh yeah: win32, p4ht)

jeremyhardin
03-30-2006, 08:50 AM
thanks MooseDog! Works fine on my customized Mac 8.5 as well as my Discovery Edition 8.5 on the work PC.

Any developers that want to test their plugins on screamernet now need only push a button.

Also, I've had scenes that won't render in LW because of the MASSIVE amounts of polygons or image maps in them. But commandline renders are much more stable, so you can testrender with this now (something I did with Screamernet anyway, but this is MUCH easier).

Titus
03-30-2006, 10:35 AM
Just as a test report, I'm aware this is for 8:

It doesn't work with 7.5. I'm also testing the script with 8.0 and no objects are rendered:

jeremyhardin
03-30-2006, 10:37 AM
questions.

scene/objects saved?
can you try it on 8.5?
mac or pc?
do you have your content directory set up properly?

jeremyhardin
03-30-2006, 10:44 AM
just tried it in 7.5d on PC, and it works fine here. what about the other questions above?

Titus
03-30-2006, 11:11 AM
Ok, changed content directory and objects are rendering now, but textures are missing.

jeremyhardin
03-30-2006, 11:16 AM
These are the sort of problems you get with screamernet in general. If files are outside the content directory structure, you can run into issues. I've simplified the setup of a commandline render, but it's still just that. And it will still require stringent management of your content.

That said...perhaps the Worms of Art's new Content Manager could help?
http://www.the-worms-of-art.com/Products/Wi-Exporter_Single_User.html
Or LW's slightly less rhobust content manager.

Cageman
03-30-2006, 11:19 AM
Hey, thanks for the script! I haven't tried it yet, but it seems to be one of those things that once you've gotten used to it, you can't live without it.. :)

Titus
03-30-2006, 11:31 AM
Ok, thanks for your replies. I'm very dumb doing installation and setup for stuff, I always have people for this work.

Anyway, your script is realy cool.

jeremyhardin
03-30-2006, 11:33 AM
That's nice of you to say Cageman...thanks.

Titus, I'm poor with setup too. That's why I know anything about it at all! So many mistakes I've made! :D Hope it works out for you eventually.

Weetos
03-30-2006, 01:27 PM
This is really ... hmmmm ... can't find the words ... Sexy !
working in layout while you're rendering is just too sexy !

walfridson
03-30-2006, 01:31 PM
Oh man.. This is so cool!! :thumbsup:
NEWTEK!:hammer: :hammer: :hammer:

If only calculation of dynamics would work the same way!

btw Jeremey. I've always dreamed of being able to press a "render single frame"-button and lw splits render regions for the CPU availible on the ethernet. maybe it's a bit too much... :)

jeremyhardin
03-30-2006, 01:35 PM
thanks weetos and walfridson.

walfridson, it's not a quick or easy task, but i'll give it some thought. :D

btw, i emailed newtek about including these scripts in LW. So we'll see. Who knows.

walfridson
03-30-2006, 01:56 PM
Hm can't get it to work.. Made a simple scene. The command line just flashes, open and closes. Both single and scenerender. content in order. command directory is set to lightwave\programs
the scene is just a ball, default material and alot of radiosity. save RGB to content imagefolder. LW8.5
any ideas?

jeremyhardin
03-30-2006, 02:00 PM
command directory?

what is the content directory set to?

mind sending me the scene?

walfridson
03-30-2006, 02:08 PM
Nevermind, tried using content manager again and it worked! Thanks anyway :)
Jeremy, it would be nice if it saved an temp-lws and rendered that one.

command dir I ment the one in screamer net controller in layout.

edit: many things..

Riplakish
03-30-2006, 03:01 PM
Thanks! I'll go with that (barring further input).

About scene saving, I could see both sides of the coin. In one hand, you don't want to waste render time to find out the BG render isn't reflecting the changes (because you haven't saved in a while).
On the other hand, if I have this script save for them, then it could save changes the user doesn't want to make permanent.

Thoughts?

"Save and Render" button?

jeremyhardin
03-30-2006, 03:06 PM
Nevermind, tried using content manager again and it worked! Thanks anyway :)
Jeremy, it would be nice if it saved an temp-lws and rendered that one.

command dir I ment the one in screamer net controller in layout.

edit: many things..

Glad you got it sorted. I'm assuming 'many things' refers to the content directory question.

as far as the command dir, you don't have to touch the screamernet controller at all to use this. command dir has no relevance to these scripts.

And about the temp scene...as I said above, I thought about the temporary scene file, but if I save the temp scene file in the content directory...I can't delete it until the render is done (which is beyond the running of the generic script). I could try to save it in a temp folder, but since Screamernet is so content directory dependent, I thought that might throw up problems.

jeremyhardin
03-30-2006, 03:08 PM
"Save and Render" button?
Ah, but then you'd need one for frame and one for sequence. so you'd end up with 4 scripts and 4 buttons. if you have a mac and pc that's 8 scripts.

too much trouble for the user, methinks. though I am toying with an options menu as a hidden feature.

jeremyhardin
03-30-2006, 03:12 PM
Hi Jeremy,

:bowdown:
first of all: I love these scripts! I have to render single frames with slightly changed parameters at the moment that render some time. Now, I only start your script, change some parameters, save the scene, click again. And so on... awesome. Several commands render, while I can still work.

Just one thing. I'm on 8.5 - PC. Could it be that it overwrites some configs? I have no idea of Screamernet or anything. We have a RoyalRender Farm here, that works for a dumba** like me, too. But I closed LW, while the frames were rendering, and when I started it again (after some command windows closed) my shortcuts and button layout were back to default.

Did I forget to set something right? Or do I have to leave LW open, while the renders are on their way?

Again: thanks for this great Scripts - it came at the perfect time! :thumbsup:

Greets.
Oliver.


Hmm. It points screamernet to use the configs that LW is using, but it doesn't write to them at all. The only files it writes for PC are a simple .bat file with LWSN and the command parameters to render the current scene. then it runs the .bat. LW doesn't have to stay open to do this, so I'm not sure what would have caused that.

If it happens more with the same symptoms let me know. I'll keep an eye out for this myself.

randomnumbers
03-30-2006, 11:24 PM
Am I right in thinking that using this script to render a sequence, then working in layout in the background with that same scene and saving the scene whilst the sequence is still rendering will cause some bizarreness?
I guess what I am asking is, does screamernet load the scene for each frame or does it load the scene at the beginning of the sequence and then store it in memory?

DiedonD
03-31-2006, 12:53 AM
You seem like the right person to talk to about a certain command in LW, that I posted few days ago. Its probably about Lscript, cause I dont think LW has that kind of an option. SO here goes:

What I usually end up having, is 8-10 points which on the right/left viewport are all at one place. SO I just click once and all 10 points that are on the front/back viewport get selected at once. Now, when I move all of them to a specific place, insteaad of going to front view deselecting one (usually the first one from 0 X axes) and moving on to another place with the rest of 9 points, and when I get there deselct another point, and move on with 8 points, and so on, what I need is an automatic process, which would go like so:

I pick up 10 points on right/left view and by using this special script, I just move them straightforward to the end leaving points along the way by pressing a button. Can you picture that, I just move and drop points by pressing the button along my way to the final destination. And the autmatic order of point droping should be from the second point nearest to the 0 X axes, onwards to the last.

Now, how can we work on this, or how do you work to be more specific. Do you accept special requests like so? Or how would you suggest to take it from here. Thanks :)

jeremyhardin
03-31-2006, 08:18 AM
Am I right in thinking that using this script to render a sequence, then working in layout in the background with that same scene and saving the scene whilst the sequence is still rendering will cause some bizarreness?
I guess what I am asking is, does screamernet load the scene for each frame or does it load the scene at the beginning of the sequence and then store it in memory?

no bizarreness. screamernet in this mode loads the scene once and stores it in memory.
:thumbsup:

jeremyhardin
03-31-2006, 08:22 AM
@diedond...I definitely do take requests...but I've never done a modeler script in my life. Sorry mate. Can't help you with this one. But if you post this in the lscript board I'm sure some other talented coder could come up with something. (http://www.newtek.com/forums/forumdisplay.php?f=30)




You seem like the right person to talk to about a certain command in LW, that I posted few days ago. Its probably about Lscript, cause I dont think LW has that kind of an option. SO here goes:

What I usually end up having, is 8-10 points which on the right/left viewport are all at one place. SO I just click once and all 10 points that are on the front/back viewport get selected at once. Now, when I move all of them to a specific place, insteaad of going to front view deselecting one (usually the first one from 0 X axes) and moving on to another place with the rest of 9 points, and when I get there deselct another point, and move on with 8 points, and so on, what I need is an automatic process, which would go like so:

I pick up 10 points on right/left view and by using this special script, I just move them straightforward to the end leaving points along the way by pressing a button. Can you picture that, I just move and drop points by pressing the button along my way to the final destination. And the autmatic order of point droping should be from the second point nearest to the 0 X axes, onwards to the last.

Now, how can we work on this, or how do you work to be more specific. Do you accept special requests like so? Or how would you suggest to take it from here. Thanks :)

jeremyhardin
04-01-2006, 11:37 AM
try copying this into a text editor, saving it and running it.

let me know if it behaves differently than your current version. also make sure to check the frame and see if it looks right.



//-----------------------------------
//Render Current Frame in BG INTEL 0.1
//by Jeremy Hardin
//[email protected]

@warnings
@name "BG Render Frame"
@asyncspawn



platform_var;

generic
{


platform_var = platform();
if(platform_var == 1)
{
pc_render_current_lwsn();
}
if(platform_var == 5)
{
mac_render_current_lwsn();
}


//end generic
}

//-------------------------------------------------
//-------------------------------------------------
//Begin Custom Function portion of the script here




pc_render_current_lwsn
{

install_dir = getdir("Install");
content_dir = getdir("Content");
temp_dir = getdir("Temp");
config_dir = getdir("Settings");
currentscene_path = Scene().filename;
currentscene_patharray = split(currentscene_path);
currentscene_filename = currentscene_patharray[3] + currentscene_patharray[4];
currenttime = Scene().currenttime;
currentframe = Scene().currenttime*Scene().fps;
commandadd = "'''" + install_dir + getsep() + "lwsn.exe''' -3 -d'''" + content_dir + "''' '''" + currentscene_path + "''' " + currentframe + " " + currentframe + " 1";
chdir(temp_dir);
output = File("render_current_lwsn_temp.bat","w");
output.writeln(commandadd);
output.close();
input = File("render_current_lwsn_temp.bat","r");
output = File("render_current_lwsn.bat","w");

while(!input.eof())
{
line = input.read();
line ~= r~'''~"~;
output.writeln(line);
}
input.close();
output.close();
result = spawn("render_current_lwsn.bat");
chdir(content_dir);



//end pc_render_current_lwsn
}


mac_render_current_lwsn
{
error("You're trying to use the PC version. Download the Mac version.");

//end mac_render_current_lwsn
}

jeremyhardin
04-01-2006, 07:29 PM
well i'll be d a m n e d. I got the bug you mentioned Oliver.

So I just tried LWSN on standalone mode without my script, and lo and behold...it's a LW bug. Haha. Well that lowers it's usefulness, doesn't it.

Ade
04-04-2006, 12:32 AM
Cant get it to run, BG Render launches LWSN then LWSN quits...?

Mac latest OS and latest LW on intel imac.

jeremyhardin
04-04-2006, 06:29 AM
sounds like it's finishing ade. oh wait...intel. that might return different processor information.

run this and tell me what number you get:


generic
{
currentplatform = platform();
info(currentplatform);
}


intel pc normally get's a "1" and mac ppc normally get's a "5". What does the intel mac get?

Lottmedia
04-04-2006, 04:57 PM
Just as a test report, I'm aware this is for 8:

It doesn't work with 7.5. I'm also testing the script with 8.0 and no objects are rendered:

Have to see his Pic to really apprech this. When I first looked at this I thought "well, it rendered the BACKGROUND!" :)

Casey :cat:

jeremyhardin
04-04-2006, 05:14 PM
sounds like it's finishing ade. oh wait...intel. that might return different processor information.

run this and tell me what number you get:


generic
{
currentplatform = platform();
info(currentplatform);
}


intel pc normally get's a "1" and mac ppc normally get's a "5". What does the intel mac get?

can any intel mac folks tell me what they get when they run the quoted script? (copy and paste that into notepad and save it as ANYTHING.ls and run it.)

zarti
04-05-2006, 03:21 AM
what if ....
... we have set up previously an basic scene and saved it.....
then ... while we are modeling in modeler....
save the model (included in the saved-scene-file)....
..... we can start the rendering of the 'being-modeled-model'.....
(i'm crazy..... or this is just a dream.....)
from inside modeler....

yes .... start a render from modeler.
is this possible?
maybe it is....
common people, any idea how to bring those two render buttons in modeler...?

jeremyhardin
04-05-2006, 06:27 AM
good idea zarti. yes it's possible, but it would need to know what scene to render, not just what object. would you mind pointing it to a scene file, rather than just having the one-click functionality?

zarti
04-05-2006, 08:24 AM
ok, here it is what i was talking about:

i can set up a scene with one plane 3 or four lights and the 'model' in center of it.
why not 3 o 4 cameras saved each in a separate scene (for single frame render button)
and one with a single camera animated, just to see the model from 8 different 'standard' views (for scene render button)
this model can be an early stage version, maybe a 'bounding box' of the model that i am modeling.
while modeling advances, we can see the model rendered with a certain level of texturing.
i know this can not be useful in many cases but can be very useful in many other cases. =)
i know there are many limitations, but it would be fantastic to 'render from modeler' and to see what we are modeling in any simple image viewer while thinking for the modeling proccess. we still are inside modeler. ;-)

jeremyhardin
04-05-2006, 08:59 AM
how about this...i'd have the script check the scenes folder for a scene with the EXACT same name (minus the extention of course) as the object and render it if it's found.

if it's not found, it prompts for a scene file, then renders that scene file?

zarti
04-05-2006, 09:28 AM
what if ....
... when we run the script, it searches on a specific folder and it brings up a list of scenes found on that folder.
maybe this folder could be preconfigured in the script.
so it's easy to find (like Objects, Scenes, Images, etc., folders are for Modeler and Lightwave)
we can add for example: ModScenes (Folder) in the *.CFG file of Lightwave which will make easier to find.
or, we can create that folder manually.

so, we choose one from those and when we press OK button, the render begins.
in this way the script has only one simple window.
only 2 clicks: 1-selection from list, 2-render confirm.
is this possible?

maybe you will decide to give e different name for Modeler Scripts.
maybe ...... a.... ModelPhoto. =)

siproductions
04-05-2006, 12:40 PM
Just want to say that you rock Jeremy. This is very useful. It will be very nice to have something like Maya's batch render in LW. Cheers man.

Cageman
04-29-2006, 11:42 AM
well i'll be d a m n e d. I got the bug you mentioned Oliver.

So I just tried LWSN on standalone mode without my script, and lo and behold...it's a LW bug. Haha. Well that lowers it's usefulness, doesn't it.

Ive played with the script and I must say it is very, very usefull! Thanks man!! As long as I don't quit LightWave when running the script, the configfiles are safe.

A suggestion though... it would be nice to be able to render a scene without having to open it in Layout first. Why? Well, the scene I'm currently doing is somewhat heavy. About 1.2 million polygons, and having it open while LWSN is rendering is a big no-no. I can clear the scene after submitting it with the script, though, but it would be much more intuitive to just open Layout and fire the script.

Anyways... great stuff here! I just can't belive that this isn't a standard with LightWave, at the same time, LW-community are blessed with people like you, Jeremy! :thumbsup:

Cageman
04-29-2006, 12:34 PM
Ohh... another featurerequest for this script:

I don't want the CMD-window to close automaticly. It would be nice to see how long it took to render the frame. :)

-EsHrA-
04-29-2006, 01:24 PM
Ohh... another featurerequest for this script:

I don't want the CMD-window to close automaticly. It would be nice to see how long it took to render the frame. :)

just look up when the picture was written on your hd :)
if you know how late it was when you started the render,
you know exactly how long it took to finish.


mlon

Cageman
04-29-2006, 02:31 PM
just look up when the picture was written on your hd :)
if you know how late it was when you started the render,
you know exactly how long it took to finish.


mlon

haha... yes... that is a nice workaround, however it can be hard to remember if you continue working on the scene or model. :/ :)

jeremyhardin
05-09-2006, 03:29 PM
A suggestion though... it would be nice to be able to render a scene without having to open it in Layout first. Why? Well, the scene I'm currently doing is somewhat heavy. About 1.2 million polygons, and having it open while LWSN is rendering is a big no-no. I can clear the scene after submitting it with the script, though, but it would be much more intuitive to just open Layout and fire the script.

not in the same script...and pc only right now...but it's something!

Batch Render LWSN (http://newtek.com/forums/showthread.php?p=379733#post379733)

Cageman
05-09-2006, 11:55 PM
Jeremy, thanks alot! Really cool that you give all these things for free. :thumbsup:

NanoGator
05-13-2006, 01:04 AM
Jeremy,

Couple of suggestions:

Regarding the 'Save the Scene' first prob, one way to handle it is to use the 'Save Scene Copy' feature in Layout to save a temporary version of the scene. The advantage here is that it won't overwrite what you're currently doing. You can then dump that file wherever you like. The deletion problem.. ermm.. I don't have a simple solution to that. Do you know if Master Class plugins will execute while running in screamernet? If so, you could write another script that blows the scene away once its done rendering. I think there's even pragma that would let you detect if it's running in SN or not, so it wouldn't accidently delete the scene you're currently working on. (Oops! hee hee)

Regarding the platform issue: A temporary fix would be to say: if(platform == 1) RenderInte(); else RenderMac(); Not great, but it'd get you past that problem until you get the info you need.

NanoGator
05-13-2006, 01:06 AM
Oh, regarding the multiple options bit, have you considered using a Master Class plugin? Since 8.3 or so, you can set an MC plugin to exist outside of a scene file and automatically open at startup, much like LS Commander does. You could have a small panel open up with the 'go' buttons. You'd even be able to add toggle switches with various features that might broaden the appeal of the plugin.

NanoGator
05-13-2006, 01:18 AM
how about this...i'd have the script check the scenes folder for a scene with the EXACT same name (minus the extention of course) as the object and render it if it's found.

if it's not found, it prompts for a scene file, then renders that scene file?

I can suggest an alternative approach. It may seem like a hassle, but it's really not all that bad.


Create a sample scene file in Layout with a basic object.
Set up the camera, lighting, saving options, etc.
Parent the Camera to a Null. Set up the Null so that if you size up the scale of it to match the model's largest extent, the camera will still see all of it.
Save this scene file.
Open up this scene file into a text editor and do a few little search/replace tricks to turn this into lscript code that adds it into an array. Something like this:


x[x.size()+1] = "LWSC";
x[x.size()+1] = "3";
x[x.size()+1] = " ";
x[x.size()+1] = "RenderRangeType 0";
x[x.size()+1] = "FirstFrame 1";
x[x.size()+1] = "LastFrame 60";
x[x.size()+1] = "FrameStep 1";
...

Once this is done, you can copy and paste this into your LScript.
Find the appropriate lines in the scene file and replace them with your own data, such as the location of the object file, or the size/position of the Null that the camera is parented to.
Write the array to an .lws file and have the render script execute it.


This may SEEM like a bunch of work, but it's really not all that hard. I've done it before, it's actually simpler than you'd imagine. The only catch is that it's easy to add 300 lines of code to your script. Hehe.

jeremyhardin
05-13-2006, 11:35 AM
Thanks for your suggestions Nano! your initial tips are good, but won't work in this case. here's why...

1. Save Scene Copy:
this would only work if I named it the same thing and the user didn't mind the file hanging around in their content directory all the time. The master class plugin would work, but that would kind-of defeat the purpose of bg rendering if it still needed LW open at the end.

2. Regarding the platform issue:
The options that are platform dependent (and crash-causing) must be declared outside of the brackets of a function. if statements must be used inside the brackets of a fuction. thus 2 different versions. if you look at the code, your suggestion is already in place for error checking, though.

3. Regarding your other suggestions (mc and custom scenes):
Good ideas, but not for the BG Render scripts. These will get error updates and such, but I've moved their functionality to a new set of scripts, Batch Render LWSN (http://jeremy.lwidof.net/lscript/#batchrend). And the editor is a MC script. :D
The modeler thing is a maybe someday for me, since I have yet to get Batch Render LWSN (http://jeremy.lwidof.net/lscript/#batchrend) working on Mac. Though they're open source so anyone can run with any feature they like, when it comes down to it. :thumbsup:

NanoGator
05-18-2006, 07:31 AM
Thanks for your suggestions Nano! your initial tips are good, but won't work in this case. here's why...

1. Save Scene Copy:
this would only work if I named it the same thing and the user didn't mind the file hanging around in their content directory all the time. The master class plugin would work, but that would kind-of defeat the purpose of bg rendering if it still needed LW open at the end.


No prob with the other ones, but I wanted to reply to this particular one: I didn't mean for the instance of LW that calls BG render to do the deleting. Here's the process I'm recommending:

1. Create a Master Class script that deletes the scene file when it's done rendering via Screamernet. (I'm pretty sure this is possible.)

2. Install this plugin.

3. When BGRender is activated, automatically add this plugin to the Master Class list.

4. "Save Scene Copy" to the root of the project directory.

5. REMOVE this plugin after save scene copy is done.

6. Run Screamernet with this scene. (The script is DONE now.)


Here's what'll happen: Screamernet will kick off with the new scene. When it finishes rendering, the newly added Master Class plugin (again, we're not in Layout anymore) will delete the scene file. No more mess.

:)

p.s. If you wanted to get fancy, you could even override the scene file's save settings by searching/replacing the newly saved Scene file and replacing the relevent line about what to do with the saved image. The advantage here is that you could force the name/type of the output image so that the user doesn't automatically have to set this. The reason I find this interesting is that I'd like the image to automatically show when it's done. So if it were a .JPG file, for example, the render script could just call it to open. (This could be part of the master class plugin I just described that's run by Screamernet.)

jeremyhardin
05-18-2006, 08:14 AM
Here's what'll happen: Screamernet will kick off with the new scene. When it finishes rendering, the newly added Master Class plugin (again, we're not in Layout anymore) will delete the scene file. No more mess.

If you've kicked off a render and closed LW, the scene copy would sit there until you've opened LW again. Then the MC script could check for the file's existence and remove it, then remove itself. But what about the in-between? The file's still there in the meantime. maybe I should make the scene file deletion part of the batch file at the end of the render? that could work.

BTW, have you checked out batchrender lwsn yet? I'd be curious to get your thoughts on it.

NanoGator
05-18-2006, 08:36 AM
Erm... will the batch file terminate after screamernet's done, or will SN just sit there counting...?

The scene file would be there until the render is done, although there's no reason why it couldn't be deleted when the render's started. LW doesn't care about the scene file once it's running. (Actuallyk I'm not sure I understand what you mean by 'in-bewteen'...)


I haven't checked out the file yet. Time's a bit limited, but I'll see what I can do. Just chimed in because I've done stuff like this before with LScript. :)

jeremyhardin
05-18-2006, 08:47 AM
I see where the confusion is. I thought you wanted to add the MC to layout in layout mode (rather than scene mode). so then the MC script would check for the file's existence and delete it whenever you ran layout.

But you meant to add the MC script to the screamernet scene only. that make's much more sense...but the screamernet MC script can't monitor when rendering is done. only an external process launched by that script can be monitored.

but I could just have a Delete Dos command as part of the batch file, i'm realizing now. so the batch file could kick off the render, then delete the temporary scene file when the render is done. then the batch file would be done.

NanoGator
05-19-2006, 03:29 AM
Ah.. cool.

Err not trying to perpetuate anything, but I think you can tell if a render's done. At least I know you can in Layout... maybe SN's different.

faulknermano
05-19-2006, 04:04 AM
Save Scene Copy: i suggest not even deleting any generated scene. but maybe putting it in some folder, either in the windows temp or inside the content directory (better). as long as it is neat and easily spotted. :)

jeremyhardin
05-19-2006, 07:08 AM
yeah, but SN is picky about scenes and content directories. while it would undoubtedly work in some cases...i'd suspect it to be a common cause of errors.

brian, how do you tell if a render is in progress or done?

Dodgy
09-09-2007, 04:23 PM
Dude, could you add the new multifile command to select multiple scenes to render? At the moment you have to pick them out one by one.

Also, the ability to reorder scenes would be good :)

Thanks!

Carm3D
09-09-2007, 05:45 PM
Hi,

I don't know if this was addressed or not.. But Screamernet does not render arbitrary frame ranges.. Only the simple beginning to end and step format. Does your script do this?

Dodgy
09-09-2007, 06:28 PM
I wouldn't imagine so, all it does is output screamer instructions, so if SN can't do it, then this script won't. I've added multi file loading support myself, here's the slightly edited script.