SC4 Devotion Forum Archives

Sim City 4 Devotion Tools => Tools - General Discussion => Topic started by: Diggis on March 05, 2009, 02:20:44 PM

Title: ALN Bat4Max V3.0
Post by: Diggis on March 05, 2009, 02:20:44 PM
It's finally here.  Sorry about the delay, but I have finally uploaded Chris Adams BAT4MAX to the LEX: http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=1992

There are pretty good instructions for installation in the Zip file, but if you have any problems please post them here.  This has had a pretty rigourous testing process and the integration with GMAX makes life much easier.
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on March 05, 2009, 03:12:40 PM
Not to mention all of the neat little tricks that Chris did for us Mental Ray people.  Set this as a sticky topic as it will serve as the official help thread as Diggis has said.
Title: Re: ALN Bat4Max V3.0
Post by: sim-al2 on March 05, 2009, 08:45:03 PM
First Dumb Question: If there is a seperate module for GMAX, what does it improve over the standard BAT? Is it meant primarly for 3dsMAX users, or can it be used by itself for GMAX Batting (if you don't have 3dsMAX  ::))
Title: Re: ALN Bat4Max V3.0
Post by: Diggis on March 06, 2009, 04:18:26 AM
Quote from: sim-al2 on March 05, 2009, 08:45:03 PM
First Dumb Question: If there is a seperate module for GMAX, what does it improve over the standard BAT? Is it meant primarly for 3dsMAX users, or can it be used by itself for GMAX Batting (if you don't have 3dsMAX  ::))

Hmm, I'm not sure, but I think that the GMAX files also have a batch renderer for GMAX which doesn't require 3DS Max.
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on March 06, 2009, 04:50:34 AM
These scripts are intended to replace all previous incarnations of Bat4Max.  To ensure a proper install, make sure you delete any previous versions/installations of BAT4Max.  Quickest way is to dump the gamepacks folder and the CPTB2Startup.ms startup script. 
Title: Re: ALN Bat4Max V3.0
Post by: XiahouDun on March 06, 2009, 04:54:23 AM
Quote from: callagrafx on March 06, 2009, 04:50:34 AM
Quickest way is to dump the gamepacks folder and the CPTB2Startup.ms startup script. 
In the ...\Scripts\Startup folder, just to be specific
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on March 06, 2009, 04:57:10 AM
oops yeah...sorry.   &ops
Title: Re: ALN Bat4Max V3.0
Post by: XiahouDun on March 06, 2009, 05:10:05 AM
Quote from: callagrafx on March 06, 2009, 04:57:10 AM
oops yeah...sorry.   &ops
Not a problem, the obsessing over details part of me got the mental image of someone going through the main folder looking for it, then installing the new BAT4Max thinking it was removed. Just thought that could prevent any issues that may come up :thumbsup:
Title: Re: ALN Bat4Max V3.0
Post by: swat-medic on March 06, 2009, 09:27:42 PM
Great work on this, and thanks a lot!  :thumbsup:
Title: Re: ALN Bat4Max V3.0
Post by: SimFox on March 07, 2009, 03:56:13 AM
Is there somewhere a list of features or new additions?
Title: Re: ALN Bat4Max V3.0
Post by: WC_EEND on March 07, 2009, 04:30:58 AM
Now I can finally render stuff in the BAT
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on March 07, 2009, 05:04:28 AM
Quote from: SimFox on March 07, 2009, 03:56:13 AM
Is there somewhere a list of features or new additions?

Not a definitive one...Chris went MIA before he completed a readme.  After using it extensively, I'll try and list the features I know about, and Diggis can maybe explain about the batch and GMAX integration.  Also, the setup is much improved, but that's already documented.  This is all off the top of my head atm.

LOD Utilities. 
A series of tools to help with LOD creation, such as the ability to select an object or multiple objects and make a skin-tight LOD...excellent for water models.
LOD export tools that will send the LOD files to a .3ds file (named as the .max file) then will auto-launch BAT.  You still have to import the LOD files

Lighting
Added support for different lighting rigs (included) that can be selected via pulldown menu.  Includes a fix for MR Sun/sky that prevents ever darkening scenes.
Support for Trunite, 2 pass and 3 pass night rendering.  Mental ray fully supported up to Max 2008.

Previews
Proper day & night previews based on LOD size, as you would get in BAT/GMAX.  Also added the ability to preview in persective mode, either day or night.  This will activate nightlights, including nightlibraries.  Invaluable for testing nightlighting

Under the Hood
Not sure exactly what's been done, but I know the gamma issue has been corrected and a lot of the "dead wood" has been removed.  Also there is no need for the deltree any more...the script will automatically clear outputfiles.

Batch export
A method where Max scenes are set up in a queue that match to a rendered output queue in BAT.  This allows multiple scenes to be rendered in one go, including FSH conversion.  As mentioned, Diggis has tested this part and is better placed to explain it better than me.

There are loads of other new nifty features that I cannot remember off-hand how they work (such as templates)....I suggest you download, install and have a look-see.
Title: Re: ALN Bat4Max V3.0
Post by: Diggis on March 07, 2009, 09:54:54 AM
BATCH RENDERER

With the batch renderer, you select the files you wish to export, (best to name them as you want the prop to be named, no spaces of course) and export the LODS.  This will fire up GMAX where you can batch export the exported files.  You then copy the names of the SC4Model files into a text file and then hit export on Max and go get a beer.  The last part is very important for those over 18.  Under 18, milk and cookies.

TEMPLATES

You can now select a template before rendering with any advanced setting you want in there.  This is especially useful in conjunction with the Batch renderer which will allow all the files to be rendered with exactly the same settings.  If you do not wish to do this BAT4MAX will just use the current ones. 

This also helps to prevent the issue of FSHman using the wrong GID on rerenders.
Title: Re: ALN Bat4Max V3.0
Post by: Cockatoo-210893 on March 07, 2009, 02:17:26 PM
Thanks for the quick reply Lee. I guess your right - I'll just have to try out both versions and make the decision myself. Ease of use it defiantly a high priority, but I'm also going to take into account the points Simfox made. We'll see.
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on March 07, 2009, 02:36:54 PM
There is a presumption with these scripts that you already know how to set up a mental ray environment for rendering.  Once you have that, simply save either as a template or as a scene preset that you can load in every time you want to render.  As I said, anything you need help with, just ask  :thumbsup:
Title: Re: ALN Bat4Max V3.0
Post by: francis90b on March 08, 2009, 03:28:54 AM
Hello, i would like to know the improvements that BAT4MAX can offer to gmax.
Thank you.
Title: Re: ALN Bat4Max V3.0
Post by: Diggis on March 08, 2009, 07:46:50 AM
Francis,  BAT4MAX is an addon for 3DS Max, which is the full, professional version.  GMAX is a cut down version of Max, with many many options removed.  To use BAT4MAX you need to have access to 3DS Max first.  The advantages of using full Max over GMAX is access to the full range of tools.

SimFox highlighted some issues with the lighting Rigs, which I think were the default Rigs from V2.  I'll look into this with Lee and update if necessary.

As for supporting this, yes, Chris is MIA.  However the scripts are solid, they work.  I have used them since August at least, with no problems.  I wouldn't have released this if I thought there were going to be script issues.  I anticipate any problems to be installation and use issues.  These Lee and I can easily answer.

I haven't used SimFox's scripts, but from what I understand Chris's scripts add more functions like the LOD creation, Rendering Templates and Batch renderer.  I use these constantly and can't imagine not having them again.  I can't really comment on the night lighting issues, I think that SimFox is possibly being a little fussy there, in game the difference is likely to be unnoticable.  As I mentioned above, he did highlight a valid issue with the Lighting Rigs which we will look into.
Title: Re: ALN Bat4Max V3.0
Post by: francis90b on March 08, 2009, 09:10:05 AM
Thanks, but looking at that statement "There are two basic parts to this, one for Max and one for Gmax, which can be installed independantly of each other." that is the first phrase after the title "lot description" in the BAT4MAX download, i' ve thought that the part for gmax can give some improvements to rendering, even for gmax.
Title: Re: ALN Bat4Max V3.0
Post by: Diggis on March 08, 2009, 09:19:03 AM
Ahhh, sorry mate, missunderstood you.  &ops

I will need to check exactly what has been added to GMAX by Chris, but I think the main thing is the Batch Renderer.  He may also have added the LOD utilities but not sure as I use Max.
Title: Re: ALN Bat4Max V3.0
Post by: Diggis on March 09, 2009, 05:32:48 AM
Thanks Lee.  Are you able to correct the Huge Rig?  Do you have a legacy version of Max to do that on?  We would probably want to do it in Max 6 or 7 as I know there are people still using that.
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on March 09, 2009, 05:58:37 AM
It's not really a problem to correct the Huge rig...However, If you have a model that is so huge as to require this lightrig, you are MUCH better off using MR Sun/Sky. Although for people not using 8, then a fix would definitely be in order.  Will look at this when I have more time.
Title: Re: ALN Bat4Max V3.0
Post by: Diggis on March 09, 2009, 10:58:09 AM
If you could attach the SC4Model to the post, or possibly email to my address I would be interested in taking a look. 

Are you using the rendering template to do this?  If so, which one or is it one you created.  If you didn't use a clean file to create the template it is possible to get the checkers.  Using a clean file to create the template means that there is no GID saved in the file which is what causes the checkers.
Title: Re: ALN Bat4Max V3.0
Post by: Diggis on March 09, 2009, 11:48:47 AM
I have used this extensivly prior to releasing it and, while I haven't used all the bells and whistles, I did test most of them.  I intend to post the list of features that you asked for, but need the time to do this, as well as adress your concerns.  I would like to see that model you rendered with the checkers and also the process you used to do it as the Rendering templates should have solved this issue, and have done for me. 

Edit: removed unnecessary info
Title: Re: ALN Bat4Max V3.0
Post by: SimFox on March 09, 2009, 11:50:03 AM
Quote from: Diggis on March 09, 2009, 10:58:09 AM
If you could attach the SC4Model to the post, or possibly email to my address I would be interested in taking a look. 

Are you using the rendering template to do this?  If so, which one or is it one you created.  If you didn't use a clean file to create the template it is possible to get the checkers.  Using a clean file to create the template means that there is no GID saved in the file which is what causes the checkers.

Here comes the offending SC4Modle file (http://rapidshare.com/files/207250648/ALNV3-0x5ad0e817_0xf9e9761b_0x30000.SC4Model)

At 600+Kb it is too large to be attached to the message...

To answers for your questions- nope I don't use any template. Although they whole issue with templates, or to be precise it's implementation is basically as for such troubles.
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on March 09, 2009, 02:21:05 PM
Quote from: BarbyW on March 09, 2009, 11:46:50 AM
SimFox, may I suggest you temper your tone somewhat in these posts. They are unnecessarily aggressive in tone. You may not agree or may have criticisms but there are pleasanter ways of posting them.
Locking this for now until Barby or Diggis decide to unlock it, as it's obvious Barby's post was not heeded.  ::)
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on March 11, 2009, 05:45:14 AM
Unlocking this to allow legitimate users who have questions to ask them here. Note that this is for support of Chris's scripts only, so no more discourses on it's merits or demerits please.
Title: Re: ALN Bat4Max V3.0
Post by: jeronij on April 19, 2009, 06:40:47 AM
Hello there,
I installed this new version yesterday, and the installation and startup went fine for max and gmax. The new preview options are fantastic and really really useful¡¡¡. I havent tried the new LOD/models export/import functions, but I am having problems with my first model  ::)

I cant get night lights to work. I am using MAX7 and I said "Yes" when I was prompted to use nighlights during the installation.

As soon as I rename an object an add the prefix "nitelite" (without quotes) and I try to render, the max stops and shows the error as seen in the attached picture.


Can someone pls have a look to the error screen and tell me what I am doing wrong  $%Grinno$% ??

Thanks in advance
Title: Re: ALN Bat4Max V3.0
Post by: jeronij on April 21, 2009, 10:35:36 AM
48 hours later....  ;D ... can someone give me a hand with this??. I'd love to use this version, but I need the nightlights  ::)  $%Grinno$% ¡¡¡
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on April 21, 2009, 01:24:16 PM
Hi JR

It may be possible that this was never fully tested as neither Diggis nor I have V7 so we both said "no"...I use nightlibraries and physical lighting rather than the BAT texture overrides.  I don't think Chris played with this code, just removed the UI if the choice was "no".  Sorry that doesn't help you, but you may want to look at using nightlibraries as an alternative.
Title: Re: ALN Bat4Max V3.0
Post by: jeronij on April 21, 2009, 02:10:18 PM
Thanks for the info Cal. Could you point me to some info about using those night libraries and setting up the environement lights?. It would be much appreciated   :thumbsup:
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on April 21, 2009, 02:37:31 PM
http://sc4devotion.com/forums/index.php?topic=4884.0
Title: Re: ALN Bat4Max V3.0
Post by: SimFox on April 21, 2009, 04:08:51 PM
Actually he did play with this code and the error message Jeroniji is getting is a direct result of that play. I sort of know what is wrong there but I don't know how deep it does go and I don't have the time to investigate. So simples solution is if you want to use nightwindows is to use alternative Bat4max
Title: Re: ALN Bat4Max V3.0
Post by: jeronij on April 22, 2009, 12:19:46 AM
Quote from: callagrafx on April 21, 2009, 02:37:31 PM
http://sc4devotion.com/forums/index.php?topic=4884.0

Thank you, I'll check this  :thumbsup:

Quote from: SimFox on April 21, 2009, 04:08:51 PM
So simples solution is if you want to use nightwindows is to use alternative Bat4max

Also thanks for the alternative  ;)

Anyway, I think I'll give a try to the libraries thingie first, because I love to learn new tricks  ::)  ;D

Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on April 22, 2009, 01:15:23 AM
Quote from: SimFox on April 21, 2009, 04:08:51 PM
So simples solution is if you want to use nightwindows is to use alternative Bat4max

or use a more realistic method of lighting  :thumbsup:
Title: Re: ALN Bat4Max V3.0
Post by: shenti on April 22, 2009, 09:53:57 PM
Google Translation

Hi
   
I have times a question is ALN Bat4Max V3.0 with 3dsmax 2009?? If so, how? I get it for me just not the way it Renders. Although I proceed according to instructions. I wish that this model (see picture) rendering what I built. Since it has poly 378000 gmax can I forget to render. Also 3dsmax 7 deals because I do not much with a Boolean and worked me in 3dsmax 7, the crane properly break something.

   
I hope it is me who can help

Mfg Shenti

German

hi

Ich hab mal eine Frage geht ALN Bat4Max V3.0 auch mit 3dsmax 2009??? Wenn ja wie? Ich bekomme es bei mir einfach nicht hin das es Rendert. Obwohl ich nach Anleitung vorgehe. Ich möchte nämlich dieses Modell (siehe Bild ) Rendern was ich gebaut habe. Da es 378000 poly hat kann ich gmax vergessen zum rendern. Auch 3dsmax 7 geht nicht da ich viel mit pro Boolean gearbeitet habe und des mir in 3dsmax 7 den Kran ordentlich kaputt macht.

Ich hoffe es kann mir wer helfen

Mfg Shenti

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fwww.ld-host.de%2Fuploads%2Fthumbnails%2Fc03394c3f7b595ccba1768b9512b7bce.png&hash=3613d56dbc760a7ce52dd7e0434a8ab81f67b9f0) (http://www.ld-host.de/show/c03394c3f7b595ccba1768b9512b7bce.png)(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fwww.ld-host.de%2Fuploads%2Fthumbnails%2Fb53da595ffd183d0edddb45824092451.png&hash=4c2392e7a66dadb3989a6f52eee1f53094c743e6) (http://www.ld-host.de/show/b53da595ffd183d0edddb45824092451.png)(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fwww.ld-host.de%2Fuploads%2Fthumbnails%2Fa1b629c358959af8adf03b8dd3b9cbd6.png&hash=5747d5d43e5b2d41626561af3201d1dfad9012af) (http://www.ld-host.de/show/a1b629c358959af8adf03b8dd3b9cbd6.png)(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fwww.ld-host.de%2Fuploads%2Fthumbnails%2F9c11640f6a004b5b386ea156b5c79d70.png&hash=e69f1c0e083686657b371da50ba7b9fe0cf0a5fe) (http://www.ld-host.de/show/9c11640f6a004b5b386ea156b5c79d70.png)
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fwww.ld-host.de%2Fuploads%2Fthumbnails%2Fcf8d6e338d8ed85078127db58eb8035f.png&hash=cae0746131e82bd7b0867b57723b8dc47dbe71dc) (http://www.ld-host.de/show/cf8d6e338d8ed85078127db58eb8035f.png)(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fwww.ld-host.de%2Fuploads%2Fthumbnails%2Fc53dfef623fb9ab602a26697c4f69a76.png&hash=29eede089eb644724f742ff855c1c00b96ef365e) (http://www.ld-host.de/show/c53dfef623fb9ab602a26697c4f69a76.png)(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fwww.ld-host.de%2Fuploads%2Fthumbnails%2Ff2fe7e613394bd0b44fbdc0f5bb9441c.png&hash=407363f1d26f1c5dfef336b5ab89417aabb0b543) (http://www.ld-host.de/show/f2fe7e613394bd0b44fbdc0f5bb9441c.png)(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fwww.ld-host.de%2Fuploads%2Fthumbnails%2Fcf8f91eeb1b7eba2a31fff9ba57d35f4.png&hash=c0e9b522b124be2802ff5cd7f878436a2ff29bfd) (http://www.ld-host.de/show/cf8f91eeb1b7eba2a31fff9ba57d35f4.png)
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fwww.ld-host.de%2Fuploads%2Fthumbnails%2Fc2a08c9e4bcb527f6a0066ac236ddf09.png&hash=61b7fa08f4ad287a5c1670ac27c16b208c1e37f0) (http://www.ld-host.de/show/c2a08c9e4bcb527f6a0066ac236ddf09.png)(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fwww.ld-host.de%2Fuploads%2Fthumbnails%2Fd1d914da854c36f01174e5ba2b08117f.png&hash=ee39c4e5b2951d5b456a3543a8cde829691de212) (http://www.ld-host.de/show/d1d914da854c36f01174e5ba2b08117f.png)(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fwww.ld-host.de%2Fuploads%2Fthumbnails%2Fd9b08c2db1effd4684abf241f9dbe285.png&hash=2b2db0a96c3493c981de9cff8fde7552df3fb8fe) (http://www.ld-host.de/show/d9b08c2db1effd4684abf241f9dbe285.png)
Title: Re: ALN Bat4Max V3.0
Post by: Andreas on April 23, 2009, 01:07:51 AM
Proper translation:

I have a question: can I use ALN Bat4Max V3.0 with 3dsmax 2009 as well? If so, how? For some reason, I can't get the renderer working, although I did everything according to the instructions. I'd like to render this model (see picture) which I have created. Since it has 378,000 polys, gmax won't work anymore, and 3dsmax 7 doesn't work properly as well, since I worked mainly with Boolean. 3dsmax 7 pretty much destroyed the crane model when I tried to use it.

I hope somebody can help me.
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on April 23, 2009, 01:15:02 AM
Thanks for the translation Andreas...In response I'd ask if Shenti could post some screenshots of the error messages (and if you'd be kind enough to translate those  $%Grinno$% ) so we can see if we can pinpoint the problem.  Also what lighting/renderer is being used?  There are issues with B4M and the new Mental Ray renderer.
Title: Re: ALN Bat4Max V3.0
Post by: choco on April 23, 2009, 05:38:20 AM
hmmm...i'll be watching this intently.  still haven't been able to make use of this......
Title: Re: ALN Bat4Max V3.0
Post by: Chrisadams3997 on May 05, 2009, 10:29:28 AM
Haven't been around in a while and just saw that Shawn and Lee released this.  It's been a while since I worked on the code, but you're problem Jeroni is actually fairly simple.  Diggis is right, the only change that the query box about night windows on your first startup makes is to the menu, removing some clutter if you won't be using nite windows. 

However, your problem I think comes with mixing up night windows with nitelites.  The object you named a nitelite is a polymesh according to the error message, but only light objects can have the nitelite prefix--as specifically only lights have the 'on' property.  The lack of that property in a polymesh was the cause of the error.

Setting a geometric object to have the old style night textures by contrast doesn't require any special prefixes, only that it be enabled for the object using the night windows UI.  That said, since I have Max 8 where the old night window textures cause a crash anyway, I haven't been able to test that they are compatible with the alterations in rendering script, so they may not work with my script anyway in earlier versions.  I have no way to check myself, and it's not a high priority as night libraries are more stable, more useful, and I've already built in the support for them for all rendering methods(night windows--if they still work at all--are only enabled in the old 3-pass render).

nitelites on the other hand should be fully functional for both simple and parametric lights in older versions of max to my knowledge.  If anyone runs into any problems in older versions however, let me know, a simple fix could be in order (Autodesk changed the property names around a bit over time as I recall).

I'll try to be around here to provide support, gather up some of my previous BSC posts on features, etc., and given time might also complete the help files for download.

EDIT:
catching up as I read here.
Shenti--As Cal said, if you can provide a screen shot of any error messages received, it'll help.  Hopefully Andreas will be around to translate this for you and vice versa ;) .

Chris
Title: Re: ALN Bat4Max V3.0
Post by: jeronij on May 05, 2009, 12:42:35 PM
Hi Chris, thanks for replying.

I tried enabling the night windows initially, but when I tried to render, the error message was something like "Unknow property" (I dont recall the exact wording now, and I dont have the Max at hand). I had to manually remove that parameter from the model's properties tab.

Because old night windows didnt seem to work, I messed things out and I tried to call the mesh a light. I understand the origin of the error I posted in the picture, but there is still something wrong with the regular night windows. A pity that you can not test it in Max7  &mmm
Title: Re: ALN Bat4Max V3.0
Post by: Chrisadams3997 on May 05, 2009, 01:05:20 PM
Yep, the problem is c.p. used a very different approach than the one I adopted in the rendering script itself.  While it worked fully at the time, it was very dependant on the material type and thus only supported the few that where part of Max when the original Bat4Max was written.  The number of material types since then has increased dramatically and using the same method isn't practical.  Given the changes, I half figured it would prevent night windows working in older versions as well, you've just finally confirmed that ::).  However the improvement in how nightlighting is dealt with, as well as greater capabilities of night libraries anyway overshadows that I think.

For now in that case, I'd just change the option in the Bat4Max ini file for night windows which will remove the ui for it.

Chris
Title: Re: ALN Bat4Max V3.0
Post by: SimFox on May 05, 2009, 02:10:54 PM
Chris! nice to see you back!

But about Jeronij problem you're, unfortunately wrong. Actual culprit is your script... In GMAX BAT, as well as in BAT4Max 2 it was possible to add nitelite prefix not only to lights but to the geometry as well. And it would be recognized as such by the script and nightwindows textures would be applied to it. Well technically it is a bit different, Texture isn't applied but underlaid and cut-outs are made, but anyway it worked.
It doesn't work anymore because you do collect wrong objects, or you collect objects on the wrong basis.
You do it on the basis of name, while you should have done so on the basis of object type eg collect only lights and then in selection made check for lights with specific property - namely prefix nitlite.

You're right though that it is easy to fix. All it takes is to take one word in a script... And since you're back now i hope you'll do it.
I would also like to exchange some ideas with you about reintegration into one development and compatibility with MR3.6+
I'm quite busy at the moment, but would have more time in about 10 days...
Hope you'll be around and not disappear again!
Title: Re: ALN Bat4Max V3.0
Post by: Chrisadams3997 on May 05, 2009, 05:13:11 PM
Ah, that's something I didn't know.  But even if you did allow geometry, the night window textures still wouldn't work, so it might be a moot point.  It's my personal opinion to move forward from night windows and, if anything were to be done on that front, increase the ease of using night libraries.  But given they work fine now, that's awfully low priority.

I'm actually curious what the fix you've mentioned is, but this isn't a development thread, we'll need to open a new one or continue an existing one(let's keep it on SC4D, I hate trying to post on Simtrop).  I won't be developing script wholesale like before by any means, but given a good discussion, I'd certainly contribute to scripting and integrating scripts in free time.  I've also glanced over the thread on your release, some promising ideas.  Just send me a PM when you're ready.

Chris
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on May 07, 2009, 09:38:40 AM
Quote from: Chrisadams3997 on May 05, 2009, 05:13:11 PM
I'm actually curious what the fix you've mentioned is, but this isn't a development thread, we'll need to open a new one or continue an existing one(let's keep it on SC4D, I hate trying to post on Simtrop). 

Actually here's probably the best place, as it'd be a fix to a reported problem, which is the purpose of this thread.   Welcome back Chris, we missed you over at the Nuthouse.
Title: Re: ALN Bat4Max V3.0
Post by: Chrisadams3997 on May 07, 2009, 11:16:49 AM
lol, I'll be around there as well Lee, I'm sure.  On the point mentioned you're right I suppose, I was more thinking about this line when making that comment:
QuoteI would also like to exchange some ideas with you about reintegration into one development and compatibility with MR3.6+]

Even with a proposed fix to allow the nitelite prefix for geometry though, I'm doubtful it will work in rendering for the reasons I mentioned before.
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on May 07, 2009, 03:40:44 PM
I can't see why anyone would need to use geometry with a nitelite prefix to be honest and I agree it more than likely wouldn't work, I was more thinking about the quick fix to Jeroni's problem that Simfox alluded to but for some reason wouldn't publish...
Title: Re: ALN Bat4Max V3.0
Post by: Chrisadams3997 on May 07, 2009, 07:14:41 PM
careful Lee, I know how you two are, no instigation...
from either side ;)
Title: Re: ALN Bat4Max V3.0
Post by: Diggis on May 08, 2009, 01:22:47 AM
Welcome back Chris.
Title: Re: ALN Bat4Max V3.0
Post by: jacqulina on May 08, 2009, 01:41:56 AM
welcome back chris
Title: Re: ALN Bat4Max V3.0
Post by: SimFox on May 08, 2009, 03:56:52 AM
Callagrafx:
I didn't say anything because the only thing that I could have said quickly and definitively at the time would have been - don't use this version of Bat4max!  It's author is missing, I myself see a lot of, what I perceive as, inconsistencies and excessive coding in script because of which it is a very difficult to find a way around, and the people who release it have no experience, knowledge needed to provide any kind of meaningful support for such a tool. Because support for such a tool is not telling people what button to press, but ability to fix some errors in code that may and will resurface.

Even if I would have been able to fix one function, and I really mean fix this function not simply replace it with mine, it would have taken me a lot of time and sort of made liable to continue provide support, e.g. basically doing your "job". Problem is that I'm not familiar with internal logic of the whole thing... It's just not time efficient. And giving simple indication of where in the script the problem in question starts wouldn't do you any good, now would it? So there was this dilemma...

Now since the Chris is back situation is radically different. I know I don't need to go and simply redo the thing. It would be sufficient to simply point to the spot...

And so I'll proceed to the task at hand:

Chris I believe that the root of the problem is your collection method. You choose to collect by the name (e.g. $nitelite*) and opened yourself for all sort of possible mistakes, or need for excessive checks, which you, in fact tried to make, but still missed some, which in turn resulted in a mistake Jeronij had encountered.

This issue, I believe would be eliminated if you would, well actually do nothing to the previously available function, or if there is still a need for a new one (although I don't see what would that be) followed the logic of previous ones and collected not names, but types (e.g. $lights). This way you wouldn't have a problem of geometry named nitlite* be in your array. and the existing check for prefix would weed out other lights (say those in light rig if that is present in the scene) and targets.

This is, of course a bit of poking in the dark, as I don't quite understand the logic there (what, for instance that array - gNiteLiteon - is collecting things for?) and Myself don't have Max 7 to run the changes through...

But I've presented my logic so you can consider it...

As to the farther development, yep I think we could and should revive the old thread it would provide a continuity in the process.

edit: fixed a meaning altering typo: "wouldn't" to "would"

Title: Re: ALN Bat4Max V3.0
Post by: Chrisadams3997 on May 08, 2009, 06:59:50 AM
placeholder post, when I get back this afternoon I'll look over your suggestions as well as explain the changes I've made to the function in question.  It's old design had caused me some problems that led to those changes, but I'll get into it then.

OK, the main reason I changed this function is that it ignores whether a nitelite has been manually turned off in a scene, which may be useful when modelling and previewing the night scene.  With the original implementation, if you wanted to see the scene without a certain placed nitelite, you have to delete it(or manually change the light to not be renderable if I recall correctly).  Having the Bat4Max render and preview reflect the actual state of the scene in this regard is just, in my opinion, better design and more intuitive and helpful to a modeler.  The primary element here is an array varaible, gNiteLiteOn used to save a list of just the nitelites that were turned on before this function turns them off for a night render.

As Simfox noted, by using $nitelite* to collect the array, I'd assumed the user would only name lights with that prefix, if anything else was given it, you'd get Jeroni's error.  Keeping the same principle I just talked about, I've written an alternate implementation using the method Simfox mentioned, and borrowing a bit from his V2.1 release code:

fn FnEnableNightLigts shine =
(
if ($lights.count > 0) do -- scene has local lights
(
if not shine then --turning nitelites off
(
--array to save nitelites that are on only, to be turned back on later
gNiteLiteOn = #()
--only "nitelites", remove spot targets, and only those presently turned on
for lt in $lights where (substring lt.name 1 8) == "nitelite" and lt.classID[1] != 4128 and lt.on == true do
(
--save them to array
append gNiteLiteon lt
--turn off the nitelites
lt.on = false
)
)
else --turning back on
(
--remove any lights from array potentially removed after nitelites where turned off
for lt in gNiteLiteon where (isdeleted lt or lt == undefined) do deleteitem gNiteLiteon lt
--turn on the nitelites that were on before
for lt in gNiteLiteon where lt.classID[1] != 4128 do lt.on = true
)
)
)


I've also changed the error handling of lights potentially deleted that exist in the array(a rare but potential scenario). Preliminary tests have had no errors, including with geometry named with the nitelite prefix.
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on May 08, 2009, 08:02:23 AM
Quote from: SimFox on May 08, 2009, 03:56:52 AM
Callagrafx:
I didn't say anything because the only thing that I could have said quickly and definitively at the time would have been - don't use this version of Bat4max!  It's author is missing, I myself see a lot of, what I perceive as, inconsistencies and excessive coding in script because of which it is a very difficult to find a way around, and the people who release it have no experience, knowledge needed to provide any kind of meaningful support for such a tool. Because support for such a tool is not telling people what button to press, but ability to fix some errors in code that may and will resurface.

Even if I wouldn't have been able to fix one function, and I really mean fix this function not simply replace it with mine, it would have taken me a lot of time and sort of made liable to continue provide support, e.g. basically doing your "job". Problem is that I'm not familiar with internal logic of the whole thing... It's just not time efficient. And giving simple indication of where in the script the problem in question starts wouldn't do you any good, now would it? So there was this dilemma...

Now since the Chris is back situation is radically different. I know I don't need to go and simply redo the thing. It would be sufficient to simply point to the spot...

And so I'll proceed to the task at hand:

You said:

Quote from: SimFox on May 05, 2009, 02:10:54 PM
You're right though that it is easy to fix. All it takes is to take one word in a script... And since you're back now i hope you'll do it.

So what was wrong with posting that "one word" so Jeroni could fix it?  He certainly has the ability to do so, as do many of us.  So tell me, how would that take a lot of time?  My "job" was to provide support on the use of this script in Chris's absence...

Quote from: SimFox on May 08, 2009, 03:56:52 AM
Callagrafx:
I didn't say anything because the only thing that I could have said quickly and definitively at the time would have been - don't use this version of Bat4max!
And why say that?  It's a very very very simple thing to use other methods of lighting that work 100% with this script...methods that have been tested and used in actual releases.
Title: Re: ALN Bat4Max V3.0
Post by: jeronij on May 08, 2009, 08:39:05 AM
Cal, I please you to keep focused in the technical side of the discussion. If you want to discuss off topic matters, please use the PM system.

I cant hardly see any positive contribution to the discussion in you last reply. SF explained reasonably already why he didnt say that word, and alternatives to circumvent the issue are fine, but they dont solve the issue itself  ;)

So, please again, keep the discussion focused in solving issues, and not in asking why's and how's.
Title: Re: ALN Bat4Max V3.0
Post by: SimFox on May 08, 2009, 09:26:15 AM
Callagrafx:
I've posted it, btw
but as I have explained it is dependent on my interpretation of the particular function. I'm sort of sure about it, but since I have no Max7 no Chris's Bat4max installed I can't be 100% sure. But yes it could and probably is as easy as changing 1 word. Understanding which one isn't, though. And in order not to make bigger problems than existing one it is essential to understand. It is sort of fool-proofing thing.
Anyway, since Chris is here I believe he'll sort this thing out now and I'll be helping as I could.
Title: Re: ALN Bat4Max V3.0
Post by: Kenworth on July 08, 2010, 03:08:52 AM
I have a question: Is Bat4Max V3.0 compatible with 3ds Max 2009? Because, i have this problem:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fwww.ld-host.de%2Fuploads%2Fthumbnails%2Fe0727047af60f3b0aedf7e810a429dee.jpg&hash=7220e196c84b5941936b8ee55483e877065d3273) (http://www.ld-host.de/show/e0727047af60f3b0aedf7e810a429dee.jpg)
Title: Re: ALN Bat4Max V3.0
Post by: callagrafx on July 08, 2010, 03:32:11 AM
In a word... no.  When Max 2009 was introduced, it came with a much improved Mental Ray engine, however these scripts are designed to work with older versions of Max that use MR 2.6  Chris hasn't been around to update the scripts to the latest version, so your only alternative is to use the scripts updated by Simfox. 

They can be found here --> http://www.simtropolis.com/stex/details.cfm?id=23088

Also, make sure you read this thread --> http://www.simtropolis.com/forum/messageview.cfm?catid=37&threadid=112233&enterthread=y