Giter VIP home page Giter VIP logo

pcs2's Introduction

POF Constructor Suite 2.1 - Official Release

==================================================

Contents:

  1. Changes from 1.x
  2. What is PMF?
  3. Changelog
  4. Reporting Bugs
  5. Document History

1. Changes from 1.x


  • New Internal file format
  • New BSP Compiler
  • New Render Window design + capabilities
  • Moment of Interia (MOI)
  • Support for multiple-polygon leaf nodes in the BSP
  • Support for diffuse, glow and shine in render window
  • Renderer Support for Vertex Buffer Objects

2. What is PMF?


PMF is PCS Model File, it's POF Constructor Suite 2's internal model format.

It is a flexible model format that is easy to convert others into, and stores all the data needed for a .pof.

This makes it so that PCS2 only has to have one place in the entire code where any model format is converted to .pof. All supported formats go through PMF as an intermediary and as the active model editor.


3. Changelog


2.1:

  • Collada import and export
  • Affine transformations
  • Insignia editor and generator
  • Bounding box and radius editor
  • Many performance improvements and bug fixes

2.0.3:

  • Resolved OpenGL VBO related crash on model unload
  • Fixed issue with Geometry filter on/off flag being ignored (oops)

2.0.2:

  • Resolved #35 (graphics error when selecting textures with VBOs enabled)
  • Added "Use OpenGL VBOs (if able)" Option and enabled Vertex Buffer rendering
  • Resolved #64 "Sub-object rotation failure in PCS2.0.1 and 2d" reported by Water
  • Possibly Resolved #68 [and dups] "Inverted bounding box on submodel still showing up".
  • Possibly resolved #61 by adding Option to use or not use the geometry filter (default to on)

2.0.1:

  • (Installer) now write Conversion Options setting COB Scaling
  • BSPGEN's BSP Caching validation has been reokved - models not produced by BSPGEN had BSPGEN tags
  • Resolved an issue causing INSG (Insignia) Corruption (Mantis #59)
  • Resolved an issue with PCS2 not reading COB smoothing data correctly (Mantis #51)

2.0: Initial Release


4. Reporting bugs


Since the loss of http://www.ferrium.org/mantis/ all bugs should be reported here via the Github issue tracker. If a bug is already reported, add a note to the existing issue, otherwise create a new issue.


5. Document History


  • Mar 29, 2017 - Updated bug reporting
  • Jan 26. 2014 - Updated for 2.1
  • May 15. 2008 - Updated for 2.0.2 added Reporting bugs
  • Feb 11, 2008 - Updated for 2.0.1
  • Feb 9, 2008 - Initial revision for PCS2.0 Final release

pcs2's People

Contributors

asarium avatar chief1983 avatar goober5000 avatar niffiwan avatar sammc avatar the-e avatar tomimaki avatar trblount avatar z64555 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pcs2's Issues

Strings should probably be padded again?

Not as sure on this one, but retail pof strings always contain a null-terminator, and pad with 0s until the string length is mod 4 again (and does count that as part of the string's length). For instance, (where - is a 0 byte) "Detail0" should be len = 8, Detail0-, and Turret2a would be len=12, Turret2a----, where current PCS2 generated POFs are len = 7, Detail0 and len = 8, Turret2a

Otherwise, the rest of the file becomes unaligned.

OS X compilation issue

Looks like we may need to only use the c++11 standard definition with .cpp files? I tried with an older minimum Mac OS X version but it still uses the most recent framework available so not much else I can do I don't think. Are we currently applying CXXFLAGS to CFLAGS, or the equivalent, with this CMake setup?

CompileC build/src/PCS2.build/Release/pcs2.build/Objects-normal/x86_64/GLee.o src/GLee.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/cliffgordon/scp/PCS2
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch x86_64 -fmessage-length=256 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O3 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DCMAKE_INTDIR=\"Release\" -DILUT_USE_OPENGL -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -DUNIX -DHAVE_SYS_TYPES_H -DHAVE_SYS_STAT_H -DHAVE_UNISTD_H -DUSE_SDL -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -mmacosx-version-min=10.9 -Wno-sign-conversion -Wno-infinite-recursion -I/Users/cliffgordon/scp/PCS2/build/src/Release/include -I/Users/cliffgordon/scp/PCS2/src/pugixml -I/Users/cliffgordon/scp/PCS2/src/../res -I/usr/local/include -I/usr/local/include/IL -I/usr/local/lib/wx/include/osx_cocoa-unicode-3.0 -I/usr/local/include/wx-3.0 -I/Users/cliffgordon/Library/Frameworks/SDL.framework/Headers -I/Users/cliffgordon/scp/PCS2/src/fmt -I/Users/cliffgordon/scp/PCS2/build/src/PCS2.build/Release/pcs2.build/DerivedSources/x86_64 -I/Users/cliffgordon/scp/PCS2/build/src/PCS2.build/Release/pcs2.build/DerivedSources -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/cliffgordon/scp/PCS2/build/src/Release -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks -F/Users/cliffgordon/Library/Frameworks -DNDEBUG -fPIE -I/usr/local/include/wx-3.0 -std=c++11 -MMD -MT dependencies -MF /Users/cliffgordon/scp/PCS2/build/src/PCS2.build/Release/pcs2.build/Objects-normal/x86_64/GLee.d --serialize-diagnostics /Users/cliffgordon/scp/PCS2/build/src/PCS2.build/Release/pcs2.build/Objects-normal/x86_64/GLee.dia -c /Users/cliffgordon/scp/PCS2/src/GLee.c -o /Users/cliffgordon/scp/PCS2/build/src/PCS2.build/Release/pcs2.build/Objects-normal/x86_64/GLee.o
error: invalid argument '-std=c++11' not allowed with 'C/ObjC'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

Automatic MOI generation

When a bare .dae or .obj file is opened that does not already have some metadata for moment of inertia is loaded, MOI should be automatically generated then and there, just like mass is. The lack of this has been the cause of many errors and hair-pulling.

Additionally the "Are you sure you want to regen? I'm bad at it" prompt should be removed. Literally no one is doing the manual calculations, so you're the best we have shut up

Unnamed subobjects cause crash when exporting to Collada

Hades was attempting to export a model to DAE and PCS2 kept crashing. I did some checking and found two unnamed subobjects in the POF (nighthawk.pof from BP). Giving these subobjects names stopped the crash. I think we should make PCS2 auto assign names based on the parent subobject during export to avoid this. Any other suggestions?

Linux compilation issue with GCC 9.2.1

I get these errors when trying to compile PCS2. GCC 9.2.1

/home/tomi/PCS2/src/geo_sphere.cpp: In member function ‘ogl_vertex_buffer geo_sphere::make_vertex_buffer(int)’:
/home/tomi/PCS2/src/geo_sphere.cpp:189:2: error: ‘glGenBuffersARB’ was not declared in this scope
  189 |  glGenBuffersARB(1, &ret.buffer);
      |  ^~~~~~~~~~~~~~~
/home/tomi/PCS2/src/geo_sphere.cpp:191:2: error: ‘glBindBufferARB’ was not declared in this scope
  191 |  glBindBufferARB(GL_ARRAY_BUFFER_ARB, ret.buffer);
      |  ^~~~~~~~~~~~~~~
/home/tomi/PCS2/src/geo_sphere.cpp:192:2: error: ‘glBufferDataARB’ was not declared in this scope
  192 |  glBufferDataARB(GL_ARRAY_BUFFER_ARB, tri.size()*sizeof(vector3d),NULL, GL_STATIC_DRAW_ARB);
      |  ^~~~~~~~~~~~~~~
/home/tomi/PCS2/src/geo_sphere.cpp:193:23: error: ‘glMapBufferARB’ was not declared in this scope
  193 |  float*map = (float *)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
      |                       ^~~~~~~~~~~~~~
/home/tomi/PCS2/src/geo_sphere.cpp:196:3: error: ‘glUnmapBufferARB’ was not declared in this scope; did you mean ‘glXSwapBuffers’?
  196 |   glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
      |   ^~~~~~~~~~~~~~~~
      |   glXSwapBuffers
make[2]: *** [src/CMakeFiles/pcs2.dir/build.make:180: src/CMakeFiles/pcs2.dir/geo_sphere.cpp.o] Błąd 1
make[1]: *** [CMakeFiles/Makefile2:132: src/CMakeFiles/pcs2.dir/all] Błąd 2
make: *** [Makefile:84: all] Błąd 2

Unaligned bsp data causing a bus error on ARM

This is a 20-year old oversight, as this also happened on ModelView32, that on the readme it says that they were cutting what they belived it was useless data. And no one realised this since it just worked on x86.

The issue is that all bsp data, bsp colliders, etc, all chunks must be aligned so all offsets are divisible by 4, otherwise it would cause a crash when attempting to load the pof (and on a shield impact) on FS2 Open running on a ARM cpu, this case a Raspberry PI 3 and 4.

Original Volition model files are all aligned.

POF version 2118 Support

Due to everything that has been discussed here https://www.hard-light.net/forums/index.php?topic=96055.0 and on issue#15 #15 bumping the POF version to 2118 and create the "SLC2" chunk type in replacement of SLDC was the solution to pof alignment problems.

POF version 2118 must have all POF Chunk types aligned, this means, all chunks with a string on them (FUEL, GLOW, SPCL, TXTR, DOCK, PATH, SLDC, OBJ2) must have the proper space padding, and if the string is empty it must have 4 null terminators.

POF version 2118 also has a new chunk type, "SLC2", SLC2 is a revised version of the SLDC chunk, that changes the type of node char for a type of node int.

SLC2

uint tree_size
for each node, n {
int type // 0 = SPLIT, 1 = LEAF/polylist
uint size
if !type { // SPLIT
vector bound_min
vector bound_max
uint front_offset
uint back_offset
}
else { // LEAF
vector bound_min
vector bound_max
uint num_polygons
for each polygon, p {
uint polygon_addr // indexed into shield mesh face list?
}
}
}

It is just a clone of the SLDC chunk but with ints.

For compatibility, Pof 2118 must have both the SLDC and SLC2 chunks. No data has to be stripped away.

Doesn't support wxWidgets 3

Or at least seems to not and wx 2.8 is no longer available in ubuntu & derivatives. Should AppImage the sucker.

Anyway; here's the compile errors:

/home/mememe/src/PCS2/src/Main_Panel.cpp: In constructor ‘main_panel::main_panel(wxFrame*)’:
/home/mememe/src/PCS2/src/Main_Panel.cpp:190:9: error: ‘wxGA_PROGRESSBAR’ was not declared in this scope
         wxGA_PROGRESSBAR | wxGA_SMOOTH);
         ^
/home/mememe/src/PCS2/src/Main_Panel.cpp:199:23: warning: ‘void wxSplitterWindow::SetSashSize(int)’ is deprecated [-Wdeprecated-declarations]
  split1->SetSashSize(3);
                       ^
In file included from /usr/include/wx-3.0/wx/wx.h:14:0,
                 from /home/mememe/src/PCS2/src/main_panel.h:60,
                 from /home/mememe/src/PCS2/src/Main_Panel.cpp:120:
/usr/include/wx-3.0/wx/generic/splitter.h:225:31: note: declared here
     wxDEPRECATED_INLINE( void SetSashSize(int WXUNUSED(width)), return; )
                               ^
/usr/include/wx-3.0/wx/defs.h:615:43: note: in definition of macro ‘wxDEPRECATED’
 #define wxDEPRECATED(x) wxDEPRECATED_DECL x
                                           ^
/usr/include/wx-3.0/wx/generic/splitter.h:225:5: note: in expansion of macro ‘wxDEPRECATED_INLINE’
     wxDEPRECATED_INLINE( void SetSashSize(int WXUNUSED(width)), return; )
     ^
/home/mememe/src/PCS2/src/Main_Panel.cpp:260:24: warning: ‘void wxSplitterWindow::SetSashSize(int)’ is deprecated [-Wdeprecated-declarations]
   split2->SetSashSize(3);
                        ^
In file included from /usr/include/wx-3.0/wx/wx.h:14:0,
                 from /home/mememe/src/PCS2/src/main_panel.h:60,
                 from /home/mememe/src/PCS2/src/Main_Panel.cpp:120:
/usr/include/wx-3.0/wx/generic/splitter.h:225:31: note: declared here
     wxDEPRECATED_INLINE( void SetSashSize(int WXUNUSED(width)), return; )
                               ^
/usr/include/wx-3.0/wx/defs.h:615:43: note: in definition of macro ‘wxDEPRECATED’
 #define wxDEPRECATED(x) wxDEPRECATED_DECL x
                                           ^
/usr/include/wx-3.0/wx/generic/splitter.h:225:5: note: in expansion of macro ‘wxDEPRECATED_INLINE’
     wxDEPRECATED_INLINE( void SetSashSize(int WXUNUSED(width)), return; )
     ^
/home/mememe/src/PCS2/src/Main_Panel.cpp: In member function ‘void main_panel::on_load_chunk(wxCommandEvent&)’:
/home/mememe/src/PCS2/src/Main_Panel.cpp:685:89: error: ‘wxOPEN’ was not declared in this scope
  wxFileDialog fdlg(NULL, _("Select Import File"), _(""), _(""), PCS2_SUPPORTED_FORMATS, wxOPEN | wxFILE_MUST_EXIST);
                                                                                         ^
/home/mememe/src/PCS2/src/Main_Panel.cpp:685:98: error: ‘wxFILE_MUST_EXIST’ was not declared in this scope
  wxFileDialog fdlg(NULL, _("Select Import File"), _(""), _(""), PCS2_SUPPORTED_FORMATS, wxOPEN | wxFILE_MUST_EXIST);
                                                                                                  ^
src/CMakeFiles/pcs2.dir/build.make:326: recipe for target 'src/CMakeFiles/pcs2.dir/Main_Panel.cpp.o' failed
make[2]: *** [src/CMakeFiles/pcs2.dir/Main_Panel.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'src/CMakeFiles/pcs2.dir/all' failed
make[1]: *** [src/CMakeFiles/pcs2.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Need better release hosting

Currently, the only available release seems to be hosted on Mediafire. This is not as good a solution as we have in place for our other projects. Need to investigate setting up an automated CI/nightly/release build system after we have something cemented for FSO in 3.8. This could perhaps use bintray as well.

Better mass calculation

PCS2's automatic mass generation is based on the volume of the bounding box, which is a massive overestimate. It should use FSO's calculation when no mass is provided: 4.65 * (bounding box volume) ^ (2/3). This is also wrong and somewhat of an overestimate, but much less bad, and will do for now until a smarter algorithm can be made.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.