Added setting of osg_SimulationTime and osg_DeltaSimulationTime to the uniforms set by SceneView
Added frame(double simulationTime) and advance(double simulationTime) parameters to
osgViewer::SimpleViewer, Vewer and CompositeViewer.
Updated various examples and Nodes to use SimulationTime where appropriate.
text than an other well known txf loader. That means drawing them one on top
of the other I can only see differences due to different mipmapping ...
That is it introduces an additional gap of 0.1*height between the glyphs.
There is an additional mapping between upper and lowercase characters if one
of them is not available in the txf file.
And we have an artificial blank character that is very often missing in txf
files."
The cache works for nested externals but is cleared before the master
flight file is returned. I implemented texture caching using the same
mechanism."
Stephan and I tested it on Mac and Win.
Just a couple of notes:
* the plugin is able to load both regular 2D images and movie stream. There is a #define QT_HANDLE_IMAGES_ALSO mechanism to indicate whether to use it for images or not. This is defined by default on Mac only, to avoid conflicts with the standard windows plugins. See comments on QTUtils.h
* de-initialization of quicktime before exit is now left to an observer, which calls exitQuicktime() when last media loaded with the plugin is released. This prevent a crash on exit without need of any extra call external to the plugin."
The existing code uses a map with object ID's. The original code only applied the name to a node for a new ID only if the node did not already exist in the map. The problem was that there was another part of the code (when a parent was forward declared) that also created the node with the ID in the map, but it did not know its name. I simply made sure that the name was set regardless of whether or not the node was already in the map. "
--merged with fixes for texture coordinates(is this in CVS/SVN already)?
--changed above mentioned fix output level from osg::NOTIFY to osg::DEBUG_INFO
--added support for VRML97 ImageTextures.
--changed pointers to ref_pointers where possible.
--added format (method separated by "//////") for easier reading."
I have decided to just normalise the drive letter part of file names for the time being and also ensure that names of the format x:/xxxxx are treated as absolute paths. This will cover a lot of cases.
I have raised a bug against collada which hopefully should resolve some others. However there are some pathological cases which I have commented on in the code, these will probably never work properly unless there is a significant rewrite of the daeURI functionality. Hopefully they are rare."
dxfSection classes, so their members data are correctly deleted.
- changed some methods signatures to pass arguments by reference instead of
by value. The performance and memory usage are enhanced (the reader was
clogging the heap when reading some large DXF files)
The updated files have been compiled and tested with a variety of DXF files
on XP with VS2003, but the changes should not disturb any other compiler."
Performance tests on big models did not indicate any performance penalty in using doubles over floats,
so the move to doubles should mainly impact precision improvements for whole earth databases.
Also made improvements to osgUtil::PlaneIntersector and osgSim::ElevationSlice classes
Under this mode, each 4x4 texel block can selectively use an alpha component or none. When alpha-enabled blocks are present, this is not reported in the DDPF_ALPHAPIXELS bit in the pixel format flags causing the reader-writer to report the file as a 3-components file (GL_COMPRESSED_RGB_S3TC_DXT1_EXT). The fix requires looking at each 4x4 texel block to detect the presence of 1-bit alpha encoding. When such a block is found, the internal & pixel formats are reported as GL_COMPRESSED_RGBA_S3TC_DXT1_EXT instead.
See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/Opaque_and_1_Bit_Alpha_Textures.asp for more information."
following improvements:
- When all unsupported entities (SOLIDS, TEXT, ...) have been filtered out
from a block, dxfInsert::drawScene() was crashing because it assumed that
the block was not empty. It now returns silently so the other blocks can
still be imported.
- The DXF reader assumed all vertices were read first, then the face
indices. But, from the DXF "documentation" (www.autodesk.com/dxf) :
"Polyface meshes created with the PFACE command are always generated with
all the vertex coordinate entities first, followed by the face definition
entities. The code within AutoCAD that processes polyface meshes requires
this ordering. Programs that generate polyface meshes in DXF should generate
all the vertices then all the faces. However, programs that read polyface
meshes from DXF should be tolerant of odd vertex and face ordering."
So now the importer ignores the posted number of vertices and face indices,
and uses the size of the lists instead."
- does proper edge detection with the crease angle given in the ac file
- the reader is much more verbose in case of broken files
- no more static variables
- std::stream based
- much faster, up to a factor of 50 for a polygonal test model
- if the file contains polygonal surfaces the loaded geometry is still
polygonal as long as the polygons are convex. Concave polygons are still
tesselated. Rationale: If the user needs triangular models he can throw away
that extra information with the osgUtil::Optimizer himself. But the read step
preserves as much extra information that is contained in the file as
possible. Also the polygonal models look a bit smoother than the triangular
ones.
- a huge cleanup
- the basic parsing logic from the original ac3d developer is untouched
- the writer part is untouched
The tarball contains a replacement for the src/osgPlugins/ac3d directory that
is based on the current CVS (2006-11-13).
I have tested that loader with a osgconv foo.ac /tmp/xx.ive on everyfoo. ac
file I could find (~200 from flightgear and the object database). I also run
my flightgear development with that loader -> here I see the models.
I run valgrind testcases on some selected models."
I've attached a small fix for this.
Cause: uncompressed mipmap handling was done only for RGB pixel format.
Fix: added condition for handling alpha and luminance formats too."
contained an 8-bit color map. The crash occured at line 545:
remap_row(currPtr, inbuf, w, red, green, blue);
Cause: The code was trying to write past the end of the buffer while
doing this remapping. The size of the buffer is determined based on the
value of 'format', which was 1 in this case since bitspersample is
8(indicating a 8-bit color map). The buffer should have been created 3
times as large since that 8-bit value is indexing a 24-bit color.
Fix: I've put in an if statement to set format to 3 if 'photometric'
indicates the tif contains a palette as the output data will always be
24-bit color data in this case."
COLLADA plugin. dae->load will not return DAE_OK the second time a model is loaded, so a
second check for DAE_ERR_COLLECTION_ALREADY_EXISTS has been added."
only DAE instance when it's first needed instead of in the constructor.
This fixes the problem with osgdb_dae.dll not being loaded due to
unwanted ordering of global initialization.
This fix and the previous fix of the COLLADA plugin might be unnecessary
with the latest COLLADA DOM, but since many of us will probably still
use the older version of the DOM, I guess it's better this way.
"
plugin. It was only reading floats & doubles correctly on little
endian systems, which require byte swapping, and not on big
endian systems which don't require any swapping."
ignores the Object records if it's safe to do so. The reader option
preserveObject prevents this optimization.
I have also removed the flat shading attribute set by the Object
record. This flag is only intended for the "Calculate Shading"
operation in Creator."
( in OF external references) after the OF file is loaded. The change do
conditional
execution of already existing code.
I use this for optimized preprocessing of large databases what can not
be loaded
in one pass because of memory limits."
parent file is so old that it doesn't support Light Point palettes or Shader
palettes, then the parent file is not allowed to override those palettes in
the child."
osgPlugins\pfb\ConvertFromPerformer.cpp
Added support for
PFSTATE_ALPHAFUNC
PFSTATE_ALPHAREF
Improved handling of
PFTR_NO_OCCLUDE
I have tested this with WIN32 performer 3.1 and 3.2.2
and linux OpenGL Performer 3.1.1"
------------------------------------------------
"I found some artifacts on some models and traced it back to the
external palette override feature. There are some changes in the
layout of the external record the loader have to take into
consideration.
The other fix is to remove the OF pools from the user data of the
external ProxyNode when it is no longer needed."
_TYPES_H_. types.h in the directx plugin defines the same include
guard. I've renamed the guard name in this file to _DX_TYPES_H_. Now
the plugin compile in mingw too."
"Previously, the new OpenFlight plugin only allowed ext ref models to use
their own palettes. With this change, parent models can override child model
palettes with the parent palettes.
These changes are made against very current CVS (just updated about 1/2 hour
ago, eliminated conflicts, and retested before this posting).
To regurgitate what I did:
A new class, ParentPools (public osg::Referenced), is created when an ext
ref record is parsed, and it is populated with any parent model pools that
should override the child model pools (according to bits in the ext ref
record). The ParentPools object is then set as UserData on the ProxyNode
corresponding to the ext ref.
When the ReadExternalsVisitor hits the ProxyNode, it takes its UserData and
sets it as UserData in the Options parameter to the osgDB::ReadNode call,
which then read the ext ref model. In the course of parsing the Options
string, ReaderWriterFLT also looks at the Options UserData and sets the
parent pools in the Document class accordingly.
When palette records are encountered while loading a file, they are ignored
if the corresponding pool was set by the parent.
Thanks to Brede for consulting with me on the implementation.
"
through the osgDB::readImageFile and osgDB::writeImageFile functions.
This is useful for storing compressed textures on disk for rapid playback
for animations."
From Robert Osfield, remapped Paul Martz's changes to Pools.h and PaletteRecords.cpp w.r.t texturePatternIndex being a in16, and converted a char* string to a std::string.
email comments from Andew Sampson,
"I've contacted Terrex, and obtained the 2.2 version
of their trpage library. The library included a
fork of OSG 0.9.8's txp plugin, modified to load 2.1+
txp DBs.
I've done the work of incorporating the changes made
to OSG's txp plugin since 0.9.8 into Terrex's fork.
The forked version is now up-to-date with the changes
made to OSG 0.9.9 and 1.0.
Terrex made a lot of changes (especially differences
in whitespace), so the diff between the forked version
and OSG 1.0's txp plugin is yucky. I did my best, but
keep in mind that this is the result of a 4-way merge
(kinda... terrex-0.9.8, stock-0.9.8, stock-0.9.9,
stock-1.0).
I really want to see this forked version merged back
into the main OSG branch. The new features offered by
this version of the plugin (2.1+ support, variable
LOD support, bug fixes) are worth the trouble."
--
Don Tidrow then took this code and added his work.
--
Robert Osfield then fixed all the warnings that abound in the trpage code base.
There are some group codes (i.e. "62") which are interpreted as
dxfDataType::SHORT. That's right because the dxf-specification defines
"16 bit integer" as the type for the corresponding value.
But readerBase::readGroup() calls readValue(std::ifstream&, unsigned
short). I changed readValue(std::ifstream&, unsigned short) to
readValue(std::ifstream&, short). I found no group code at the dxf-specs
which needs a "16 bit unsigned integer" value. So the
readValue(std::ifstream&, unsigned short) function is obsolete - right?
changes to this plugin that aren't in current CVS yet -- this change is
based on current CVS, not our changed files.)
This changes how shader palette records are parsed to support GLSL per the
OpenFlight 16.1 spec. Existing functionality for 16.0 files is preserved.
The change to Document.h simply adds an enum for VERSION_16_1."