"Cube Template" sample civ-colored model(not for play)

ArdRaeiss

Chieftain
Joined
Jan 11, 2004
Messages
84
Location
Russia, Saint-Petersburg
This is sample of how civ-colored unit can be created. Model is just box with simple texture. Model created as fighter(Dummy_FighterBody) without propeller bone(only basic MD, MD_NonAccum, Dummy_FighterBody, SOUND, EFFECTS, ATTACHEBLES bones). You can use fighter animation. If you want to place propeller or any other bone - just create it, place where you want and link with Dummy_FighterBody bone.
To export you must:
1) Select Default texture(left one)
2) Press "Apply" button under shaders list (you can press Reset as well, the Apply if enabled)
3) Apply texture to mesh.
4) Export as <Unit>.nif with Default Export Script(there is no custom animation)
Replace <Unit> with name of your unit.
5) Select Skinned_CivColors texture(right one)
6) Same as 2 - press Apply or Reset - Apply.
7) Apply texture to mesh;
8) Export as <Unit>_FX.nif

If you do all right, in nif viewer you can see first nif with purple circle in center and second with green.

Included in zip: max scene file, dds and tga texture, nif "finished unit" with FX version.

Hope this will help CivFanatics!
 

Attachments

  • Screenshot.jpg
    Screenshot.jpg
    95.8 KB · Views: 439
  • CubeTemplate.zip
    CubeTemplate.zip
    67.1 KB · Views: 104
ArdRaeiss said:
Psihedelic mod! Big flying boxes fights with the huge submersible spheres and small jumping dots!
Don't forget to scale down the size of this "puppy" :)

wow

that so reminds me of this stupid book called Flatland I had to read in geometry make in highschool about a worl of 2d being being visited by a 3d spere. Cultural hijinx ensued.
 
For some reason the FX version isn't visible in the NIF viewer (it's like the entire alpha channel is black or something). It's got all the right nodes but the model itself just isn't there. I can however select it and if I change the shader back to default one it shows up but of course the team color is no londer marked with green.

I tried both with main texture in base map and decal map empty, and with main texture in decal map and base with team colors, same deal everytime. I tried reseting and reapplying the shader and then reapplying the material, nothing. What am I missing? :confused:
 
Rabbit said:
For some reason the FX version isn't visible in the NIF viewer (it's like the entire alpha channel is black or something). It's got all the right nodes but the model itself just isn't there. I can however select it and if I change the shader back to default one it shows up but of course the team color is no londer marked with green.

I tried both with main texture in base map and decal map empty, and with main texture in decal map and base with team colors, same deal everytime. I tried reseting and reapplying the shader and then reapplying the material, nothing. What am I missing? :confused:

That's the exact same problem I've been having with my unit in the other thread. HERE

The funny thing is, I can get this cube ArdRaeiss provided to come out fine. But doing the exact same thing with my TIE Fighter unit makes the material invisible.
 
Check material properties on mesh(select full mesh and set 1(or 0?) number for material). Make sure you remove anything except bones and mesh(you can export light sources, but why you need "dead cargo" in model? remove).
Create box, attach your mesh to box, then delete box in 'object mode'. Reapply material to this 'cleared' mesh.
Check textures you use - it's 64*64, 128*128, 256*256 or 512*512? Any other sizes(except for damage states) CAN work wrong.
____________________
More you known about 'how-to-do-or-fix-something-right' - more frequently you answer "Hmm. I must look at this myself!"
 
Ok, I figure it out but there are issues.

First of all, what ArdRaeiss forgot to mention is that the model must be skinned to its dummy object. It doesn't seem that the entire MD structure (i.e. MD -> MD_NonAccum -> SOUND + EFFECTS + ATTACHABLES + objectdummy) is completely necessary, at least not for export to work as expected, but there is a thing here, more on that in a few lines. In any case it is best to use all the proper dummy objects.

So, anyway, the materials need to be done like ArtRaeiss says and you just need to have the object skinned to the dummy and it will work. I tested it with a shield which I attached to a model and was able to see the team color in games with no issues. I attached some screenshots, the first one is of the structure of the dummy objects, and the other two are of non-fx and fx materials respectively.



There is a big but here however...

It seems that to be able to attach the object with no issues you need to attach the entire scene root. When working with the non-fx version I tried to attach just the geometry (as usual) and also I tried to attach the geometry plus its dummy object (i.e. I dragged "dummy_shield" node to the bone) and in both cases the viewer crashed when I tried to save the unit. The FX version doesn't seem to have that problem. To work around that I tried to make the non-fx version using the regular way I used to export teamcolored models (i.e. no dummy objects). It seemed to work at first, I could see the model properly in the pedia but once I loaded a map the shield disappeared, from pedia as well. I guess there was a conflict between the FX and non-FX versions.

Anyway, as I said attaching the models using the entire scene root seems to do the trick but this will be a problem when trying to export entire units and attach to them animations from existing models (like for example what nautil and duel are doing).

Oh and one last thing, when I attached the shield using its dummyobject node it seemed to mess up its orientation and position so badly that there was no way to properly put it in place of the old shield without rotating it by small degrees, which is of course excruciating to do using the rotation matrix.

To Dual and anyone else who'll try to export vehicles with team color, let me know how it goes, you might see something I missed and figure out a better way to do this.
 
Success! :D

I was able to get the teamcolor working on my unfinished B-Wing unit by doing what you figured out Rabbit.

B-Wing_ColorTest.jpg B-Wing_ColorTest2.jpg

I did it slightly different though. After I prepared the FX version like you did with the bitmaps, I grouped all the parts of my model into one big group. Then I created a dummy, which I named "Dummy_JetFighterBody" since that was the origional unit I was going to link it to in the nif SceneViewer.

Next, I selected the unit group, and used the Skin modifier on it, after which I added the dummy to it with the "Add" button (under Parameters). After all that I exported the model as B-WING_FX.nif, and checked to make sure the teamcolor showed up in the SceneViewer (which it did).

To attach the Jet Fighter animations to the unit, I first opened up the JetFighter.nif file in SceneViewer and removed the Jet and Bomb models. Then I added the B-WING_FX.nif file to the scene, and dragged it's entire Scene Root into the JetFighter's "Dummy_JetFighterBody" node.

I did the normal B-Wing.nif file the same way in the SceneViewer. But I didn't bother with skinning the Dummy to it before exporting from 3DS Max.

When I tested it out in the game, the teamcolor worked perfectly, and all the Jet Fighter animations and sounds worked for the unit. :)

EDIT: After further playing around I've found that I don't need to name the Dummy anything special. Just leaving it with the default name after creating it worked fine.
 
Back
Top Bottom