It must be something else. There are compiled FX files in 'shaders\compiled\sm3' and these look different.
It must be something else. There are compiled FX files in 'shaders\compiled\sm3' and these look different.
There are two different file types used for displaying FX (the system is quite similar to the sound system of the EE2): We've got FX files (shaders\compiled etc., Santos is talking about these) and we've got BFX files which are essentially FX-Containers (BFX = Burnt FX).
It's analog to the sound system: We've got FMOD files containing the actual sounds on the one hand and BSC (BSC = Burnt Sound Container) files on the other.
Both BSC and BFX files (normally) start with easb followed by sbxf or sbhs (depending on it's use of course; I assume that sbxf might be any abbreviation for Shark Burnt FX or something along these lines), though I have seen quite some BSC dropping the easb-part. However, I haven't messed with BFX but I got quite a lot information on BSCs and I suspect that they might share some aspects.
One BSC/BFX can link to multiple FX/FMOD files, thus allowing sequential or random order playing of the FX/sounds. They can also modify the FX/sound (things like volume, I don't know anything for FX though) and set flags (like 'is 3D sound' for sounds). I can post some more information on the BSC format if anyone is interested; for a decent editor of anything FX related it will definitely be necessary to crack the BFX format as well as the game only calls BFX which refer to FX files.
3DS Max already has a free plugin called ShaderFX which can be downloaded and used to create custom Shaders for your models in real-time (for anyone interested).
Santos Tools 2 v0.35 released!
This is mostly a bugfix release but there are also some new exciting features (ok maybe not so exciting as last time ).
Major improvement in this version is the reworked mesh exporting code. I've fixed some errors with normal, binormal and tangent calculations and made the exporter aware of mesh smoothing groups. This may not sound like much but now your models can actually have the same visual quality as Relic models!
This is still a work in progress however and on some occasions smoothing groups might not be recognized by the exporter. Generally speaking it should always work correctly when something is not smooth and you want it to be smooth, but might not work the other way round. Version 0.4 will hopefully have full WYSIWYG system for handling smoothing groups.
With this version of Santos Tools you can also finally edit model damage states and data templates. This is that mysterious data that was carried over from imported model in previous versions. You can read more about it below, but this generally means that every bit in the MODEL file can now by tweaked with my little exporter.
The last new feature in this release is the ability to import and export simboxes and coverboxes. These are used for simulation purposes and cover point generation (presumably, still need to test this). This data is represented by a simple bounding box (dummy in MAX) and can be edited with standard MAX tools like Move and Scale (you should not rotate them though!). Feel free to experiment with this and be sure to share your results.
There's a new button available on 'Relic Model Export' rollout - 'Export Options'. This button will launch a small dialog, that let's you customize some export settings.
Let's start from the bottom:
This simply allows you to set output model file. If output file is set, you won't be prompted to save file on export anymore!
NOTE: For imported models, output file is automatically set to the source file. If you don't want to overwrite it you should change this setting before exporting.
This option controls simbox and coverbox export. It is generally harmless to export these files everytime you export your model, but it's good to have a choice, right? Notice that if simbox/coverbox doesn't exist in the scene, one or both check boxes will be disabled.
Now this is something that's really difficult to explain. Basically it let's you define events, state machines and variables for your model. Normally this is done inside MOTIONTREE file, however two items are commonly found also in MODEL files: state machine 'damage_states' and variable 'health'. I can't really say exactly when this should be exported and when not. I belive engine will merge the data anyway even if defined twice (in MOTIONTREE and MODEL) so you may export this with every model. Some models may not have motion tree attached and in such cases this should be always exported. A good idead here is to start with exisiting model and simply keep the settings (they are set on import).
This probably looks most intimidating but it's quite simple really. You need to tell the game what mesh group you want to be visible for each damage state. Damage state will change from 'healthy' to 'wreck' as the health drops, so you can use different meshes to show how badly model is hurt. If you have only one mesh group 'healthy' (common for infantry) you can set it like this:
If your model has a separate mesh group defined for every damage state you set it like this:
Any combination here is valid, you can even use the same mesh group for several states:
Note that your mesh groups should have the same names as damage states ('healthy', 'light_damage', 'heavy_damage' or 'wreck'). You can also tell the engine to use a mesh group for a given state but not provide it in your model. In this case model will not be visible in selected state. This is sometimes usefull, when model explodes on death and disintegrates for example. As with data templates it is best to look how this is set in Relic's models.
One last thing to note about Export Dialog is that everything you set here is persistent, which means it is stored in the scene file and will be loaded back when you open your file. Ain't this awesome?
As usual be sure to check the readme file and have fun!
Last edited by Santos; 11th Apr 10 at 8:57 AM.
Someone mention having Santos' babies? W-o-W!
I am currently having Santos' babies. Triplets. He my baby daddy! Kidding!
The only thing I'm wondering is when I look at the textures- they're all greyscale. Where are the color textures for the armors? Like the Black Templars, Blood Ravens and even the color schemes that have the colors quartered and halved. Are they a different format or different folders? I can't seem to find any of them.
they aren't even true greyscale. in fact a lot of them are a brownish colour. that's just the default textures.
the team colouring is done in game using the temp texture files
Could you add an auto weld option? and have it set the distance too? a lot of things require welding on import, and while its sometimes useful, its not most of the time :P
Last edited by horusheretic; 1st Apr 10 at 1:03 AM.
Visible damage to infantry/vehicles/monsters? DO WANT.
DͭͭE̲̪͛́A̧̪̗̝ͨ̂̄̆̎T̐̐͒͒̄̄҉̣̝͈ͅH͕͇̪̱̋̑ͣ̎̐ͬ ̧̝T̥̖͌Ơ͋͋̔ ̬͓̘̦̼̟̑̇̔͌ͮ͋̏Ṭ̷͇̙̻̳̪͕ͣ̑H̸͈ͦ̂̐͂͆ͪ̈́E̢̿̄͊̾͆͆ͪ ̵̈́̉͒E̺̤̿̈ͤͮ̌̉͜N͐̃ͦ̅̕E̷͇̗̜̔ͮͤ̽M̴̥̃I̳͑͐̌͘E̫̒́S̡̤̰̯͚̐ͯ̐ͤ
͖̐͒ͩ̊͆́̚O̝ͪ͗ͬͬͮͧF̫̪̗̘͕̎̒ͪͩ͋ͅ ̣͔̔́ͦͮT͋H̺͎̫͕̖̐͟Ê̓͏̳͕͇̫̭̝̻ ̓̍̓̍̓ͯ͗́F̙̭͙̪͇̤̲̉͑͒̓̈́͒A͊̑ͥ̆̀L̴͚͉͇̞̼̗̑ͧ͒̒S͔̺̘̟̻̬ͦ͐ͩ͛Ě̯̠̹̕ ̹̮̊̈̆̓ͬͅÉ͖̟̙̮M̀Pͭ̉́̑͐̑̏E̹̬̹̭̋̌̇́R͕̣̦͎̽ͮ͗̿ͮ̏͌͢O̘̬̩̘͍R̪ͮͣ
I've just found and fixed a small bug in simbox and coverbox export. Script was writing just one comma in a wrong place but this one comma was enough for a game to refuse to load these files. Download links are already updated. If you don't want to overwrite your settings, you can replace RelicModelExport.ms only, other files were not changed.
Excuse for my lack of knowledge in this area, but I was wondering, is there a way to keep the damage of a unit 'intact', after they received the said damage and healed up?
For example, FC starts out full HP, hence being model quality healthy. Once he drops down to say...heavy damage area, he'll have a damaged look. Once he heals back to full HP, keep the heavy damage look.
I'm still getting to grips with the export function (yes, I'm that stupid), so...just curious as if this can be done via your exports or it's something else specific (Scarcode such).
And oh, once again thank you for the all the time you're taking in doing this tremendous amount of work. I know it's not a quick thing, but still, with the constant updates and progressions, you're still faster then most people I know.
Thanks mate and cheers.
I guess day 1 DLC was too casual for EA, so let's start doing 8-month-early DLC! - Shuma
Eagerly awaiting DoW3 with mod tools. You hear me Relic?!
Well the model would've to be edited using Santos's tool obviously, but the rest... I don't even know if it's possible to do that.
Yes, that's what damage states are for (they can be edited with version 3.5 of my tools) I'm not sure however if setting this in MODEL file only is enough. Possibly you would need to do some changes in the code and/or to MOTIONTREE file as well. I'd suggest just trying this out. Add 'light_damage' or 'heavy_damage' mesh to some infantry model and see what happens.
i keep getting a error come up when export my model not to sure what it is anyone know.
--Unknown property: "variables" in 07 - Default:Standard.
Pretty cool. Ah, if we only could do some custom effects and animations now...
wow looks great!
feet need a bit of a matching texture, but other than that its great!!!
I'm gonna show you something shiny too. This is how stuff looks in my new super secret model viewer version. I got the shaders to work finally so this is actually drawn just like in game. As you can see I even got team colouring and badges now. It's nowhere near being finished though, so don't expect release anytime soon.
The blue is a bit... shiny isn't it???? :P
Brother Redemptor Jørgensen!
"It is my sacred duty to save your soul, and I will save it! Even if I kill your body in the process!"
MartinNJ's DoW II Mod Studio
Yeah, I'm still playing around with lighting and the color is full blue (0, 0, 255).
very cool I have no idea how you even start to make a model viewer, but it is a great program
does that mean you've got them working in max too?
after looking around the models a bit and editing a few textures offhand in Photoshop, i realise its quite useful to see the changes in max after thinking it wasnt completely important as you only see the diffuse texture.
my tau would agreeAh, if we only could do some custom effects and animations now...
I belive I could get this to work in MAX but it's a road full of pain (also known as MAX SDK ). I'm thinking however of turning the model viewer into material editor. It already loads materials from model file, so it's just a matter of adding some editing interface. Since model is drawn with the same shader as in game, you would be able to see your changes in real time.
that sounds very useful and a lot easy then going back and fouth in max.
quick question with the weapon glows are they set by the markers in max?
virtually all fx will either use bones or markers as a reference point, so yes.
yes pleaseI'm thinking however of turning the model viewer into material editor.
Excuse me whilst I be a total noob. I just exported a model with the targetting thingy for devastator sergeants, I named the material relic.material.space_marine_comms, and applied it to the appropriate object. All the textures have been set to the correct paths. When I view the model ingame, it's a very sexy shade of pink: http://screenshot.xfire.com/s/95180722-4.jpg
Any ideas as to what is causing this?
Pink texture = missing texture. You need to check your texture paths once again (make sure they are under your archive path).
My bad, after reading through one of the other threads I noticed they had to be under the archive path. Thanks for that
script doesnt seem to export on an object that uses two shaders on one mesh object.
For example, the gun belonging to one shader, and the scope using another shader. the scope is attached to gun.
it throws up:
heres the listener window:
max 2008 file:
It's not a bug. The rule is: one mesh = one material. If you need to have more than one, split the mesh.
Ok, so I'm using your latest version. Works fine on a bunch of models I created. Now I've created a new one and with this particular max file only it refuses to export. I've check that the file name is valid. It gives no error message or feedback whatsoever. The button press simply does nothing.
Did you add some sort of error handling? I've been trying to go through the script to find and remove it so I can get some feedback as to what is wrong (this helped a lot with your previous versions), but as I am not familiar with MaxScript I feel like it would be more effective to just use an older version.
 Using an older version generates an error regarding damage states.
Last edited by Clonesa; 7th Apr 10 at 7:48 PM.
I have a sort of feature request here. It is not so much for myself (as I've found my own solutions for it, thank you batch files and xcopy ), but there are others that I know would very much benefit from it.
Currently, you only set one path, the Data Archive Path. Basically, you'd extract the art files from the archives, so that when you import a model from the game it would be able to locate the textures immediately.
However, there are situations where a second "Mod Archive Path" would be beneficial. I.e., let's say you import the power_armour_common for the Space Marines, edit it's mesh and give it a new texture, but still want it to be named power_armour_common in your mod. You do however want it to use the original 4th Company badges, etc.
The way it is today, you would normally be required to have the DDS files in your Data Archive Path, and you'd have to export your model to it as well. Once you've created a few models it is easy for your files to get lost in confusion, overwriting files from the Data Archive that you'd need later, etc. You also usually wouldn't want your mod to be stuffed with files that are identical to the files in SGA archives, so in the example above, you wouldn't want your mod to include the 4th Company badges.
Having a second path would allow you to set it to the mod you are modelling. The script could run a "if the texture's path is within 'Mod Archive Path', make it relative to that, otherwise if the texture's path is within 'Data Archive Path', make it relative to that". It would allow you to have your own mods folder clean of any redundant files, and also solve the problem of people not getting their "custom" textures to show instead of the "regular" ones when setting their Data Archive Path to that of the source material rather than their mod (and alternatively, when setting the Data Archive Path to that of their mod, the textures they didn't change disappears from model).
EDIT: A late edit, but since there hasn't been any reply, I'll throw this in too. Whilst helping Eihger solve his issues, we stumbled upon something that had both of us puzzled. I'll throw the question first, then the details; Is the model meant to be like that (and if so, why Relic )? Or is it the importer doing something strange? Considering that the importer seems to be quite stable in general, and the size of the relevant chunk when viewed in the chunky viewer, I'd be more inclined to believe that the error (if there is any) is on Relics part.
Anyways, details. I tried importing art\race_ig\troops_wargear\armour\ig_armour\ig_armour.model. No errors at all, it all seemed fine until I noticed some strange protrusions in the LoD0 mesh... turns out there is a second "mesh" inside the mesh, and it turns out it isn't a duplicate either. I selected the "hidden" mesh here so it would stand out on the picture:
At that point, I was wondering whether the LoD2 and LoD0 meshes had somehow got merged... but there was already a seperate LoD2 object, so I decided to take the doubled up pieces (from inside healthy LoD0) and move them out of the mesh to get a clearer view. I also put them side by side with the other objects from the scene (wreck LoD0 and healthy LoD2). Since I still wasn't sure if it was a duplicate of LoD2, I decided to do a polycount too... and it still didn't add up. Here's what I got:
I honestly can't see that there's a double mesh when viewing Healthy LoD0 in the model viewer, nor have I ever noticed it ingame... although that could simply be a perceptional error.
So, is this a bug report that should be sent to you, or a bug report that should be sent to Relic?
Last edited by Kresjah; 8th Apr 10 at 12:01 AM.
Das Bavarian Franch Reich
13 kilograms og Belgian hair
19 incidents of prolapsus from France
66 liters of unaware pancreas-hatted English priests
1/2 soothing-voiced Norwegian baboon
SO as you read, Me and Kresjah worked on my model problems for about 8 hours and made some progress and then made some unprogress. While we got some models to export properly we ran into a major road block that crashes the Model Viewer and the game, upon loading.
After trying to figure it out,we found what we think is the problem
this is on my edited guard armor model
Now the head and Karskin armor exported just fine with no truncated image path. and this truncation only seems to happen on the second texture thats loaded. The first texture on the model works fine, its just the second one. Now We still haven't figured out the source of the problem but we are leaning more towards a glitch in the exporter.
All my files are available if you want to take a look at them, but basically my Max scene has two textures and 3 different objects attached to the same skeleton, the head and Karskin Armor work just fine and have no chunky errors, its only the main body.
Kres and I are rather buffeddled.
EDIT: After looking at the files again, ALL secondary textures on the Karskin Armor have been truncated just like in the image.
There's little error checking in the scripts atm, so when error happens you should at least be getting some info about it in script listener. I can't really help you much without looking at your file.
That makes some sense. Maybe having separate archive path for import and export script would be enough?
I'm getting only two meshes from ig_armour. Your 'Reset Scene' was unticked maybe?
Seems to me that your 'main body' textures are not under archive path. If that's not the case send me the files.
well if its a quick and easy fix how would I go about it? reset the archive path for the exporter? I thought I had to only set it once.
in any case I am sending you my max file.
model viewer is going to be a great help to us textures. you are a god.
Santos: Having gotten frustrated trying to solve the issue, I simply redid the model (read: hack job :P). I think the problem is related to the meta data, or whatever you want to call it, that is stored into a max scene when you use the importer.
What I did was import 2 .model files onto the same scene without using reset scene. The exporter then absolutely refused to do anything when I later tried to export it. The fix was to restart the model, import 1, save it as a .max, create a new scene, import the 2nd and merge the original .max file into the scene.
I know you are adding more features and have let us have even more control over this hidden data with the simbox and damage states options, but can we get a better idea of what exactly is being stored into the max scene so we can know what can potentially conflict and work around it?
Everything you can see in 'Export Options' dialog is stored in the scene. One object, defined in 'CustomModelData.ms', holds all these parameters and it is attached by the script to MAX root scene node (so you don't delete it by accident). That's all.
I wonder if you're able to reproduce this error (from scratch I mean)? Tell me the steps if you can.
I'll give it a shot when I can access my comp with 3ds max. Having a debug window option where we can read the values of the data you've added to the node would be great for isolating problems or potential bugs.
'Export Options' dialog does this everytime you open it. You can also query it with MAX Script (rootNode.customModelData).
The Export Options dialogue functions properly. Its the actual Export button that didn't work. I'm not at it right now so this is from memory. Hitting export resulted in no behavior from max (you can normally tell when its working on exporting), no messagebox pop up, no resulting .model file and no error message.
To address on the issues of Eihger first, I have no idea how long we actually sat there, but I wouldn't be surprised if it really was 8 hours like he said (and that is not counting the other PMs I've been doing the last days). We ended up putting up a full screen sharing so that I could actually, physically check his settings, etc., and I can say I'm fairly sure that his path is correct.
I should say, we did some significant progress and eliminated quite a few problems, but in the end it does seem like the script actually truncates the paths. I'm not sure if this actual issue with the exporter, or a result of a corrupted scene as I have never experienced this with any other model I've seen before.
To my recollection, when viewed in the chunky viewer, you can see that some of the materials vars have the correct path, whilst others are truncated even though they are in the same folder structure; so say (and I should say that this is just a theoretical example, as I don't have the broken files in front of me right now), the diffuse texture might be art\ebps\race_ig\troops_wargear\armour\ig_armour\ig_armour_dif, then you go check the dirt texture and suddenly that one is ops_wargear\armour\ig_armour\ig_armour_drt. I can't remember if the truncation could happen with vars in the same material, or if it applied would apply to all vars in one of the materials of the file whilst the other was fine.
I'll see if I can dig up the broken model again and find the specifics on that.
Hopefully it's just something that I missed after having sat there for that many hours straight.
EDIT: Was going to go straight and relax a bit, but then a changed my mind and decided to dig for the model before sitting down with my NDS. It does happen in vars of the very same material. A few samples from the second MTRL fold:
VAR sample 1:
VAR sample 2 (since I had the impression he wanted it to be a secret, I've replaced the identifying characters of the filename with a's, for a total of 5 a's):Code:....dirtTex....:...ops_wargear\heads\shared_textures\ig_trooper_common_a_drt.
VAR sample 3:Code:....specularTex....7...art\race_ig\troops_wargear\heads\ig_aaaaa_spc.
As you can see particularly from the dirt vs. specular tex, it trunctates one file path (dirt) in the same path tree, whilst the other one (specular) is like it should be.Code:....badge1Tex........s\ig_chesteagle.
I have not supplied the file as I presume Eihger has sent the source MAX file.
The guardsman strange mesh thingy. I was fairly sure that I had reset the scene, but for safety I did another import again on a clean scene, and indeed the mesh is there. As said though, these are two meshes inside a single object, not two objects with the same name.
Are you sure you used the latest version of the ig_armour when importing? What I mean is that according to the module file it will load more than just the art from GameArt.sga. Did a double-check of that too just now, going through each of the archives in the order they are prioritized by the game and found that 200_data.sga contains the strange ig_armour.model file. I did check the one from GameArt.sga too for safety and it does seem like that version is ok, so I presume this is just Relic having done something utterly stupid when patching up the ig_armour in the 2.0 patch... although I decided to post here first just to make sure before I bug report it over at the DoW2Com forums.
Regarding the paths, whether that is enough depends on how you intended on implementing it. Upon export, would it check for a the texture path match on both the import or export path, or just the export? In the case as I see it, it would have to do both.
To extrapolate on the example I made earlier, this is taken from an actual model that I have (jumbling the name a bit to keep the mod a secret ); The entire model uses a single material with the following maps:
- Badge1Tex: art\badges\units\sm_bloodravens
- Badge2Tex: art\badges\units\sm_rank_4th_company
- DiffuseTex: art\race_marine\troops_wargear\armour\power_armour_secret_default\power_armour_secret_default_dif
- DirtTex: art\race_marine\troops_wargear\armour\power_armour_secret_default\power_armour_secret_default_drt
- EmissiveTex: art\defaults\defaulttexture_emi
- GlossTex: art\race_marine\troops_wargear\armour\power_armour_secret_default\power_armour_secret_default_gls
- NormalMap: art\race_marine\troops_wargear\armour\power_armour_secret_default\power_armour_secret_default_nrm
- OcclusionTex: art\race_marine\troops_wargear\armour\power_armour_secret_default\power_armour_secret_default_ocl
- SpecularTex: art\race_marine\troops_wargear\armour\power_armour_secret_default\power_armour_secret_default_spc
- TeamTex: art\race_marine\troops_wargear\armour\power_armour_secret_default\power_armour_secret_default_tem
The only textures my mod changes are the power_armour_secret_default ones. The badge1tex, badge2tex and emissivetex are all identical to the Relic ones and should hence from a modders perspective be loaded by the game from the default game SGAs instead of from a mod. In order for the file to preview properly in max and not break the exporter though, I need to have these files in my mod folder although the redist version of the mod is not intended to have them, so I need to store a local copy in my mod and remember to delete it before packing it up.
My personal solution for this at the moment is to have an equivalent of DoW1's DataSrc structure, and have a batch file that uses xcopy to copy .model files and .dds files to the real mod folder, using an excludes list to not copy over the .dds I won't need for the models in a redist.
Last edited by Kresjah; 8th Apr 10 at 8:15 PM.
Ok, I had the old ig_armour extracted indeed. You were right Kresjah, there is a second mesh inside healthy:lod0:merged material-[ig_armour,relic.material.ig_armour]. I checked the file with hex editor and yes the mesh is really there, so it's not something exporter is creating out of thin air.
In other news: I'm currently finishing up the material editor.
awesome. could you add the option to load different animation sets?
rather than just loading up a skeleton and putting attachments on top.
Yes, possibly, but this tool doesn't have animation support yet. To make shaders work I had to rewrite rendering component in pure DirectX and animation part is not done yet.
My max just got butt-raped by platform mismatch so havent had time to properly test the scripts, anyway, how come all the .model files i open show op as blank in the viewers viewport, but it still loads skeleton and stuff like that?
There are currently 1 users browsing this thread. (0 members and 1 guests)