creating subclasses of osg::Array that referenced data
stored an application's internal data structures. I took
a stab at implementing that and ran into a couple of
downcasts in Geometry.cpp. Enclosed is my take at fixing
those along with a simple example of how to do this."
1. DAE object no longer held onto by plugin.
2. Filename to URI conversion now handled internally by plugin.
2. User can supply an external DAE object for use by the plugin.
3. User can supply a std:string object for the plugin to return the URI of
the document just processed.
4. User can supply a std::string to receive the unit name information from
the document just read in. (e.g. meters, inches, etc.)
5. User can supply a float to receive the metric conversion factor from the
document just read in.
6. User can supply an enum to receive the up axis orientation information
from the document just read in.
7. Material transparency can be both read and written.
8. User can supply an experimental GoogleMode option on output. The plugin
will try to emulate the way Sketchup specifies transparency (i.e. the
inverse of what it should be!). I am still struggling to get GE to
understand transparency, anyone know what it expects?
9. Rudimentary support for Collada effect parameters (newparam, setparam,
param) on input. Basic nVidia FX Composer dae documents can now be read.
"
in the DatabasePager. The practical effects of these are to greatly reduce startup time
and the time to load an individual scenery tile in FlightGear.
- From my log message:
Minimize the number of StateSets and drawables that are compiled by checking
if they have already been compiled or will be elminated by the
SharedStateManager.
Move the sorting of the dataToCompile queue out of compileGLObjects
into the man pager run function.
Change the SharedStateManager to use maps instead of vectors."
Previously the complete StateSet was cleared, even the non clipping releted
state attributes and modes in this stateset on a call to
setLocalSetateSetModes.
With this change only those modes/attributes are changed that need to be
changed. That is, if a clip plane is removed from the ClipNode, only this
assiciated mode is removed from the state set, instead of throwing away the
whole state set.
In this way we have less surprising results if the state set of a clip node is
used for more state than just the clip state.
"
StateSet::removeAssociatedModes(const StateAttribute*)
and a
StateSet::removeAssociatedTextureModes(unsigned, const StateAttribute*)
call. These funktions are just missing for a complete api IMO."
CullVisitor/SceneView:
*Feature: This version supports multiple clearnodes in the graph, one per renderstage.
Text:
*Feature: Performance Enhancement when calling SetBackdropColor
Material:
*Fix: OpenGL calls are now made according to the OpenGL Standard
"
- Material class contained both 'shininess' and 'Ns' member variables
- 'Ns' and 'Ni' are initialized to 0 ('Ni' is unused at the moment)
- only 'Ns' was read from .mtl file but 'shininess' was used for osg::Material
- 'illum' was read from .mtl file but never used; it is now used as follows
-- illum==0 -> no osg::Material created/attached therefore no lighting
-- illum==1 -> osg::Material specular is set to black
-- illum==2 (default) -> specular read from .mtl file is used
- 'map_Kd' and 'map_Ks' may contain additional arguments (e.g. '-s 1 1 1'),
these are now skipped over and the texture filename is properly extracted
"
* Support for Box, Sphere, Cone, and Cylinder. These nodes are converted
to osg::Geometry conform the VRML97 spec.
* Backface culling is enabled/disabled according to the "solid" flag for
geometries that are converted from IndexFaceSets.
* PROTO instances can now be used for "appearance" and "geometry" fields
in a Shape node.
The file ReaderWriterVRML2.cpp is adapted for the latest stable public
release:
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.2.0
The changes where needed for being able to read VRML file which are
output by VMD (http://www.ks.uiuc.edu/Research/vmd/). A sample VRML file
is enclosed in this submission.
The plugin has been tested against a number of VRML samples that include
texturing. The texturing is found to be VRML97 compliant for all added
geometry nodes.
"
with the shader for textured objects. This works very well in cases
where there could be a mix of textured and non-textured objects in the
scene, and it makes the initialization more robust.
The idea is from PSSM, to add a 1pixel texture to the main rendering as
to provide white for any objects missing textures."
You were right about the CMAKE_MODULE_LINKER_FLAGS option for CMake, so here is a modification allowing to not generate the manifest files for the plugins making them a lot more easy to redistribute. I have also made the same modification to the wrappers as they are also put into the osgPlugin folder when generated.
"
case is the more tested case, and therefore it is correct to set
_supportsVertexBufferObjects to the same value as _fastPath. So here's a
change that does the same thing for the env var case."
both Jeremy and Anders added static build support as an option, but one was
for Unix and one for Windowsm, but the two mods were also inconsitent in naming
and implementation. I have had a bash at merging them both, but don't know yet
if these changes will work yet on either configuration... user testing will tell...
enhanced version of PolytopeIntersector.
New features of PolytopeIntersector :
* Dimension mask: The user may specify the dimensions of the
primitives to be tested. Checking polytope-triangle and
polytope-quad intersections is rather slow so this can
be turned off.
* Reference plane: The resulting intersections are sorted
by the distance to this plane.
New memebers of PolytopeIntersector::Intersection :
* distance: Distance of localIntersectionPoint to the reference plane
* maxDistance: Maximum distance of all intersectionPoints to the
reference plane.
* intersectionPoints: The points intersecting the planes of the polytope
or points completely inside the polytope.
* localIntersectionPoint: arithmetic mean of all intersection points
* primitiveIndex: Index of the primitive that intersected
I added some more output to the example osgkeyboardmouse."
highlighted problems with Light, ClipPlane and Hint usage in osg::State's usage of cloneType
and reassignment of target/num in StateSet/these StateAttributes.
size of the image data is greater than the actual image size. This
causes the memcpy call to go out of the array bounds. I modified the
code so that it copies the data during the iteration, instead of
memcpy'ing. This fixes the problems i was having.
If you are curious, the writer was crashing when trying to write an
RGB image that was 2050 x 1280. You might be able to reproduce it by
allocating an empty image of that size and writing it to a file."
window. This breaks rendering in for example MFC SDI applications and in
MFC MDI applications if user resizes the window so that client area has
zero height. Current safeguard for minimized window:
LRESULT GraphicsWindowWin32::handleNativeWindowingEvent( HWND hwnd, UINT
uMsg, WPARAM wParam, LPARAM lParam )
...
/////////////////
case WM_MOVE :
case WM_SIZE :
/////////////////
...
if (clientRect.bottom==0 && clientRect.right==0)
...
does not cover this situation. In these situations clientRect.bottom = 0
and clientRect.right > 0.
Quick fix to this is relax condition:
if (clientRect.bottom==0 || clientRect.right==0)
Modified file is attached.
Tested with osgviewerMFC from 2.2.0 release (Windows XP sp2)
Before fix:
- execute from command line osgviewerMFC.exe cow.osg.
- the cow is rendered nicely.
- resize window to zero height by dragging from bottom border upwards.
- resize window back to original height
- just blue screen, no cow
After fix:
- execute from command line osgviewerMFC.exe cow.osg.
- the cow is rendered nicely.
- resize window to zero height by dragging from bottom border upwards.
- resize window back to original height
- the cow is where it is supposed to be.
"
- Get or set the target number of PagedLOD children to remove per frame.
- Get or set the minimum number of inactive PagedLOD to keep.
Corresponding environment variables have been added too.
The default values reproduce the previous DatabasePager behavior."
- set the resolution of the shadow map; it calls dirty() to
re-initialize at next update
- keep a list of Shader objects to use instead of the default ones, if
the list is empty, the default shaders are used
- explicitly create the Uniform variables, so that subsequent additions
that require more Uniforms can put them in a central place
- set a Light or LightSource to use explicitly for shadow casting,
allows multiple lights in the scene, with one casting shadows
There are two additions that do not ( yet ) function correctly, but in
the present usage they do not interfere with the regular usage of the
techique:
- support for using spotlights, it's using Light.spotCutoff to determine
if it's a spot-light and not point-light,
there is an error in the setup of either the shadow camera or the
texgen, most likely due to the direction of the spotlight, since the
position is being used just like in point or directional lights.
- creation of a debugHUD
the hud is created properly, ( the example included shows it ), but
it displays only white, there has been some discussion of displaying the
shadow map, but I could not find it, the addition of a simple fragment
shader with the appropriate color transform should get this going."
"" for all platforms except Cygwin where its set to "cygwin_" and Mingw where
it is set to "mingw_". Updated osgDB::Registry to look for these for the plugins.
Updated the osgintrospection example to search for these names as well.