• Welcome to SC4 Devotion Forum Archives.

BAT4MAX V4-SimFox

Started by Kenworth, July 08, 2010, 04:15:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SimFox

Quote from: Blue Lightning on July 11, 2010, 09:59:26 AM
There's always a possibility of writing your own version... because it's really not too difficult of a process. It's the logical method of generating the s3d files, this process was not derived via decompliling the DLL. I merely came up with this from what I know about s3d files and observing how the BAT clips and splits the LOD.
Sorry, DLL has very little to nothing to do with ANY of the stuff you're listing here (much of which is wrong anyway). Virtually all of it done by scripts and process is rather different. More so it couldn't be done the way you list.

Quote from: Blue Lightning on July 11, 2010, 09:59:26 AM
1. View the LOD from the camera, decide which faces are visible (any face who's normal is perpendicular to the camera (+90 and -90) or between them (the 180 side) is invisible). Store this info for triangle mesh generation. Also remove any vertexes and faces that are hidden by other LOD geometry.
No need to decide any of this. Any face has normal, just evaluate it's angle in camera coordinate system. No need to store anything in teh mesh... all faces that face away from camera are simply deleted.
Quote from: Blue Lightning on July 11, 2010, 09:59:26 AM
2. Split the LOD according to 128x128 texture segments on the render image (or 256x256 for HD). Notate added vertexes for next step.
Yes copy of the LODs are sliced based on 256x256 view portion. If any dimension is smaller than 257pixels no slicing on this dimension is performed. I don't see any need to notate any of the vertices. You can always get all the vertices in a given mesh into array on a fly.
Quote from: Blue Lightning on July 11, 2010, 09:59:26 AM
3. Grab the vertex coordinates, switch the Y and Z, and invert the X and output to an array of vertexes, 1 array per segment.
I think this could be simply accomplished by turning coordinate system...
Quote from: Blue Lightning on July 11, 2010, 09:59:26 AM
4. Generate triangle mesh array. 1 array per segment
I don't see what this would serve. You already have this geometry. Why would you need to generate triangle mesh array. What is it anyway?
Quote from: Blue Lightning on July 11, 2010, 09:59:26 AM
5. Generate UV mappings according to vertex location when superimposed on segment.
It doesn't work this way, but no problem there is ready function that does the job.
Quote from: Blue Lightning on July 11, 2010, 09:59:26 AM
6. Generate raw s3d data
No need to generate anything. It is all done in the process - each cut is mapped and exported as 3ds file
Quote from: Blue Lightning on July 11, 2010, 09:59:26 AM
7. Insert the s3d into a DBPF file (.SC4MODEL in this case) via Reader or the like (the newest Reader has scripting capability, so you can have BAT4MAX or whatever generate the script and have Reader run it)
I wonder if DATCMD could be used for this very purpose. As far as I see it could. The only difference with inserting FSH files is that 3ds become s3d - is there any difference apart from extension name? At any rate worst come to worst Reader and it's import 3ds function could be used.
Quote from: Blue Lightning on July 11, 2010, 09:59:26 AM
8. Repeat for the rest of the views.
Naturally!

Anyway, much of this doesn't need to be re-invented. This functionality apart from actual exporting of 3ds is ALREADY in the scripts, always had been there. It is used to determine which of the cut slices of rendered image are actually saved and, most importantly, named, and later converted to FSHs later. Some are vestiges of original GMAX script.

yet the point remains why!? This will not expand functionality single bit, and wouldn't really be much of the time saving... It would, prolly be neat though...

callagrafx

Quote from: SimFox on July 11, 2010, 10:37:11 AM
Cal & MOREOPTIONS:
it is an interesting consideration. Yes we can't create SC4Model file. Yet we can perfectly do so with .DAT file in say iLive Reader. If that is also illegal that the whole mod thing would be illegal. As long as we have such empty DAT we can populate it with custom content. Beyond that I, to be honest don't see any technical or legal obstacles.

This section from the Maxis EULA prevents it....

QuoteEA owns all of the rights, title and interest in the Tools & Materials. You may not alter any of EA's trademarks or logos, or alter or remove any of EA's trademark or copyright notices included in or with the Tools & Materials or EA's products. Your right to use Tools & Materials is limited to the license grant above, and you may not otherwise copy, display, distribute, perform, publish, modify, create works from, or use any of the Tools & Materials. Without limiting the preceding sentence, you may not modify, reverse engineer, disassemble, license, transfer, distribute, create works from, or sell the Tool, or use the Tools & Materials to further any commercial or unlawful purpose. Without limiting the foregoing, you may not use the Tools & Materials to promote another product or business, or on any site that operates or promotes a server emulator.

You may include materials created with the Tools & Materials on your personal noncommercial website for the noncommercial benefit of the fan community for EA's products, provided this is beneficial to the product(s) in EA's judgment, and provided that if you do so, you must also post the following notice on your site on the same web page(s) where those materials are located: "This site is not endorsed by or affiliated with Electronic Arts, or its licensors. Trademarks are the property of their respective owners. Game content and materials copyright Electronic Arts Inc. and its licensors. All Rights Reserved." You will not represent that your site is endorsed or approved by or affiliated with EA or our licensors or that any other content on your site is endorsed or approved by or affiliated with EA or our licensors.

They own the rights 100% to the file formats used by SC4.  Any attempt to author these files without using the tools provided by Maxis is in breach of the EULA.  Not a good thing to do.  As it only takes seconds to export the LODs from gmax, what's the problem? 

Modding is not against the EULA, as we are not modifying Maxis content for commercial gain.

As for the large preview thing, it wasn't a biggie....certainly didn't need a thesis arguing against it  :D
The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it

Diggis

Quote from: SimFox on July 11, 2010, 10:37:11 AM
The other thing - inputting name in GMAX rather than saving file... Well I hardly see how it could be called useful... Convenient may be useful, not really it doesn't add any new functionality, saves absolute minimum of the actual work. In fact the only measurable saving is a space GMAX files would otherwise occupy on you HDD. Given that we are speaking purely LODs here it is vanishingly small.
Pretty much same as far as "last exported LOD" goes. A button like that simply saves clicking on File -> Import. That's it! Cause if you select to display your files in selection window by date modified... you last exported LOD file would always be on top.

I must say, you're definition of useful is very narrow.  :P  To me useful is anything that saves me time, space, mouse clicks.   The functions above do just save time which for me is a bonus.  I find it useful.  If you don't, no worries.

However, thinking on it, the name function may be needed for the batch renderer to work as it means you don't have to save the files on render when you do a batch export for the LODS from GMAX.

SimFox

#23
I fail to see how going the way Me and Blue Lighting suggest is different than modding. Does it (exporting 3ds into empty DAT file) suddenly become "commercial" I really want to find a logic her and am failing...

BTW how was it handled when original BAT4Max had been created?  BTW here:
"Your right to use Tools & Materials is limited to the license grant above, and you may not otherwise copy, display, distribute, perform, publish, modify, create works from, or use any of the Tools & Materials. Without limiting the preceding sentence, you may not modify, reverse engineer, disassemble, license, transfer, distribute, create works from, or sell the Tool, or use the Tools & Materials to further any commercial or unlawful purpose."

EA boils all down to exactly COMMERCIAL and UNLAWFUL purposes.  Creating DAT and stuffing it with files created by you is exactly same as creating say texture pack. You don't use EA/Maxis tools to edit those textures, you stuff them into file that is readable by the game.  So again how is this different from what we are proposing to do?

To be hones what I would be potentially more concerned it is the whole reverse engineering portion... but again from what I'm getting it refer, again to a commercial gain and same vague "unlawful" use. Cause ALL BAT4MAX is by definition reverse engineering.

But so are ALL mods as well - they take game mechanics and reverse engineer it... So I guess the key here is that same very commercial gain. as long as none of this is sold it's OK.

BTW we have one lawyer guy (from Alaska if I remember it correctly) may be we should ask him what does he think?

callagrafx

It's rather simple... and remember it's the file formats themselves which are protected as well as the IP to the tools. 

We never modify and distribute Maxis content, so we are not in violation of the EULA there. 
NAM and other mods OVERRIDE Maxis code, not alter it, so again we are OK. 
Finally, we don't sell content in SC4 proprietary file formats, so once again we are OK. 

However, if you try to reverse engineer the DLL then that does violate the EULA.  BUT... after some thought and re-reading, it DOESN'T say a new tool cannot be created.  Which actually leads me to think that, if someone could write a DLL for Max that did the same as the one for GMAX, but does so without plagiarising code from the Maxis DLL, then yes, it I guess it would be permissable.

And David (Dedgren) would indeed be the best person to confirm this...
The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it

Fluggi

Uff, after some searching in the thousands of areas hier in the forums, I just have a short general question about the BAT - I'm not using 3dsMax, I'm just interested:

Ist it possible to create a BAT Renderer who uses the GPU to render?
I think it would increase the rendering speed extremely, but I don't know if it is possible to realize or if Max just doesn't have the possibility to use the GPU.

SimFox

It might be possible...
What is important to keep in mind is that there are two variables here - MAX itself and then there is a Renderer. When it comes to render the first one (Max) is a sort of control mechanism. Is terns cameras around, cuts rendered images, assigns names etc, and, naturally, gives teh command to Renderer to render. Renderer itslef utilizes own set of algorithm to calculate illumination for each and every pixel in the final image. How exactly it is done, through power of CPU, like most current one do, or with power of GPU like it seem we all be rendering in couple of years from now shouldn't really be a problem as long as the renderer in question could accept command from MAX. And if it is built into max that should be taken as granted.

Of course there could be some issues. And there ARE some. For instance V-Ray doesn't support Camera overshot. so only what is in the camera cone of view is rendered what is outside of it is chopped off:


image by thianz

This creates limitation of how big models could be rendered with V-Ray as a renderer. I've first came across this issue back in 2007, and it still seem to be with us. And given that this is such a specific and "abnormal" way of rendering I seriously doubt it will ever be "fixed".
Another problem is with so called unbiased renderers (like say Fry Renderer) - these offer extreme simplicity of use with absolutely superior quality of output - it all suppose to be absolutely real (real laws of physics are simulated). Yet this accuracy comes at the cost -  no orthographic cameras - these are simply un-natural. Plus, it is always a human decision when any given picture is "ready" if you leave it Fry will go on and on and on improving it.

Quick silver in Max2011, so far imho has be a huge disappointment. It takes longer than well set Mental Ray and delivers worse results. But it seem to be consensus in tech community that GPU is the way to go, So, as I've said above, in couple of years that is how we'll render everything.

relics8801

#27
Hello  :)
I have a trouble with 3dsmax7 and BAT4max, Give me advice if you can please. ;)

I changed PC from WindowsXP sp3 to Windows7 PRO 64bit now.
B.A.T(Gmax) is worked fine (complete ti make .SC4Model), and as HD-PROPs as well.
But BAT4Max with 3dsmax7 is could not complete to export to .SC4Model....

I'd try to some versions of BAT4Max and had result as following.
-ALN Bat4Max V3.1 : Don't exported FSH,  None FSH-files in SC4Model.
-Bat4Max2.6HD : FSH-file are export to SC4Model, but all of FSH is BLACK images.(checked with ILiveReader)
-Bat4Max 2k edition v4.5(fixed) : Script Error and Stop script, Can't export.
-BAT4MAX5 : 3DSMax7 installed in "C:Program Files(x86)/" forcibly even if I appoint a folder "C:/" optionally.
I don't why can't installed in directly under "C:\", It cause is issue of an installer-exe maybe.

I confirmed that .BMP, FSH, .TGI, folders from began xxx.30000 are there in "\gamepacks\BAT\Outputfiles\" right. (with "ALN" and "2.6HD")


Can I use any BAT4Max right with 3dsmax7 and Windows7-PRO-64bit ?? ()what()

Thnaks for any helps. ;)
I helping to management a site the WBML4jp - wiki in Japan.

Girafe

Last bat4max plugin which should me 5 doesn't work with old version of 3dsmax, try 2010, 11, 12, 13 versions  ;)
The Floraler

This is the end, hold your breath and count to ten, feel the earth move, and then...

*   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *    *   *   *   *   *    * 

relics8801

#29
to Gorafe
Thanks, and I see. I had little misunderstand about a BAT4Max5. ;D


By the way,
I could solved a problem :),  A cause is my so easy mistake I had. :-[
I changed an "Installer-exe of 3dsmax7" to mode for compatible with WinXP-SP3, then I could install it to free directory I choose. ;) 
Before : "C:Program Files(X86)/Autodesk/3dsmax/"
Now :  "C:3dsmax/" (no used SPACE in a directory-name)
BAT4Max worked correctly and completed export FSH to .SC4Model right. :thumbsup:


Sorry to my elementary post and Thanks for helps. :)
I helping to management a site the WBML4jp - wiki in Japan.