Commit Graph

2330 Commits

Author SHA1 Message Date
Michael PLATINGS
e91557fe1d From Martins Innus: The current fbx writer doesn't seem to support BIND_PER_VERTEX for normals. If you have this type of geometry it, exports the the first normal in the array over the whole primitive set. I don't know that the attached change should be applied as is, since I don't know enough about DrawArrays and Draw Elements to know if the indices for the vertices and normals are guaranteed to be the same. I tried it on a couple models and that seemed to be the case. The alternative is to have the logic down in setControlPointAndNormalsAndUV and set the normals there with the "vertexIndex" if the binding type is per vertex. Not sure what is cleaner. 2010-05-12 08:54:22 +00:00
Michael PLATINGS
047b70c265 From Martins Innus: allow the fbx exporter to reference textures correctly if the stateset is applied to the Geode instead of Geometry 2010-05-11 17:02:18 +00:00
Michael PLATINGS
c51e94725b Fix from Martins Innus for error: extra qualification 'FbxMaterialToOsgStateSet::' on member 'FbxMaterialToOsgStateSet' 2010-05-11 09:08:55 +00:00
Robert Osfield
22dfe6f8d1 From John Ivar Haugland and Michael Platings,
JIV:"I deleted a line from the ReaderWriterDAE.cpp file that was introduced in rev 11341. I got a crash on this line when the options pointer was NULL."
MP:"Good spot John. The next line is also unnecessary and can be removed as well (attached, plus some minor code beautifying)"
2010-04-28 20:10:53 +00:00
Robert Osfield
b459fb4a25 Added support for passing in an options string to control the orientation of the generated graph 2010-04-28 18:52:58 +00:00
Robert Osfield
dbbe73304a Added support for using graphviz dot for graphics visualization via <graph>filename</graph> token. 2010-04-28 14:56:38 +00:00
Robert Osfield
4143f2f839 Fixed typo 2010-04-28 14:55:42 +00:00
Robert Osfield
b86431fdf7 Added colours and different style to drawable and statesets 2010-04-28 14:55:07 +00:00
Michael PLATINGS
324ddd0ca3 No longer removes redundant nodes because node structure may be important. 2010-04-28 14:05:47 +00:00
Robert Osfield
dfda4ce35f Replaced afprintf usage with std::string to fix memory leak and improve portability of code. 2010-04-28 10:15:16 +00:00
Robert Osfield
3bef6f9eae Implemented Colin MacDonald's recommended change of "unsigned short" to "unsigned" to solve big endian problem under Solaris.
Also added comment to highlight the oddity of the mixing of types in the associated lib3ds code.
2010-04-20 13:34:57 +00:00
Robert Osfield
2c64536a09 Replaced tabs with four spaces 2010-04-20 11:38:38 +00:00
Robert Osfield
31e8e37dbd From Jason Beverage, "Here is a fix to the curl plugin CMake to allow it to link against the
CURL_LIBRARY_DEBUG and ZLIB_LIBRARY_DEBUG.  Previously it linked the
debug version against the release libs, which was causing a hang when
running in debug mode on Windows."
2010-04-20 11:23:08 +00:00
Robert Osfield
a8c4fd8761 From Wang Rui, "The new osgShadow and osgFX serializers are attached, and some
modifications of the osgShadow header naming styles as well. The
osgDB::Serializer header is also changed to add new Vec2 serializer
macros because of the needs of osgShadow classes. It should compile
fine on both Windows and Linux. But I have only done a few tests to
generate .osgb, .osgt and .osgx formats with these new wrappers."
2010-04-20 10:29:04 +00:00
Robert Osfield
a0781cba6c From Mourad Boufarguine, "This submission fixes osgDAE::toString(*) unresolved external symbols compile errors (on VS)." 2010-04-20 09:48:45 +00:00
Robert Osfield
c091b5c2d1 From Stephan Huber and Mathieu Marache, "attached you'll find framework support for os x via cmake. Please credit
Mathieu Marache, he added the last missing piece to this puzzle.

I think it is safe to commit these changes to trunk, as the traditional
way via dylibs should work as before.

Here's some more info how to get frameworks:

With these modifications it is possible to compile frameworks on OS X,
when you set the Cmake-option OSG_COMPILE_FRAMEWORKS to true. If you
want to embed the frameworks in your app-bundle make sure to set
OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR accordingly.

You'll have to build the install-target of the generated xcode-projects
as this sets the install_name_dirs of the frameworks and plugins."
2010-04-19 13:44:42 +00:00
Robert Osfield
488eac94f7 From Wang Rui, "Attached is the osgAnimation wrappers for serialize IO operations. A
few headers and the osgAnimation sources are also modified to make
everything goes well, including:

A new REGISTER_OBJECT_WRAPPER2 macro to wrap classes like
Skeleton::UpdateSkeleton.
A bug fix in the Seralizer header which avoids setting default values
to objects.
Naming style fixes in osgAnimation headers and sources, also in the
deprecated dotosg wrappers.
A bug fix for the XML support, to write char values correctly.
A small change in the osg::Geometry wrapper to ignore the
InternalGeometry property, which is used by the MorphGeometry and
should not be set by user applications.

The avatar.osg, nathan.osg and robot.osg data files all work fine with
serializers, with some 'unsupported wrapper' warnings when converting.
I'm thinking of removing these warnings by disabling related property
serializers (ComputeBoundingBoxCallback and Drawable::UpdateCallback),
which are seldom recorded by users.

By the way, I still wonder how would we handle the C4121 problem,
discussed some days before. The /Zp compile option is set to 16 in the
attached cmake script file. And is there a better solution now?"
2010-04-19 10:35:18 +00:00
Robert Osfield
6ec106b31a From Paul Martz, fixes for static build 2010-04-19 09:39:39 +00:00
Robert Osfield
70d78c0713 From Colin McDonald, "The new 3ds plugin isn't working at all on big-endian machines, due to
a byte order issue.

The problem is that osg::SwapBytes code has been copied from the old
plugin to the new one, but the latest lib3ds also incorporates code to
handle byte ordering in read & writing.  So the net result is that the
swap is done twice.

The solution is simply to remove the custom osg code, and use the
stock lib3ds code.  The attached files are against today's revision
11331.  I've tested on Sparc & Intel.
"
2010-04-15 18:40:40 +00:00
Robert Osfield
51d377c9f6 Ran dos2unix on header files 2010-04-15 18:38:32 +00:00
Robert Osfield
6b73cef997 Ran dos2unix on lib3ds files 2010-04-15 18:38:03 +00:00
Robert Osfield
3700263e08 From Sukender, "After discussion with Paul Martz, here is a fix for 3DS reader/writer (on rev. 11315) + some changes. Changelog:
- Fixed handling of MatrixTransforms (still doesn't support other Transforms types). Fixes things for OSG, DeepExploration, 3DSMax...
- Added support for writing double precision vertices by converting them.
- Added base code for future compatibility option (3rd-party apps that don't read animation data). See "DISABLE_3DS_ANIMATION" compile flag."
2010-04-15 11:49:33 +00:00
Robert Osfield
72e6867679 Changed std::pair declaration to ListTriangle::value_type to avoid Solaris compile errors 2010-04-15 11:40:49 +00:00
Michael PLATINGS
d5fafcecbd Updated the plugin to be compatible with version 2011.2 of the FBX SDK 2010-04-14 16:43:50 +00:00
Michael PLATINGS
8e53cfe6fc Added support for double precision geometry 2010-04-13 14:50:31 +00:00
Michael PLATINGS
25cd2970c5 osgAnimation now stores times as doubles 2010-04-12 16:35:15 +00:00
Michael PLATINGS
5d64318597 From Sukender: Fixed FBX writer: now handles double precision arrays (vertices, normals, texcoords) 2010-04-12 15:04:25 +00:00
Robert Osfield
c6c26d5d44 Change Terrain so that it subclassed from CoordinateSystemNode.
Implemented new update scheme of GeometryTechnique to avoid potential threading issues.

Added Terrain support to .ive.
2010-04-03 16:21:34 +00:00
Robert Osfield
fe5527f332 From Mathias Froehlich, "I added some features to the vrml plugin.
The plugin can now handle embeded PixelTexture fields in addition to the
already implemented ImageTexture fields.

Fixed a bug with texture repeat being applied to the wrong texture dimension.

Added handling for IndexedLineSet geometries."
2010-03-25 14:19:01 +00:00
Robert Osfield
99b6b268bc From Michael Platings, "the attached files fix the DAE importer for animations that don't contain channels for all X, Y and Z components, as exported by SoftImage." 2010-03-22 17:55:14 +00:00
Robert Osfield
8a39ece376 From Chuck Seberino, "have a fix for the reading code in trunk/src/osgPlugins/gz/ReaderWriterGZ.cpp. It seems that the std::istream::readsome method on windows is a no-op (for files. After much head scratching and research I was able to figure out what was going on. I am submitting a fix to replace readsome with read() and gcount(). This change is for all platforms. The previous implementation works fine under linux and OSX, so if you would rather keep things the way they are you can just #ifdef for non-WIN32.
I also added openmode flags to the ifstream constructor, since they were needed to get proper reading as well as a typo fix."
2010-03-22 13:13:22 +00:00
Michael PLATINGS
03d5b81a6f Workaround for files exported from SoftImage that don't tag skeleton nodes correctly. 2010-03-19 20:12:19 +00:00
Michael PLATINGS
f053c6c567 From Paul Martz: This is a fix to get the FBX plugin to compile on OS X 2010-03-19 18:28:20 +00:00
Michael PLATINGS
328c19dad9 Fixed an infinite loop when loading a malformed file. 2010-03-19 10:19:41 +00:00
Michael PLATINGS
660cb74877 Workaround for models with inverted transparency 2010-03-18 19:02:12 +00:00
Robert Osfield
28105bacc1 From Glenn Waldron, "The PLY plugin only works for a file that includes both vertices and faces. This patch adds support for PLY files that include only vertices (a point cloud)." 2010-03-17 14:32:32 +00:00
Robert Osfield
d5aea9c0f2 Updated various serialization support for .osg, .osgt/b/x and .ive. 2010-03-16 18:44:27 +00:00
Robert Osfield
bc9b28a0c9 Added return into ReaderWriterOSG2::prepareReading(..) to prevent bug associated with result being discarded. 2010-03-14 08:56:21 +00:00
Robert Osfield
4dcf21d707 From Sukender, "I had some conflicts when updating but they seem resolved now. Attached files (four files) are against rev. 11200. Changelog:
- Replaced exceptions with assert() or OSG_NOTIFY
- Replaced osg::notify() with OSG_NOTIFY
- Changed braces and tabs to fit OSG coding convention
- Cleaned a few things in code (names, added deallocations upon error)"
2010-03-11 16:53:35 +00:00
Robert Osfield
dce80220e8 Cleaned up the registration of wrappers so that they are done on demand. 2010-03-11 10:24:20 +00:00
Robert Osfield
08612666fa From Roger James, "Here is a small stability fix to the dae reader which seems to have dropped out of the latest version." 2010-03-10 16:31:30 +00:00
Robert Osfield
e70c304533 From Sukender, "I've fixed positions for 3DS writer. Points in 3DS must be in world coordinates and I added what was missing.
And by refactoring a bit of code, I may have fixed some StateSets related bugs (was ignoring StateSets for osg::Groups).
I also added support for Billboard's points, so now "osgconv lz.osg lz.3ds" has an acceptable output. However, there is no rotation depending on billboards' axis, hence the notice "Warning: 3DS writer is incomplete for Billboards (rotation not implemented).". You may want to remove this notice (or lower the notify severity) if you feel 3DS doesn't have to handle such rotations.
The attached archive contains 3 files from 3DS plugin, against rev. 11162.

Please note there is still the textures issue for cow.osg. I guess it's because it's not a "flat, dummy and standard" texture in slot 0... That is to say the only thing the writer can handle at the moment. I guess I won't address this soon.
"
and

"I've detected and fixed another bug in 3DS writer: support for automatic splitting of meshes having >65k faces/points was buggy (was deleting faces).
Here is my four 3DS modified files (in a ZIP), against rev. 11193, including previous fixes AND Stephan's fix about relative filenames."
2010-03-10 16:05:52 +00:00
Robert Osfield
e082b01f26 From Wang Rui, "I've initially added the XML support of the new native osg format,
using osgDB::XmlParser. The extension for XML-formatted scenes is
.osgx, corresponding to .osgb for binary and .osgt for ascii. It could
either be rendered in osgviewer or edited by common web browsers and
xml editors because of a range of changes to fit the XML syntax. For
example, the recorded class names are slight modified, from
'osg::Geode' to 'osg--Geode'.

To quickly get an XML file:
# ./osgconv cow.osg cow.osgx

The StreamOperator header, InputStreram and OutputStream classes are
modified to be more portable for triple ascii/binary/XML formats. I
also fixed a bug in readImage()/writeImage() to share image objects if
needed.

The ReaderWriterOSG2 class now supports all three formats and
reading/writing scene objects (not nodes or images), thanks to
Torben's advice before.
"
2010-03-10 13:48:41 +00:00
Robert Osfield
6dc1ec6c4e From Stephan Huber, "attached you'll find a small bugfix for the 3ds-reader. It allows
reading files with relative paths again. (Hard to explain, easy to see
in the diff)"
2010-03-10 10:10:57 +00:00
Robert Osfield
4bc287cedb Added extra ffmpeg version check 2010-03-08 10:20:14 +00:00
Robert Osfield
8743e5d925 From Mathias Froehlich, "Not so long time ago, there was a complaint about the ac3d plugin not honoring
absolute filenames for the texture images.

The attached change should fix this by at first looking at the absolute file
name to load a texture and then, if that fails, strip away any paths to try
that again with the bare file name.
The change also fixes a possible exception that could be triggered by an out
of bounds std::string access which is now avoided by using functions from
osgDB/FileUtils.

The change is based on rev 11161."
2010-03-05 16:08:34 +00:00
Robert Osfield
84c0ecadd8 Fixed usage of osg::swapBytes to properly pass in pointer to data that needs swapping. 2010-03-05 16:04:30 +00:00
Robert Osfield
10a2f389d7 From Mathias Froehlich, "If you want to have that qfont plugin loader, this is the updated
implementation which uses osgQt and includes the changes to make fonts load
without a file on disk."
2010-03-05 15:46:17 +00:00
Robert Osfield
f497cd3c24 Fixed warnings 2010-03-05 15:04:36 +00:00
Robert Osfield
c40a4ff9cb Changed Options::setDatabasePath(..) usage to getDatabasePathList().push_front() to paths set by Options to be picked up. 2010-03-05 11:19:34 +00:00