Custom weapon models invisible
-
My custom weapon models are not rendering in space, or on stations when exported using the 3DS max 2011 exporter. I’ve also tried Piper’s milkshape exporter without any luck. The old v0.3 CMP exporter for milkshape is the only one that allows the model to be seen in space, but it still will not render in stations!
I’ve been stumped by this issue for some time, hoping to find someone who’s had some experience making weapon models! Has anyone been able to fix this issue? Or any advice for making custom weapons would be greatly appreciated!
Edit: dropbox link to the weapon files
-
does it have a sur and hardpoints?
if missing it could prevent the weapon to show up
an empty hardpoint node could cause the samethis would be the most likely error sources (but not the only ones)
-
as Swat says but also is the texture .mat file okay and do you have it correctly pathed in both weapon_equip.ini and weapon_good.ini
Shop items are rendered by weapon_good.ini
Nice model btw
-
Some other things I can think of:
-Level of Detail makes the weapons invisble
-Incorrect material hash in VMesh Data
-surs are unlikely to cause problems
-Missing/Incorrect/Empty hardpoint data
-Wrong Material settings
-wrong normals on the model
-wrong settings/paths in the equipment inis
-broken model/mat fileThings you can try:
-Check FLSpew.txt
-use FLScanII and see if it finds something
-upload your utf-files so we can check -
SWAT_OP-R8R wrote:
does it have a sur and hardpoints?
if missing it could prevent the weapon to show up
an empty hardpoint node could cause the samethis would be the most likely error sources (but not the only ones)
It has a SUR and Hardpoints, as well as Rev and Pris data. These were the first things the people on the freelancer discord had me check, among other consistency checks within the UTF structure.
Thaddeus wrote:
as Swat says but also is the texture .mat file okay and do you have it correctly pathed in both weapon_equip.ini and weapon_good.iniShop items are rendered by weapon_good.ini
Nice model btw
Everything is pathed correctly I’m afraid. I suspect this issue has something to do with the CMP exporters themselves rather than anything in the ini files!
Cpt_Rei_Fukai wrote:
Some other things I can think of:
-Level of Detail makes the weapons invisble
-Incorrect material hash in VMesh Data
-surs are unlikely to cause problems
-Missing/Incorrect/Empty hardpoint data
-Wrong Material settings
-wrong normals on the model
-wrong settings/paths in the equipment inis
-broken model/mat fileThings you can try:
-Check FLSpew.txt
-use FLScanII and see if it finds something
-upload your utf-files so we can checkTreewyrm walked me through troubleshooting all the LoD and Vmesh stuff, and everything checked out, there were no corrections needed.
If the material hash was wrong then it shouldn’t show up in space either, right? But it shows in space, and is only invisible in the shop.Is there anything in particular I should look for in missing/incorrect hardpoint data? I hardpointed the same as any model and it has 3 hardpoints: HpMount, HpConnect, and HpFire01
It’s worth noting that if ini paths are wrong, the weapon won’t show up on your weapon list in space. This weapon however, is listed on the weapon list despite being invisible with the Max/Piper exporters. Shooting the weapon like this causes the weapon effect to spawn at the centre of the ship! I’m currently working with the CMP exported via the old milkshape cmp exporter as it’s the only one that makes it visible in space.
For normals I keep two-sided lighting turned off in Maya, so faces with reversed normals will appear black. Maya has a habit of reversing normals when you mirror geometry, so I have good habits with checking normals in my workflow. I’m also using hard edges on all faces with no smoothing! This also wouldn’t explain why the model is only invisible on the station, but visible in space.
It’s using vanilla mat files.
Nothing shows up in FLspew and FLscan doesn’t return any errors.Jeider wrote:
Please, upload your model to post. Want to try it by my hands.Possible reason: you haven’t Switch2 parameter inside model.
I’m unfamiliar with the switch2 parameter, how can I check this?
Included in the rar are the CMP, SUR, and the ini entries for weapon_good and weapon_equip that I’m using.
Drop Box LinkThank you all for your replies!
-
Your model haven’t Switch2 nodes.
Solutions (use only ONE of this two)
1. Just move VMeshPart nodes to *.3db and remove MultiLevel altogether. That will remove all problems with lods on this models forever. You can find example in my attached image
2. Copy Switch2 parameter from other models. You can find it in root of MultiLevel node in most of cmp models in FL.
That happened, because THN-scenes (base interiors) uses other way to get lod ranges for your model. In solution 1 your will not use lods anymore. In solution 2 you’ll fixed problem with missing settings.
Choose your way.
-
Copying switch2 from the li_cannon.cmp didn’t have any effect. Are there any changes I would need to make to the values inside switch2?
It’s something I’d like to learn in case I need to make stuff with lods later on.The first method of moving the Vmesh data up did work, and the weapon shows up in stations now.
Thanks so much!
-
If you want to use LoDs your cmp should look like this:
\ ----xyz.3db ----|----MultiLevel ----|----|----Level0 ----|----|----Switch2 ```You need to add values to the Switch2 node; In the vanilla models, it is a float array, that needs to contain a value for each Lod inside the model +1. So in your case, add a 0 and another value for the distance(in meters?) where the model isn't drawn anymore. You need to do this for every .3db in the file!