Author Topic: POF Constructor Suite 2.0 Loads its first model!  (Read 45241 times)

0 Members and 2 Guests are viewing this topic.

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
POF Constructor Suite 2.0 Loads its first model!
FOF as in Ferrium Object File :D
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
POF Constructor Suite 2.0 Loads its first model!
what exactly is the function for determineing the position of a polygon? is it just averageing all the points?
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
POF Constructor Suite 2.0 Loads its first model!
the mathematical centroid function.. here [hint: it's not a code problem]

Code: [Select]


float TotalArea=0, triarea;
vector Centroid = MakeVector(0,0,0), midpoint;


for (int i = 0; i < nverts-2; i++)
{
midpoint = Verts[verts[i].vertnum] + Verts[verts[i+1].vertnum] + Verts[verts[i+2].vertnum];
midpoint = midpoint/3;

// Area of Triangle defined by P1, P2, P3 = vector3d(crossProduct(p2-p1, p3-p1)).magnitude()/2

triarea = Magnitude(CrossProduct(Verts[verts[i+1].vertnum]-Verts[verts[i].vertnum],
Verts[verts[i+2].vertnum]-Verts[verts[i].vertnum])); // this needs to be area * 2
midpoint = triarea*midpoint;
TotalArea += triarea;
Centroid += midpoint;

}

Centroid = float(1.0 / TotalArea) * Centroid;
return Centroid;

PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
POF Constructor Suite 2.0 Loads its first model!
it should be noted that i know for a fact now that PCS 1.0 is NOT writing the norm part of the defpoints correctly it seems because occasionally i crash both PCS 1.0 and PCS 2.0 on parsing the BSP - walking off the end of the array
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
POF Constructor Suite 2.0 Loads its first model!
so basicly it's a weighted (by area) average of all the average positions of all the triangles in a polygon?

what if in the case of colocated polygons you used the average position of all points as a sort of tiebreaker?
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
POF Constructor Suite 2.0 Loads its first model!
bobboau: no.. and it would generate incorrect geometry - i tried an colocation-detection-and-avoidance algorithm before and it didn't work.

why do you think i hate blender so much
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
POF Constructor Suite 2.0 Loads its first model!
Blender: an argument for commercial 3d software. (unfortunately)
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
POF Constructor Suite 2.0 Loads its first model!
ok, what if you triangulated one of the colocal polies? (ignoring for a moment the likely complications of this)

 you could perfore this as a srt of preprocessing step

or at the least have some feature were PCS2 would highlight colocal polies
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
POF Constructor Suite 2.0 Loads its first model!
bobboau: then i'd end up with several colocated triangles

pcs2 could highlight colocated polygons.. but then i'd have to put a geometry editor in it for you to delete them [which i may do :P it wouldn't be incredibly difficult thanks to my using PMF for internal storage]
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
POF Constructor Suite 2.0 Loads its first model!
Bah. once you've hilighted them, they shouldn't have any trouble going back to the modeller and fixing things.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
POF Constructor Suite 2.0 Loads its first model!
mik: yes they would - many modelers don't support selecting and deleting a single polygon very easily
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
POF Constructor Suite 2.0 Loads its first model!
I have trouble imagining a 3d modeller that doesn't let you get at the polys. I'm used to TS and LW, I guess.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
POF Constructor Suite 2.0 Loads its first model!
bobboau please describe the auto-facet algorithm.

and everyone screw around this this build - you cannot really DO anything with it - but you can load models, move them around in the geometry viewer - look at the tree


Current Todo List:
  • Finish context Menus
  • Create Program Preferences menu - including texture paths
  • Implement texture loader
  • Implement standard editor windows
  • Implement PMF::LoadFromCOB
  • Implement PMF::SaveToCOB
  • Impelement Geometry Editor
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
POF Constructor Suite 2.0 Loads its first model!
Oooh, nifty. :) It does indeed take a while to load models - perhaps some sort of loading bar would be appropriate to show that it hasn't in fact locked up?

Oh, one very minor thing is that the open cob file stub is apparently broken - delivers the 'not yet implemented' message, but then crashes.
Lastly, what's the (/is there yet a) zoom control?
Looking good so far. Can't wait for the final thing. :D

Quote
Blender: an argument for commercial 3d software. (unfortunately)
Bah, it can do everything the big'uns can, and has only ever crashed twice for me. TS on the other hand..... :p
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
POF Constructor Suite 2.0 Loads its first model!
Quote
Originally posted by Vasudan Admiral
Oooh, nifty. :) It does indeed take a while to load models - perhaps some sort of loading bar would be appropriate to show that it hasn't in fact locked up?


i already planned that - forgot to put it in the TODO list above

I think a lot of the bottleneck is std::vector so i'm going to code my own dynamic-array class

Quote

Oh, one very minor thing is that the open cob file stub is apparently broken - delivers the 'not yet implemented' message, but then crashes.


thanks :D

Quote

Lastly, what's the (/is there yet a) zoom control?
Looking good so far. Can't wait for the final thing. :D


just like PCS press shift and you move the ship instead of rotating it - remember both mouse keys control different axis


Quote

 Bah, it can do everything the big'uns can, and has only ever crashed twice for me. TS on the other hand..... :p


hehe - blender doesn't crash itself - it just crashes other applications because the truely nasty output is
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
POF Constructor Suite 2.0 Loads its first model!
auto-facet normal generation:

if a poly has a material that is flaged as being auto-faceted, then the normal of each point on that polygon is the average of the normals of all polies useing that point that have a diference in angle less than or equal to the facet angle when compared to the normal of the source poly
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
POF Constructor Suite 2.0 Loads its first model!
k bobboau - i'm going to have to upgrade "textures" to "materials" in PMF and save that additional information

WARNING: Only save 'builds' to POF - Keep your working copies as PMFs for both performance issues and because until i can fix my BSP compilers DEFPOINTS generator i will not import point-normals from POF [just face normals
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline BlackDove

  • Star Killer
  • 211
  • Section 3 of the GTVI
    • http://www.shatteredstar.org
POF Constructor Suite 2.0 Loads its first model!
It opens most of my BWO .pof's. That's all I needed it to do really. Awesomeage.

Can't wait for newer versions.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
POF Constructor Suite 2.0 Loads its first model!
what POFs does it crash on?

[edit]
i need them for testing
« Last Edit: August 23, 2005, 10:45:46 am by 30 »
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline BlackDove

  • Star Killer
  • 211
  • Section 3 of the GTVI
    • http://www.shatteredstar.org
POF Constructor Suite 2.0 Loads its first model!
They're unreleased and secret - don't think I can share unless you can get a unanimous permission from IceFire and Ace and Bobbau, since they've worked on the stuff.

It times out on the HTL Golgotha (maybe my fault, waited for 10min though), it crashes on the normal Golgotha (Windows gives me the "send details to us for better spying" crap). Same for Charon. Some other files, it just simply doesn't recognise (don't know why).

Hmm. Doesn't recognise the HTL Erinyes and some BWO .pof's as well, weird that.

But it works on most of my BWO stuff, cruisers, bombers, fighters, etc.