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
60 user(s) are online (17 user(s) are browsing Forum)

Members: 0
Guests: 60

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

Current balance: -300€
(last updated 11/2017)

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 61 users playing Freelancer on 29 servers.
December. 11, 2017

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post

« 1 2 3 (4) 5 6 7 »


Re: CMP Import/export dll
Just can't stay away
Joined:
2010/6/13 10:58
From France
Group:
Registered Users
$$$ Supporters $$$
Senior Members
Posts: 439
Offline
Amen!!

Posted on: 2011/10/27 21:38
Top
Re: CMP Import/export dll
Just can't stay away
Joined:
2009/4/8 11:06
From USA
Group:
Registered Users
Senior Members
Posts: 273
Offline
Geting a weird error when using this exporter seen here:

http://i113.photobucket.com/albums/n2 ... 1_01/errordllexporter.png

Any ideas why it's missing parts of the words used?

Posted on: 2011/10/29 13:26
Open in new window
Top
Re: CMP Import/export dll

Joined:
2009/9/3 7:07
Group:
Registered Users
Posts: 29
Offline
Try selecting a new filename or save to a different folder. (not the desktop).

Posted on: 2011/10/29 22:42
Top
Re: CMP Import/export dll
Just can't stay away
Joined:
2009/4/8 11:06
From USA
Group:
Registered Users
Senior Members
Posts: 273
Offline
Will do mate.

Posted on: 2011/10/29 22:45
Open in new window
Top
Re: CMP Import/export dll

Joined:
2009/9/3 7:07
Group:
Registered Users
Posts: 29
Offline
I just remembered, this only occurs when you first use the exporter. It uses the last filename for the VMeshLibrary.lod then replaces it when a new filename is selected. But if there was no last filename, it cannot replace it. This should be fixed soon.

Posted on: 2011/10/29 23:42
Top
Re: CMP Import/export dll
Just can't stay away
Joined:
2010/2/17 20:45
From Germany
Group:
Registered Users
Senior Members
Posts: 468
Offline
Your radius calculation is wrong. If I use a box with the size 80x80m, your radius is just 40, but it would need to be 69,28 or a bit bigger (tolerance value).

Schmackbolzen will write how to solve the problem via vector calculation.

Posted on: 2011/10/30 16:24
How to create .SUR files - Tutorial
Top
Re: CMP Import/export dll
Home away from home
Joined:
2008/7/8 21:15
From Germany
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 505
Offline
The problem is that the .cmp disappears too early out of view. For a correct radius you can e.g. calculate the center of each bounding box axis, then get the distance from each value to the max value per axis and from that calculate the vector length which is your radius.

Posted on: 2011/10/30 16:40
Top
Re: CMP Import/export dll

Joined:
2009/9/3 7:07
Group:
Registered Users
Posts: 29
Offline
I not following you guys here. What's with the radius and why is it dissapearing too early. What is dissapearing too early?

The radius of an 80M x 80M box, is 40M.

I calculated the radius as the longest distance from the center of the box to the farthest axis.
So that a box that's 80M long, 20M wide and 20M tall would have a radius of 40M. That's half of 80M. From the center of the longest distance.

Maybe if you could send me a copy of your exporter I wuold have a better Idea of what I would have to change.

Posted on: 2011/10/30 21:31
Top
Re: CMP Import/export dll
Home away from home
Joined:
2008/7/8 21:15
From Germany
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 505
Offline
The radius in that case is sqrt(40²+40²+40²)=69.282. It's the length of the vector from center to the farthest corner.

Posted on: 2011/10/30 21:42
Top
Re: CMP Import/export dll
Just can't stay away
Joined:
2010/2/17 20:45
From Germany
Group:
Registered Users
Senior Members
Posts: 468
Offline
The radius set in the CMP files are responsible for the drawing of a CMP(-part). If the radius of a part is to small, it will disappear from the view to early.

If you got ANY shape, you need to be sure that the sphere with your radius covers the whole shape.
All edges and corner points of a 80x80 box will be outside of a sphere with the radius 40, This sphere/radius just hits the outer surface of the box in just 1 point, nothing else. It will disappear to early.
You need to calculate the radius by doing the following:
The distance from the Center and the farthest corner point of the bounding box.

And be sure to do this for every cmp part

Posted on: 2011/10/30 21:43
How to create .SUR files - Tutorial
Top
Re: CMP Import/export dll

Joined:
2009/9/3 7:07
Group:
Registered Users
Posts: 29
Offline
Thanks for the quick reply. I didn't even think to use the sphere equation. Now, did you use the axis lengths or just use the longest vector.

Posted on: 2011/10/30 22:07
Top
Re: CMP Import/export dll
Just can't stay away
Joined:
2010/2/17 20:45
From Germany
Group:
Registered Users
Senior Members
Posts: 468
Offline
Sorry, but Schmacki already wrote his example equationfor the vector you need.
You always need the longest vector from the center of the bounding box and set this value for the radius.

Posted on: 2011/10/30 22:36
How to create .SUR files - Tutorial
Top
Re: CMP Import/export dll
Home away from home
Joined:
2008/7/8 21:15
From Germany
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 505
Offline
To formulate it more in the mathematical sense:
center(min,max)=min + ((max - min) : 2);

distance(min,max)=max-center(min,max)

radius(minx,miny,minz,maxx,maxy,maxz)=
sqrt(distance(minx,maxx)²,distance(miny,maxy)²,distance(minz,maxz)²)
This is just what I wrote but this time in strict mathematical notation. "distance" is of course the distance from the center, I shortened the name to keep it readable.


Posted on: 2011/10/31 20:50

Edited by Schmackbolzen on 2011/10/31 20:56:50
Edited by Schmackbolzen on 2011/10/31 20:57:27
Top
Re: CMP Import/export dll
Quite a regular
Joined:
2008/8/14 5:45
From Fusion's Forge and Factory, Valdez UV
Group:
Registered Users
Posts: 105
Offline
I'm sorry but I am unable to get either to work. Using 1.7.1 and 1.7.2, not wanting to mess with the cmp export 0.2 (which works just fine) in my 1.8.4. What am I doing wrong that your CMP import/export isn't doing right for me?

Fus

Posted on: 2011/11/9 8:43
Proud Member of Team [RIP] www.ripteam.com
Open in new window
Top
Re: CMP Import/export dll
Just can't stay away
Joined:
2010/2/17 20:45
From Germany
Group:
Registered Users
Senior Members
Posts: 468
Offline
Besides the radius problem of the CMP and it's parts I found another problem a lot of people will maybe get:

If you want to create LOD models, your LOD meshes need to have the same center point like the original ones.
The problem: Because of the poly reduction, the geometry and so the bounding box can change. Your exporter now generates another center point for the same shippart. In fact this means: LOD models can get big gaps between its parts because the original "high" poly mesh and the LOD mesh have different center points.

Another problem is animating the CMP meshes: For rotating animations you need to center the CMP part directly in Milshape where you want to have its rotation axis. Your program in fact always overrides this center point (the root in this case) with its own, bounding box based center point.

Both problems need the same solution:
You have to include a possible manual override for the center points of each CMP group your exporter wants to create.
By this you can, for example with the LODs, always give the LOD parts the same center like the FIX has, so they will be always at the same position with their center.

Oh and, why didnt you reacted to all our requests (some of them are really important for a perfect CMP exporter) in the last weeks? You are some kind of personated hope for a working CMP plugin So please please keep working for the whole communiy and its future.

Posted on: 2011/11/12 1:54

Edited by Skotty. on 2011/11/12 2:04:57
How to create .SUR files - Tutorial
Top
« 1 2 3 (4) 5 6 7 »