Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
76 user(s) are online (34 user(s) are browsing Forum)

Members: 0
Guests: 76

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +5€

Current balance: 0€
(last updated 06/2020)

Please make a donation if you want to help keeping The-Starport online:

Bitcoin address:
Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 47 users playing Freelancer on 44 servers.
July. 6, 2020

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post



Custom weapon models invisible
Just popping in
Joined:
2/15 4:47
From Twelve days north of hopeless and a few degrees south of freezing to death.
Group:
Registered Users
Posts: 3
Offline
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

Open in new window
Open in new window
Open in new window


Posted on: 4/24 12:19
Top
Re: Custom weapon models invisible
Just can't stay away
Joined:
2012/8/10 14:03
Group:
Registered Users
Posts: 206
Offline
does it have a sur and hardpoints?
if missing it could prevent the weapon to show up
an empty hardpoint node could cause the same

this would be the most likely error sources (but not the only ones)

Posted on: 4/24 12:37
Top
Re: Custom weapon models invisible
Starport Staff
Joined:
2008/10/25 17:58
From On my way back
Group:
Registered Users
Starport Staff
FLServer Admins
Posts: 344
Offline
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

Posted on: 4/24 13:09
Top
Re: Custom weapon models invisible
Not too shy to talk
Joined:
2017/3/1 17:22
From Bavaria
Group:
Registered Users
$$$ Supporters $$$
Posts: 62
Offline
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 file

Things you can try:
-Check FLSpew.txt
-use FLScanII and see if it finds something
-upload your utf-files so we can check

Posted on: 4/24 14:55
FL Leuchtfeuer
Top
Re: Custom weapon models invisible
Quite a regular
Joined:
2010/6/13 13:38
From Russia, Penza
Group:
Registered Users
Posts: 164
Offline
Please, upload your model to post. Want to try it by my hands.

Possible reason: you haven't Switch2 parameter inside model.

Posted on: 4/24 18:47
Top
Re: Custom weapon models invisible
Just popping in
Joined:
2/15 4:47
From Twelve days north of hopeless and a few degrees south of freezing to death.
Group:
Registered Users
Posts: 3
Offline
Quote:

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 same

this 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.

Quote:

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.ini

Shop 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!

Quote:

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 file

Things you can try:
-Check FLSpew.txt
-use FLScanII and see if it finds something
-upload your utf-files so we can check


Treewyrm 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.

Quote:

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 Link

Thank you all for your replies!

Posted on: 4/24 21:58
Top
Re: Custom weapon models invisible
Quite a regular
Joined:
2010/6/13 13:38
From Russia, Penza
Group:
Registered Users
Posts: 164
Offline
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.

Attach file:



jpg  example.jpg (210.24 KB)
5167_5ea3572c17ee9.jpg 920X656 px

Posted on: 4/24 22:16
Top
Re: Custom weapon models invisible
Just popping in
Joined:
2/15 4:47
From Twelve days north of hopeless and a few degrees south of freezing to death.
Group:
Registered Users
Posts: 3
Offline
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!

Posted on: 4/24 22:48
Top
Re: Custom weapon models invisible
Not too shy to talk
Joined:
2017/3/1 17:22
From Bavaria
Group:
Registered Users
$$$ Supporters $$$
Posts: 62
Offline
If you want to use LoDs your cmp should look like this:
Code:
\
----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!

Posted on: 4/25 12:54
FL Leuchtfeuer
Top