[osg-users] State of Qt5 integration?

2014-03-21 Thread Martin Scheffler
Hi all,

is anybody still working on integrating Qt5?

It seems that CMake now runs smoothly, but I could not get the osgviewerQT 
example running on Windows 7.  I see the Qt widgets, but the OSG windows are 
all black and the console is flooded with OpenGL errors. This is using Qt 5.2 
64 bit on Windows 7.

Has anyone managed to get both of these beasts running together? 

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=58687#58687





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] State of Qt5 integration?

2014-03-21 Thread Martin Scheffler
I just played around a bit and managed to get a very simple integration.
It is a bit cheating, I simply take an OSG window and add it to a Qt widget.
* No fancy Qt stuff supported like drag and drop, overdrawing etc.
* Only windows (although Linux should be no problem after some modifying)
* Multithreading not a problem here
* Should run with Qt 5.1 or newer


Code:


#include osgDB/ReadFile
#include osgGA/TrackballManipulator
#include osgViewer/Viewer
#include osgViewer/api/win32/GraphicsWindowWin32

#include QApplication
#include QHBoxLayout
#include QSlider
#include QTimer
#include QWidget
#include QWindow
#include assert.h

int main(int argc, char** argv)
{
if (argc2)
{
std::cout  argv[0] : requires filename argument.  std::endl;
return 1;
}   

// Create Qt app
QApplication app( argc, argv );
  
// Create OSG Window
osg::ref_ptrosgViewer::Viewer viewer = new osgViewer::Viewer();

// setup viewer
{
viewer-setUpViewInWindow(0,0,800,600);
viewer-setCameraManipulator(new osgGA::TrackballManipulator);
viewer-setSceneData(osgDB::readNodeFile(argv[1]));
viewer-realize(); // else window does not show
}


QWidget* mainwidget = new QWidget;
mainwidget-setLayout(new QVBoxLayout());
mainwidget-resize(800,600);
mainwidget-show();

// Add osg window to main widget
{
osgViewer::ViewerBase::Windows wins;
viewer-getWindows(wins);

// Get native windows HWND window id from OSG window
osgViewer::GraphicsWindowWin32* osgwin = 
dynamic_castosgViewer::GraphicsWindowWin32*(wins.front());
assert(osgwin);
HWND winid = osgwin-getHWND();

// Create a QWindow from osg window id and place it in a widget
QWindow* qtwindow = QWindow::fromWinId((WId)winid);
QWidget* osgwidget = QWidget::createWindowContainer(qtwindow); 
osgwidget-setMinimumSize(QSize(320,200));

// Add osg widget to a main widget
mainwidget-layout()-addWidget(osgwidget);  
}

// Add a slider changing the background color
{
QSlider* slider = new QSlider(Qt::Horizontal, mainwidget);
slider-setRange(0, 255);
mainwidget-layout()-addWidget(slider);

// Connect to lambda
QObject::connect(slider, QSlider::valueChanged, [=](int v) { 
viewer-getCamera()-setClearColor(osg::Vec4((float)v / 256.0f, 0, 1, 1)); });
}


// Make Qt call osg tick
{
QTimer* timer = new QTimer(mainwidget);
timer-start(20);
QObject::connect(timer, QTimer::timeout, [=]() { viewer-frame(); });
}


app.exec();

// clean up
viewer = nullptr;
delete mainwidget;
return 0;
}





--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=58690#58690





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Qt5 integration first try

2013-06-12 Thread Martin Scheffler
Hi,

in reference to my submission here:
http://forum.openscenegraph.org/viewtopic.php?p=54555#54555

as I said, I simply submitted Vitezslavs patch. I can certainly try to remove 
the extra hooks from the osg main classes.
The moveToThread command must be called with the Qt widget and the Qt graphics 
thread before makeCurrent is called the first time.

Another thing I just realized: The code will only work when CMake option 
BUILD_OPENTHREADS_WITH_QT  is set! Otherwise the static_cast in 
GraphicsWindowQt::moveToThread will fail. 
How can I solve this? For multithreading to work with Qt5 it seems we need the 
render threads to be QThreads. Maybe add a flag to OpenThreads/Config and 
#ifdef against that? 

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54560#54560





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG Render Thread in Qt: Access to scene data from main app thread

2013-04-15 Thread Martin Scheffler
Hi Pertur,

I don't think it is a good idea to manipulate OSG data across threads. Maybe 
you should instead send commands from your GUI thread to the render thread with 
Qt signal/slot connections and do the manipulating in the render thread. 
Signal/slot connections across threads are always thread safe. This does 
require the render thread to be a QThread though.

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=53632#53632





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Animating articulated osg models

2013-01-03 Thread Martin Scheffler
Hi Mike,

to allow articulated parts on instanced models you can use bone deformation 
instead of DOF transforms. This changes the way the tanks have to be modelled, 
but it allows you to render all tanks in one draw call. You can use 
osgAnimation or osgCal to do the bone deformation. 

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51757#51757





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Using osgDB to load text files or other non-OSG files?

2012-12-06 Thread Martin Scheffler
Hi,

I would like to use the osgDB architecture to load script and xml files, 
possibly other stuff. I would like to be able to use the CURL plugin to load 
these files from the net, which means I can't simply get a path with 
osgDB::findFile and fopen that. Ideally I would like to enter a path or URL and 
somehow get a std::istream in return. 

Is reading arbitrary files through the plugin structure possible without 
writing a ReaderWriter plugin for each format and wrapping the return in an 
osg::Object? I only see very concrete methods like osgDB::Registry::readImage() 
or readNode(), not readFile() or something similar.

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51432#51432





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Review of osgQt changes.

2012-11-22 Thread Martin Scheffler
Hi,

I didn't yet investigate, but as far as I understood, you don't need to 
subclass QSurface.
You can create a QOpenGLContext object in the render thread and a QSurface in 
the GUI thread, then do context-makeCurrent(surface) to let the context render 
to the surface. After that, the two objects don't have to communicate, window 
resize events can be sent to the gl thread via signals/slots.

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51206#51206





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Review of osgQt changes.

2012-11-12 Thread Martin Scheffler
Hi,

I am just learning about the changes to the OpenGL integration in Qt 5.
The new way of dealing with  OpenGL seems to be a lot less retarded than the 
QGLWidget way. You can simply create a QOpenGLContext object in the render 
thread and a QSurface object in the GUI thread and do 
context-makeCurrent(surface). No opengl calls are done implicitly by Qt.
So maybe it would be wise to simply leave the nightmare that is Qt4/OpenGL 
integration behind us and start anew :) 

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51048#51048





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything, the second wave

2012-08-26 Thread Martin Scheffler
Hi all,

osgLibRocket IS independent of dtEntity.
Please check out http://dtentity.googlecode.com/svn/trunk/source/osgLibRocket/

It should build as it is, although I don't test that automatically, so maybe 
some manual work is needed.

Comments and patches are always welcome!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49541#49541





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] constant size overlay

2012-07-04 Thread Martin Scheffler
maybe you can use alpha to coverage? It's another state attribute you can set, 
maybe you can google that
It only works if you have antialiasing enabled. 

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48695#48695





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] constant size overlay

2012-07-03 Thread Martin Scheffler
You have to enable blending.
Try this:


[code]
ss-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);

ss-setMode(GL_BLEND,osg::StateAttribute::OVERRIDE | 
osg::StateAttribute::PROTECTED | osg::StateAttribute::ON);

[/code]


Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48670#48670





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything :-)

2012-06-20 Thread Martin Scheffler
Hi all,

my osgLibRocket integration is part of dtEntity, but it is designed to be 
usable stand alone. You can check out
https://dtentity.googlecode.com/svn/trunk/source/osgLibRocket/

Using osgLibRocket together with dtEntity gives you at least two advantages:
* JavaScript integration. You can do stuff like img 
onclick=println('clicked') / - basically the whole GUI can be controlled 
with JavaScript
* dtEntity adds a way to attach libRocket GUI elements to 3d scene objects. 
Elements are repositioned each frame to be on top of their owner 3d object and 
are hidden when it is not visible.

Any tips for improving render performance are highly welcome!
LibRocket performance is OK, but I'm not really a graphics guy, so there are 
probably ways to make rendering faster.

Cheers,
Martin

Best regards,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48391#48391





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Loading OSG resources from Qt QResource system

2012-05-03 Thread Martin Scheffler
Hi,

has anyone tried loading textures, meshes etc from the Qt resource system? I am 
thinking about how best to distribute my resources with my application. 

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=47525#47525





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Why no games with OSG?

2012-04-27 Thread Martin Scheffler
Actually the physx binding is no longer part of dtEntity, as I did not ever use 
it and it never really reached the point where it would be useful.

I agree that Bullet would be a good choice for a physics engine, it should be 
possible to use osgBullet together with dtEntity.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=47343#47343





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Why no games with OSG?

2012-04-27 Thread Martin Scheffler
Hi Maia,

to answer your questions:

 less intuitive for OO programmers

Entity systems do not use inheritance (well, dtEntity does, components can form 
an inheritance structure) and do less encapsulation than traditional object 
systems. But once you understand the basic idea it is very nice to have all 
functionality of one sort bundled away in an entity system. For example look at 
the sound system: All sound related stuff is in the SoundSystem object and the 
components it holds. You can easily and efficiently iterate over all sound 
components because they are held in a central data structure. No other part of 
the system needs to know about sounds. You can unload or start the sound system 
during run time, no restart or recompile needed. I think all this flexibility 
makes it worth to move away from inheritance based systems or traditional 
object-stored component systems.

About using less ref_ptrs: Objects referenced by ref_ptrs must be created with 
new() on the heap and can not be held by memory managers like boost::pool. So 
not using them makes the system more flexible. You can do your own memory 
management for components, which can be important for speed-critical parts. 

 Also, I am not sure if it is working with VR Juggler (for CAVE configuration, 
 etc.), allows devices integration through VRPN, networking. Could you tell if 
 it does ? 
If OSG can do it then dtEntity can do it. dtEntity is simply a framework for 
controlling the OSG scene graph. While there is some setup code for getting an 
osgViewer started and registering to keyboard/mouse events, you can choose to 
not use that code and do your individual setup that maybe only uses parts of 
dtEntity.

About osgCal3: I have written a simple entity system that currently only allows 
starting and stopping animations from JavaScript or C++, also attaching mesh 
nodes to animation bones. I will commit it to the dtEntity trunk when I return 
to work on wednesday, ok?

Cheers, 

Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=47361#47361





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Why no games with OSG?

2012-04-26 Thread Martin Scheffler
Hi Maia,

maybe the stuff I am working on is interesting for you:
http://code.google.com/p/dtentity/

DtEntity is similar to Delta3D in its functionality (it started as a Delta3D 
module), but it is more lightweight and less intrusive.
DtEntity is a game and simulation system for OSG. It has basic support for 
OSGAnimation and Cal3D (osgCal3d wrapper not included, please ask if you are 
interested in that). It offers a component-based entity system for handling 
simulation objects, XML map loading, sound support, heads up displays and lots 
of other stuff.

It is very easy to integrate dtEntity with other OSG libraries like VESuite, 
OSGOcean, OSGEarth and so on, simply because dtEntity is only a thin layer on 
top of OSG.

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=47338#47338





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] OpenSceneGraph 3 Cookbook Published!

2012-04-01 Thread Martin Scheffler
I ordered on thursday! B)

Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=46713#46713





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] constant size overlay

2012-03-27 Thread Martin Scheffler
If you don't need the overlays to be clickable then you can also attach point 
sprites to your scene elements. That should be a little more performant than 
the autotransform thing. Turn off depth test to make the icons shine through. 


Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=46640#46640





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] I made the libRocket GUI library usable with OSG

2012-03-26 Thread Martin Scheffler
Hi,

I can't read that last comment (not approved), but whatever the question:
I am still improving osgLibRocket, subversion address:

https://dtentity.googlecode.com/svn/trunk/source/osgLibRocket

Recent improvements:

* No longer re-adding osg geometry every frame, instead increasing/decreasing 
reference count on geometry, only removing geometry when not referenced during 
the frame
* static compiling now possible
* No longer holding geometries in a std::map for storage, instead using 
libRocket handles to hold geometry
* Experimental: Use a shader to do screen transformation of libRocket 
geometries. No real performance gain, also scissoring does not work yet. 
Commented out in RenderInterface.cpp
* Integration with dtEntity system: Use JavaScript in libRocket RML files; use 
libRocket elements as HUDs over osg scene elements to attach text, energy bars 
etc


Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=46604#46604





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Dynamic datavariance clarification

2012-02-23 Thread Martin Scheffler
Hi Eric,

I think it is not enough to mark every changed node as dynamic, you also have 
to mark all their child subgraph nodes as dynamic!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=45711#45711





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] video: editing osgParticle system with dtEntity property editor

2011-12-18 Thread Martin Scheffler
Hi J.P.,

I am using Microsoft Expression Encoder 4, which is free and very nice. It 
works on Vista and later.


Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44416#44416





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] video: editing osgParticle system with dtEntity property editor

2011-12-16 Thread Martin Scheffler
Hi,

here's a video showing the capabilities of the dtEntity property editor:

http://www.youtube.com/watch?v=0X0EH3YQmPI

The property editor can be used to modify game objects on the fly, add 
functionality, create hierarchical property structures.

The particle component has a number of properties: Mass, AlphaRange, 
TextureFile and so on. There is an xml file (BaseAssets\Delegates\Particle.xml) 
that defines the way the property editor handles the editing of these 
properties: The line
[code]colorinput propertyname=ColorRangeMax /[/code]
defines that the property named ColorRangeMax should be edited with a color 
selection dialog. 
The array properties are configured in this file, too: The xml file defines a 
prototype property that is to be inserted into the array when the + button is 
pressed.  There is also a group property, which can be used to group properties 
together, which is useful if you want to combine a number of proeprties into a 
single array entry. The switch input lets the user choose an entry from a combo 
box and shows corresponding sub properties. 

These primitives can be combined to create complex menus. The video shows how 
the property editor can be used to manage the complex setup of the osg particle 
system. While not all available functionality of the particle system library is 
currently editable, there should be no reason why it should not be possible to 
add these.

If you want to check out dtEntity, the homepage is 
[url]http://dtentity.googlecode.com/[/url].

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44406#44406





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgga event on mouse enter window?

2011-11-30 Thread Martin Scheffler
Hi,

it seems there is no osgga event being fired when the mouse is moved over the 
3d window. This would be useful for applications with multiple 3d windows. 
I have implemented this as a user event in my qt based app, but maybe it would 
be interesting to have that feature for the standard osg window, too?
If you are interested I could submit an implementation for GraphicsWIndowX11 
and GraphicsWindowWin32. 
What do you think?

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44131#44131





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] dtEntity OSG entity system videos

2011-11-02 Thread Martin Scheffler
Hi John,

yes, that was a bug in the CMake file. I just committed a fix. The editor 
depends on JavaScript for camera motion and tools.

I'm affraid without V8 you will only be able to build the dtEntity lib and a 
few very simple demos. If you decide to build V8 yourself please build it as a 
shared library!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43692#43692





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] dtEntity OSG entity system videos

2011-10-28 Thread Martin Scheffler
Hi all,

I just want to inform you all about my ongoing work with dtEntity, a 
game/simulation framework on top of OSG. I posted an announcement a few months 
back, but a lot has happened since then. Most importantly, dtEntity is no 
longer dependent on Delta3d (although integration is still possible). 

Video 1, JavaScript demos: 
http://www.youtube.com/watch?v=FBkcEfFb7ug

Video 2, Qt editor in action:
http://www.youtube.com/watch?v=TiyoaAayVMw

Project homepage:
http://code.google.com/p/dtentity/

Features: 

* Pure component system - functionality is shared by composition, not by 
inheritance. No data or functionality in game object, game object is an 
aggregation of components.
* Entity system approach to storing components - components are stored by type, 
not by game object
* Fully scriptable with Google V8 JavaScript
* Integrates libRocket GUI and CEGUI
* Publish-Subscribe message system
* Many existing components: Mesh, animation, text label, camera, transform, sky 
box, ground clamper...
* Plugin system for loading additional component libraries
* XML map format, maps can be independently loaded and unloaded at runtime
* Qt based map editor
* A Qt property editor, property edit masks are configurable on a per-property 
basis in an xml file (for example: Vec4 Property 'color' in component of type 
TextureLabel? should be edited with a color picker)
* Hierarchical composition of entities is possible - use attachment points to 
define where in scene graph an entity shows up. Example: Sky box entity has a 
component LayerAttachPoint? that other entities can choose to attach to.
* Can be compiled to use Delta3D actors. This way, delta3d features like Cal3d 
animation, clouds rendering etc can be used.
* Debug draw manager for quickly displaying debug geometry like lines, points, 
triangles
* Prototypical PhysX bindings 

I would love it if other people found this useful and maybe joined my efforts 
to create a slim, flexible simulation infrastructure for OSG!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43619#43619





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgAnimation hardware mode clone weird meshes

2011-10-17 Thread Martin Scheffler
Hi all,

this is not really a bug I guess but I want to spare other people from having 
to find this:

I tried creating loads of animation instances of the same type. This worked OK 
as long as I created all instances at once, but when I created additional 
instances during the simulation then their skeletons were totally warped, 
making my guys look like something from The Thing. 

I found out that I could not clone a running animation. Instead I have to keep 
the original animation around and clone all visible instances from that.

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43430#43430





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] I made the libRocket GUI library usable with OSG

2011-10-06 Thread Martin Scheffler
Some improvements to osgLibRocket:
* Should now work cleanly in non-singlethread mode
* scissor tests now work, widget contents is now correctly hidden
* lots of small stuff

Known issues:
* When starting OSG in fullscreen mode then fullscreen gui does not appear. 
Somehow the initial screen size is not correctly given by OSG.
* Demo crashes on shutdown on linux, it seems I don't delete stuff in the 
correct order.

To start demo: 

./sample-drag --assetsPath path-to-librocket-assets-folder

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43229#43229





osgLibRocket.tar.gz
Description: GNU Zip compressed data
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] I made the libRocket GUI library usable with OSG

2011-08-26 Thread Martin Scheffler
Hi Jeremy,

I hope I haven't discouraged you from continuing development on osgWidget! A 
native osg gui would have a lot of advantages over an external library. The 
main reason I did not consider osg widget was the lack of documentation, so 
maybe you can invest some time in that...

About the missing CMake variables: Are you using the advanced mode in 
cmake-gui? The libRocket variables are marked as advanced, I have not yet hd 
time to find out how to mark them as non-advanced.

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42272#42272





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How To: QTreeWidget with multiple nodes of same name in scenegraph

2011-08-22 Thread Martin Scheffler
Hi Sanat,

Maybe you should use Qt's Model View Controller framework. It is a lot more 
complex than the Tree Widget, but also gives a lot more possibilities. You 
could write a QAbstractItemModel that directly accesses the live scene graph. 
You would have to inform the model of changes to your scene graph - added or 
removed items. You can set links to OSG nodes as InternalPointer in your 
QModelIndex objects.

Mind you: Representing the scene graph as a tree will only work if there are no 
nodes with multiple parents!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42173#42173





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How To: QTreeWidget with multiple nodes of same name in scenegraph

2011-08-22 Thread Martin Scheffler
Nerazurri:
In a tree, nodes can by definition only have one parent. If you want to display 
a scene graph in a tree structure you could display a node multiple times for 
each parent?
BTW Maybe one of the existing applications has something for you? 
http://www.openscenegraph.org/projects/osg/wiki/Community/Applications

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42180#42180





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] QT-OSG problem

2011-08-16 Thread Martin Scheffler
I'm currently working on a better qt render thread integration that solves all 
these problems. It is already possible to open render windows from the render 
thread (using a qt blocking queued connection). Resize, minimize, close etc are 
communicated using signal-slot connections. The only requirement is that the 
render thread is a QThread.
 I am currently cleaning stuff up and searching for a weird bug, when that is 
done I will submit the stuff.

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42083#42083





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Interesting article on Qt scenegraph and its threading model

2011-05-31 Thread Martin Scheffler
Perhaps now it is possible to render Qt Gui above OSG?

http://labs.qt.nokia.com/2011/05/31/qml-scene-graph-in-master/

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39975#39975





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Shadow is not updated with the light

2011-05-16 Thread Martin Scheffler
Hi Sumit,
mayb you have to update the light direction vector instead of the light 
position? I think the LISP shadow ignores light position and only uses light 
direction.

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39385#39385





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgexport for blender?

2011-05-07 Thread Martin Scheffler
Awesome! Got it installed, will have to explore the features later.

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39135#39135





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgexport for blender?

2011-05-07 Thread Martin Scheffler
I tried exporting this model:
http://www.blendswap.com/3D-models/weapons/a-104-cold-fusion-assault-rifle/

And got errors:

Code:

osg: WARNING Camera CAMERA not exported
osg: exporting mesh Circle.805
osg: mesh Circle.805 with material bpy_struct, Material(screen)
osg: vertexes 8
osg: faces 2
osg: uvs channels 1 - dict_keys(['UVTex'])
osg: --
osg: mesh Circle.805 with material bpy_struct, Material(screen)
Traceback (most recent call last):
  File C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\
addons\osgExport.py, line 95, in execute
OpenSceneGraphExport(config)
  File C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\
addons\osgExport.py, line 65, in OpenSceneGraphExport
export.process()
  File C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\
addons\osg\osgdata.py, line 422, in process
self.exportItemAndChildren(obj)
  File C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\
addons\osg\osgdata.py, line 238, in exportItemAndChildren
item = self.exportChildrenRecursively(obj, None, None)
  File C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\
addons\osg\osgdata.py, line 289, in exportChildrenRecursively
objectItem = self.createMesh(obj)
  File C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\
addons\osg\osgdata.py, line 515, in createMesh
sources_geometries = converter.convert()
  File C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\
addons\osg\osgdata.py, line 1023, in convert
list = self.process(self.mesh)
  File C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\
addons\osg\osgdata.py, line 1013, in process
geom = self.createGeomForMaterialIndex(material_index, mesh)
  File C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\
addons\osg\osgdata.py, line 756, in createGeomForMaterialIndex
log(object %s has no faces for sub material slot %s % (self.object.getName
(), str(material_index)))
AttributeError: 'Object' object has no attribute 'getName'




--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39137#39137





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgexport for blender?

2011-05-07 Thread Martin Scheffler
I commented out that line and blender seems to end up in an endless loop. When 
I cancel the script with ctrl-c the stack trace ends up in osg\osgdata.py, line 
701, in equalVertices.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39138#39138





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgexport for blender?

2011-05-07 Thread Martin Scheffler
Reedev:
I used the 2.57 plugin tghat damyon posted.

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39140#39140





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgexport for blender?

2011-04-29 Thread Martin Scheffler
Hi,

I just tried installing the plugin. Which blender version is supported? I tried 
the current (2.57) and after adding the new bl_info stuff I could start the 
script but got script errors:

[code]
Error initializing quicktime
found bundled python: C:\PROGRA~1\BLENDE~1\Blender\2.57\python
uiItemFullO: unknown operator 'export.osg'
C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\addons\o
sgExport.py:98
Traceback (most recent call last):
  File C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\
modules\bpy_types.py, line 689, in draw_ls
func(self, context)
  File C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\
addons\osgExport.py, line 98, in menu_func
self.layout.operator(ExportOsg.bl_idname, text=OpenScenegraph (.osg)...).f
ilepath = default_path
AttributeError: 'NoneType' object has no attribute 'filepath'
uiItemFullO: unknown operator 'export.osg'
C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\addons\o
sgExport.py:98
Traceback (most recent call last):
  File C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\
modules\bpy_types.py, line 689, in draw_ls
func(self, context)
  File C:\Users\martin\AppData\Roaming\Blender Foundation\Blender\2.57\scripts\
addons\osgExport.py, line 98, in menu_func
self.layout.operator(ExportOsg.bl_idname, text=OpenScenegraph (.osg)...).f
ilepath = default_path
AttributeError: 'NoneType' object has no attribute 'filepath'
[/code]

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38890#38890





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgexport for blender?

2011-04-16 Thread Martin Scheffler
Hi all,
I can't download osgExport for blender from 
http://projects.blender.org/frs/?group_id=19
Does anyone have a working link, or can you simply post the file to the list?
Thanks a lot!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38517#38517





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgexport for blender?

2011-04-16 Thread Martin Scheffler
never mind, I found it here:
http://hg.plopbyte.net/osgexport/file/e28389f02799/blenderExporter
Maybe the project maintainer should add a link from blender.org to there?

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38518#38518





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] Cloud node kit

2011-04-10 Thread Martin Scheffler
Sythel, you can also check out Delta3D. It is based on OSG and has several 
kinds of basic clouds. Of course they are not as good looking as the ones of 
the commercial sollutions, but they are free and can do quite a lot.

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38385#38385





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Announcing osg.js

2011-02-19 Thread Martin Scheffler
Very awesome!

I'm especially interested in the JS side - I've just been looking for a 
javascript linear algebra library to use with my own project 
(http://www.sourceforge.net/apps/mediawiki/delta3d-extras/index.php?title=DtEntity)

Mind if I lift your vector, matrix and quat classes? I've already tried them 
out and they seem to work perfect!
The only thing I missed was a function to rotate a vec around a quaternion, so 
I wrote one:
(in osg.Quat:)

Code:

rotate: function(q, v, result) {
var uv = [0, 0, 0];
var uuv = [0, 0, 0];
osg.Vec3.cross(q, v, uv);
osg.Vec3.cross(q, uv, uuv);
osg.Vec3.mult(uv, 2.0 * q[3], uv);
osg.Vec3.mult(uuv, 2.0, uuv);
osg.Vec3.add(v, uv, result);
osg.Vec3.add(result, uuv, result);
},




Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36860#36860





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Announcing dtEntity

2011-01-23 Thread Martin Scheffler
Hi,

those of you who hang out on the Delta3D forums already know this, but this 
should be of interest here, too:

I am working on an entity system on top of Delta3D and OpenSceneGraph. An 
entity system is a pure component approach to gameplay systems - no actor 
objects, each game actor is composed of a number of components. You can read 
more about the approach here: 
http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/

I have worked on the dtEntity project for a few months now and would like to 
share it with a larger audience.  Currently I have implemented:

* The basic entity system with a few OSG related components, wrapping osg Nodes 
and their relationships
* A map system for loading and saving scenes to multiple maps
* A Qt sandbox editor for editing component properties and placing them in the 
scene. Editors can be configured on a per-property basis, arrays of properties 
are possible. Usable but still needs a lot of work
* A hierarchical spawner system, like a template for spawning entitites
* A debug draw manager for quickly drawing lines, text, geometry - this could 
be interesting even if you don't care about the rest
* A scripting system using Google V8 JavaScript
* Plugin system for loading component types and editor tools

Of course everything is still pretty rough around the edges, but if you are 
interested you can check out the documentation page:

https://sourceforge.net/apps/mediawiki/delta3d-extras/index.php?title=DtEntity

And you can download a (not very impressive) demo package here:
http://rapidshare.com/files/444145074/dtEntity_demo_0.1.zip

I would love to have feedback on this. DtEntity is under the LGPL license, and 
contributions are of course welcome!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35906#35906





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] TerraPage terrain LODs are jumping again - have LOD ranges to be sorted?

2010-09-10 Thread Martin Scheffler
Yes, that solved it! Yay!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31501#31501





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] TerraPage terrain LODs are jumping again - have LOD ranges to be sorted?

2010-09-08 Thread Martin Scheffler
Hi,

this is a problem that was fixed some time ago but pops up again now. I have a 
terrapage terrain that loads fine, but every few seconds the detailed LODs are 
swapped against lower res ones and back again. This looks funny and bogs down 
the system. After poking around with a debugger the only thing that I noticed 
is that the LOD ranges are sorted high to low:
For example:
_rangeList[0] goes from 1000 to MAX_FLOAT
_rangeList[1] goes from 0 to 1000

Can this cause these problems?

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31409#31409





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] TerraPage terrain LODs are jumping again - have LOD ranges to be sorted?

2010-09-08 Thread Martin Scheffler
I just noticed that I only get the effect when I have long-running operations 
in the cull traversal. I'll try to post a replicable test scenario.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31410#31410





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Render text n pixels above text position

2010-09-02 Thread Martin Scheffler
Glenn, 
thanks for your reply. Because performance IS important for me (hundreds of 
texts) I went a different route.

I derived a class TextWithOffset from osgText::Text and overwrote the method 
computePositions. I added my offset to the _offset member variable after the 
alignment was calculated. Unfortunately the computePositions method is pretty 
large, so I ended up copying about 150 lines of code, but anyway, it works.

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31263#31263





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Render text n pixels above text position

2010-08-25 Thread Martin Scheffler
Hi,

I have a number of actors that I want to add text labels to. The text labels 
should be screen aligned with a fixed size. I want the text to stay 50 pixels 
above the center of the actor, so that the actor is not obscured by text when I 
am far away. Is this possible? There is a method osgText::TextBase::setPosition 
that I can use to add a height in scene coordinates, but I would like to add an 
offset to the text bounding box.

Ideally i would do this:
osgText::Text* text = new osgText::Text();
 text-setText(My Actor);  
text-setAlignment(osgText::TextBase::LEFT_TOP);  
text-setAxisAlignment(osgText::TextBase::SCREEN);
text-setCharacterSizeMode(osgText::TextBase::SCREEN_COORDS);

// center is one meter above actor coordinate center
text-setPosition(osg::Vec3(0, 0, 1));

// push text 20 pixels to left and 30 upwards
text-setOffset(osg::Vec3(-20, 0, 30));

Any idea on how to accomplish this?


Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31026#31026





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] a limit of osg::ReaderWriter interface

2010-07-30 Thread Martin Scheffler
Hi all,

something is definitely wrong with the gz plugin.

osgconv physics_crate.ive physics_crate.ive.gz

osgconv physics_crate.ive.gz physics_crate.osg
DataInputStream::readUInt(): Failed to read unsigned int value.

Also, physics_crate.ive.gz cannot be opened with winzip or 7zip.

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30426#30426





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Human 3d model animation/motion

2010-07-14 Thread Martin Scheffler
We are using the rocketbox characters: 
http://www.rocketbox.de/index.php?foo=portfolioproduct=cc

We export them from Max to Cal3D, works nicely.


Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=29993#29993





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D Scene emulating a 2D environment

2010-07-07 Thread Martin Scheffler
theoribeiro: Just set your ortho projection values to your screen size: (0, 
1024, 0, 768) or whatever. Also set your camera viewport:
camera-setViewport(0, 0, 1024, 768).
Now the OSG units correspond to pixels on your screen.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=29766#29766





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Human 3d model animation/motion

2010-07-07 Thread Martin Scheffler
Hi nerazzuri,

You can check out Delta3D (www.delta3d.org).
It is a game engine based on OSG that has a lot of functionality for
controlling animated persons. The animations use the Cal3D format btw.
In the examples/ folder of the delta3d distro there are some examples on how to 
create and control animations.

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=29783#29783





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Embedding OSG in QT 4.5.0 with QGLWidget + QGraphicsScene / drawBackground() - need a little help.

2010-06-15 Thread Martin Scheffler
Some notes: The captureCurrentState command never catches any states. In OSG 
head, the camera does not even have a state.

The push/popClientAttribute method causes problems with terra page terrain 
rendering. When I include it, the GUI looks good, but the terrain is screwed 
up. Adding glEnableClientState(GL_VERTEX_ARRAY) makes the terrain visible, but 
the texture coordinates seem to be broken. 
When I don't include the client attribute stuff then the Qt GUI becomes warped 
at some specific camera angles. Any ideas?

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=28948#28948





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] A Qt Scenegraph...

2010-05-27 Thread Martin Scheffler
As far as I understood the article, the Qt scene graph is specifically 2d or 
2.5d. It is only meant as an optimization to the GraphicsView stuff. Did I get 
that right? Maybe it won't have to be as complex as OSG.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=28268#28268





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Any clean way to turn off buffer swapping?

2010-05-11 Thread Martin Scheffler
Hi,

I am trying to use Qt OpenGL widgets as a HUD for OSG. (Wow, I love 
abbreviations!)

[url]http://labs.trolltech.com/blogs/2008/06/27/accelerate-your-widgets-with-opengl/[/url]

I have managed to get Qt to draw its widgets over OSG, and it looks good. 
First I let OSG draw its scene, then Qt renders its widgets.
The only problem is that OSG does a buffer swap when it is finished drawing. 
This causes a flicker effect. I  cannot find a way to convince Qt to draw its 
stuff at a specific point, so adding a post-render callback to OSG does not 
work.

So is there a way to turn off buffer swapping? I could not find any way in the 
source (without modifying window system specific stuff). Any help is 
appreciated.

Thanks!

Martin[/url]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27731#27731





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Any clean way to turn off buffer swapping?

2010-05-11 Thread Martin Scheffler
Hi Robert,

I experimented with osgQT for the last two days and got it working. The 
performance was pretty bad, I had 20 fps from the Qt thread with a single 
QCalendarWidget displayed. Maybe the performance can be improved if OpenGL 
rendering was used instead of the default Qt painting, but RTT seems like an 
unnecessary overhead to me.
The direct OpenGL drawing approach from the article seems to work pretty good 
except for the swapBuffers issue. 

Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27745#27745





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Any clean way to turn off buffer swapping?

2010-05-11 Thread Martin Scheffler
I'm running qt and the viewer in separate threads, just like your browser 
example. When I render a spin box the fps is 60, when I render a 
QCalendarWidget it goes down to 20. 

This can probably be improved by using QGLWidget for rendering the widgets to 
texture. I am not that deep into the whole topic yet.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27757#27757





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] About OSG and Distributed Issue?

2010-04-17 Thread Martin Scheffler
you can also check out Avango (http://www.avango.org/). It uses OSG and 
provides ways to replicate scene graph structures. i don't know if the network 
stuff is optimized enough for internet use though

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26915#26915





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] osgearth crashes when I load a shape file

2010-02-01 Thread Martin Scheffler
It seems that OGR is unable to find the ESRI driver.
[code]
OGRGetDriverByName( ESRI  Shapefile);
[/code]
returns NULL. This is not checked and causes a crash.

I am using FWTools 2.4.6. I have copied the DLLS in the FWTools bin directory 
to a location in my path. Do you have an idea what I do wrong?

Thank you!

Cheers,
Martin[/code]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23471#23471





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] osgearth crashes when I load a shape file

2010-02-01 Thread Martin Scheffler
OK, got it working now. The problem was I did not set the working directory to 
osgEarth/bin. This caused the relative paths in the .earth file to be incorrect.
createFeatureProfile() in FeatureSourceOGR returned NULL because the file could 
not be loaded. This was not checked in 
FeatureModelSource::gridAndRenderFeaturesForStyle line 195:
[code]
FeatureGridder gridder( extent.bounds(), _gridding.get() );
[/code]
Causing the crash.

Feature overlay works perfect now!

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23481#23481





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [3rdparty] osgearth crashes when I load a shape file

2010-01-29 Thread Martin Scheffler
Hi,

first up, osgEarth is absolutely amazing! It is a lot of fun to play around 
with.

But now to my problem: Everything crashes when I try to load a shape file!

I added a shape file as seen here:
http://osgearth.org/wiki/TileSourcePluginModelFeatureOverlay

Luckily I built in debug mode from SVN head, so I found out that in 
osgEarthFeatures/FeatureModelSource.cpp
on line 192 the call getFeatureSource()-getFeatureProfile()-getExtent(); 
returns a NULL pointer, causing the crash.

So what went wrong here? Maybe there is a plugin DLL I did not copy to the 
correct position or something?
Thanks for your help!
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23417#23417





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] osgearth crashes when I load a shape file

2010-01-29 Thread Martin Scheffler
It's the data included in the SVN, and the example that I linked in the first 
post.


Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23440#23440





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Confirmed system configuration for osgShadow to work?

2010-01-26 Thread Martin Scheffler
Hi,
I have tried out osgShadow on multiple systems and can't get a really good 
looking shadow on any of them. 
SM, SSM and lispsm gives me fully black objects (tested on Win and Linux, both 
with NVidia 
GTX 280), PSSM only gives me a flickering shadow, other imlpementations have 
other problems. 

I can afford buying a different graphics card and am flexible in regards to 
operating system, I would only like to have information on a confirmed working 
setup. So has anybody managed to get a good looking shadow, preferably PSSM, 
working? 

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23188#23188





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Publicly Available TerraPage Database

2010-01-10 Thread Martin Scheffler
I found this link in an old post:

http://www.triangraphics.de/index.php?1=Downloadl=eng

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22354#22354





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] probem in playing gif with osgdb_gif

2009-12-09 Thread Martin Scheffler
I'm sorry, I haven't used photoshop for years. You have to disable optimization 
or something.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=21153#21153





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] probem in playing gif with osgdb_gif

2009-12-08 Thread Martin Scheffler
This looks like only the changes to the last animation frame are displayed. 
When you save a gif from Adobe ImageReady or similar programs, the frames of 
the gif only contain the changes from the last animation frame to reduce image 
size.  Maybe you can fiddle with the gif export settings so that full frames 
are saved.

Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=21130#21130





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Read color from osgTerrain ImageLayer?

2009-11-30 Thread Martin Scheffler
Hi Robert,

I use the puget example from the osgDem page. I think compression is not on by 
default, right?

gdal_translate.exe ps-e.lg.jpg ps-e.lg.tif
gdaladdo.exe -r average ps-t.lg.tif 2 4 8 16 32
osgdemd.exe --xx 10  --yy 10 --layer 0 -t ps-t.lg.tif --xx 10 --yy 10 -d 
ps-e.lg.tif  -l 4 -v 0.5 -o puget.ive

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=20570#20570





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Read color from osgTerrain ImageLayer?

2009-11-30 Thread Martin Scheffler
OK, I removed compression by adding --RGB-16, now it works

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=20582#20582





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] The book OpenSceneGraph Design and Implementation is published

2009-11-25 Thread Martin Scheffler
wow, time to brush up my mandarin! :) Congratulations!

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=20398#20398





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Combining particles with different textures

2009-11-18 Thread Martin Scheffler
Hi Robert,

I'm on it. Thanks!

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=19803#19803





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Wayfinding / route finding

2009-11-02 Thread Martin Scheffler
Also, the OSG-based game engine Delta3D offers pathfinding functionality.
http://www.delta3d.org
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=19041#19041





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Loading mesh without textures

2009-10-19 Thread Martin Scheffler
So, as promised here's the code to strip textures and UV coords from geometry. 
It saves me about 700 mb at runtime, which makes me happy :o 


Code:

class StripTexturesVisitor : public osg::NodeVisitor
{
public:

   StripTexturesVisitor()
  : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN)
   {}

   void Strip(osg::Drawable* drawable)
   {
  osg::Geometry* geometry = drawable-asGeometry();

  osg::StateSet* ss = drawable-getStateSet();
  if(ss != NULL)
  {
 for(unsigned int i = 0; i  2; ++i)
 {
ss-removeTextureAttribute(i, osg::StateAttribute::TEXTURE);
if(geometry != NULL)
{
   geometry-setTexCoordArray(i, NULL); 
}
 }
 ss-releaseGLObjects();
  }
   }

   virtual void apply(osg::Geode node)
   {
  for(unsigned int i = 0; i  node.getNumDrawables(); ++i)
  {
 Strip(node.getDrawable(i));
  }
  
  traverse(node);

   }
};




--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18377#18377





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Loading mesh without textures

2009-10-15 Thread Martin Scheffler
Hi,

I am using OSG to write a preprocessing tool where I do a lot of collision 
testing. I am running into memory problems as the meshes I load have a LOT of 
textures. 
I would like to remove the textures, as they take away a lot of memory and are 
irrelevant for the task I do.
Is it possible to remove textures after I load a mesh (from IVE), or even 
better, tell OSG to ignore textures in the first place when loading the IVEs?

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18287#18287





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Loading mesh without textures

2009-10-15 Thread Martin Scheffler
Ulrich, thank you for your answer. 
But I load .ive files, which have textures included! So this callback only 
receives the name of the ive, not the textures.

Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18290#18290





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Loading mesh without textures

2009-10-15 Thread Martin Scheffler
Gordon: 

I think the idea with the visitor would work for me. 
I apply this visitor to my meshes:

[code]
class StripTexturesVisitor : public osg::NodeVisitor
{
public:

   StripTexturesVisitor()
  : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN)
   {}

   virtual void apply(osg::Node node)
   {
  osg::StateSet* ss = node.getStateSet();
  if(ss != NULL)
  {
 ss-removeTextureAttribute(0, osg::StateAttribute::TEXTURE);
 ss-removeTextureAttribute(1, osg::StateAttribute::TEXTURE);
  }
  traverse(node);
   }  
};
[/code]

This does not seem to work. The removeTextureAttribute method is called, but I 
can still see the textures on the meshes. Is this the correct way to remove the 
textures?

Thx,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18293#18293





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Loading mesh without textures

2009-10-15 Thread Martin Scheffler
Thanks guys! I will post a correct visitor here when I have finished it.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18297#18297





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] change ocean height

2009-10-02 Thread Martin Scheffler
no seb, I also really needed that feature. I already wrapped it in dtOcean: 
https://sourceforge.net/apps/mediawiki/delta3d/index.php?title=DtOcean

Cheers. Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=17796#17796





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Suggestion: Add components in nodes (aggregation)

2009-08-13 Thread Martin Scheffler
Regarding actor components in Delta3D:
The GMComponents are not at the actor level, but even higher, they are to be 
used for stuff like network adapters, device interfaces and other global 
stuff. If you check out Delta3D from trunk you can take a look at 
inc/dtGame/actorcomponentbase.h which basically implements the stuff from the 
cowboy programer article. Also, components can send and receive messages. 
In Delta3D, OSG nodes are wrapped in actors. Do you think the userdata property 
is a good place to store stuff like this? Maybe you should add a companion 
object for each of your osg nodes that holds extra game-related functionality 
like a unique id.


Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16191#16191





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Combining particles with different textures

2009-08-02 Thread Martin Scheffler
Thanks Rosme and Skylark,

I've modified the Particle class to allow me to specify start and end tiles for 
a particle. I am uploading a patch for the class with this post, maybe you 
could include it (or the functionality it describes) in the distro?

I can now shoot particles with different animations from the same particle 
system. Neat! I've looked into the premultiplied alpha stuff, and it seems to 
work OK. Thanks for the tip!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15702#15702



Index: include/osgParticle/Particle
===
--- include/osgParticle/Particle(revision 10517)
+++ include/osgParticle/Particle(working copy)
@@ -153,7 +153,7 @@
 inline int getTileT() const;
 
 /// Get number of texture tiles
-inline int getNumTiles() const { return _num_tile; }
+inline int getNumTiles() const { return _end_tile - _start_tile + 1; }
 
 /** Kill the particle on next update
 NOTE: after calling this function, the CODEisAlive()/CODE 
method will still 
@@ -245,9 +245,14 @@
 /// Get the current (interpolated) polygon size. Valid only after the 
first call to update().
 inline float getCurrentSize() const;
 
-/// Specify how the particle texture is tiled
-inline void setTextureTile(int sTile, int tTile, int numTiles = 0);
+/// Specify how the particle texture is tiled.
+/// All tiles in the given range are sequentially displayed during the 
lifetime
+/// of the particle. When no range is given, all tiles are displayed 
during the lifetime.
+inline void setTextureTileRange(int sTile, int tTile, int startTile, 
int endTile);
 
+/// Same as above, range starts at 0 and ends at end
+inline void setTextureTile(int sTile, int tTile, int end = -1);
+
 /// Set the previous particle
 inline void setPreviousParticle(int previous) { _previousParticle = 
previous; }
 
@@ -298,7 +303,8 @@
 
 float _s_tile;
 float _t_tile;
-int _num_tile;
+int _start_tile;
+int _end_tile;
 int _cur_tile;
 float _s_coord;
 float _t_coord;
@@ -565,21 +571,36 @@
 return _current_size;
 }
 
-inline void Particle::setTextureTile(int sTile, int tTile, int numTiles)
+
+inline void Particle::setTextureTile(int sTile, int tTile, int end)
 {
-_s_tile = (sTile0) ? 1.0f / static_castfloat(sTile) : 1.0f;
-_t_tile = (tTile0) ? 1.0f / static_castfloat(tTile) : 1.0f;
-if (numTiles = 0)
-{
-_num_tile = sTile * tTile;
-}
-else
-{
-_num_tile = numTiles;
-}
+setTextureTileRange(sTile, tTile, -1, end);
 }
 
+inline void Particle::setTextureTileRange(int sTile, int tTile, int 
startTile, int endTile)
+{
+   _s_tile = (sTile0) ? 1.0f / static_castfloat(sTile) : 1.0f;
+   _t_tile = (tTile0) ? 1.0f / static_castfloat(tTile) : 1.0f;
+   
+   if(startTile == -1)
+   {
+  _start_tile = 0;
+   }
+   else
+   {
+  _start_tile = startTile;
+   }
 
+   if(endTile == -1)
+   {
+  _end_tile = sTile * tTile;
+   }
+   else
+   {
+  _end_tile = endTile;
+   }
+}
+
 }
 
 #endif
Index: src/osgParticle/Particle.cpp
===
--- src/osgParticle/Particle.cpp(revision 10517)
+++ src/osgParticle/Particle.cpp(working copy)
@@ -45,7 +45,8 @@
 _current_alpha(0),
 _s_tile(1.0f),
 _t_tile(1.0f),
-_num_tile(1),
+_start_tile(0),
+_end_tile(0),
 _cur_tile(-1),
 _s_coord(0.0f),
 _t_coord(0.0f),
@@ -79,7 +80,7 @@
 }
 
 //Compute the current texture tile based on our normalized age
-int currentTile = static_castint(x * _num_tile);
+int currentTile = _start_tile + static_castint(x * getNumTiles());
 
 //If the current texture tile is different from previous, then compute new 
texture coords
 if(currentTile != _cur_tile)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Combining particles with different textures

2009-08-02 Thread Martin Scheffler
Alright, will do!

screenshot
[/img]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15704#15704



attachment: fire.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Combining particles with different textures

2009-08-01 Thread Martin Scheffler
Hi,

I'm trying to work out how to combine particles with different textures. I want 
to create a fire particle system where I can dynamically change the amount of 
fire-, smoke- and spark-particles. I haven't found a good way to do this yet.

My first idea was to overlay multiple particle systems. This has the problem 
that the particles of the different kinds start z-fighting. Depending on camera 
position, different kinds of particle are rendered on top.

My second thought was to create a single particle system that has emitters for 
the different particles. I can add multiple emitters to a particle system with 
different particle prototypes. 
I can only assign one single texture to a particle system. This would be OK if 
I could specify different texture coordinates for the different particle 
prototypes. There is the method in the particle class setTextureTile that I 
can use to let a single particle loop through the tiles of a texture during its 
lifetime. But there is no way to set a start and end tile, so the particle 
always loops through all tiles.

Is there something I don't see? Or is there currently no way to add differently 
textured particles to a single particle system? If there is none, the easiest 
way to change this would be to add a setStartTile and setEndTile method to the 
particle class so that I can assign different tile segments to different 
particles.

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15697#15697





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Combining particles with different textures

2009-08-01 Thread Martin Scheffler
I just looked at the cessna example, and it seems to have the z fighting 
problem I tried to describe. If you turn the camera around the plane, at some 
point the fire jumps over the smoke. The two particle systems are not really 
mixing.

Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15699#15699





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Callback for actors being culled?

2009-07-29 Thread Martin Scheffler
By digging some more I found an old forum message that answers my question, so 
please disregard my request.
http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg16202.html

Cheers, Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15576#15576





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Callback for actors being culled?

2009-07-28 Thread Martin Scheffler
Hi,

I have a lot of particle systems in my scene. I want to freeze the particle 
systems that are currently not seen. How can I get informed when a node is 
culled away? I have a geometry the max size of the particle system, so I would 
like to be informed when that geometry is culled away / shown again.

Thanks for your help!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15542#15542





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [3rdparty] OSGOcean reflection is not mirrored

2009-07-23 Thread Martin Scheffler
Hi,

seems like the reflection in osgOcean is not mirrored correctly.
When I have letters reflecting in the water, they are from right to left 
(mirrored vertically) but they should be from bottom to top (mirrored 
horizontally)! 

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15308#15308





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] OSGOcean reflection is not mirrored

2009-07-23 Thread Martin Scheffler
OK, never mind, everything is fine. The ship model I am working with is open on 
the bottom side, so I could peek under the hull and the inner side of the hull 
was reflected.

That reminds me, is there a way to set the height of the ocean? By default it 
seems to be at z = 0, is there a way for me to change that? 

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15312#15312





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] Is the osgOcean Linux bug still present?

2009-06-17 Thread Martin Scheffler
Pierre,

are you using FFTW or FFTSS?
This error is known to appear with FFTW, can you try out FFTSS?


Thanks!
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=14071#14071





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgOcean 1.0 (LGPL) Released

2009-06-16 Thread Martin Scheffler
Hi,

I compiled osgOcean and everything works fine here. I ran into trouble when 
integrating it with my existing application. When I used the last version of 
osgOcean, I could just put the ocean somewhere in the scene graph and it did 
not interact with my other stuff. Now osgOcean blocks my view onto the other 
objects in the scene. When I add the objects as children to the OceanScene, the 
objects are shown, but the ocean shaders are applied to the objects. This add 
some sparkling effects to my animations, which looks nice but is not really 
what I want.

So how can I add my objects to the scene without interference?

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=14038#14038





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] problem with ocean surface in svn

2009-06-09 Thread Martin Scheffler
Hi Kim,

I just ran into the same problem on our SuSE boxes. Will you take a look at 
that? Or do you have any pointers for me where to look? As osgOcean works 
perfectly fine under windows the best guess is to look for differences in the 
FFTW library, right? 
Has anyone got osgOcean running successfully under Linux?

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=13772#13772





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Forward declared classes and ref_ptrs

2009-06-09 Thread Martin Scheffler
I can only forward-declare ref-ptr members if I write the implementation of the 
class destructor in the cpp file. Try if that helps

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=13773#13773





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] [osgOcean] problem with ocean surface in svn

2009-06-09 Thread Martin Scheffler
Allright! Keep up the good work!
Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=13775#13775





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] GUIEventAdapter: How do I know which key was pressed together with ctrl?

2009-06-03 Thread Martin Scheffler
Hi,

I'm currently creating a first person shooter like camera control. I steer with 
the 'wasd' keys. Pressing shift speeds the character up, pressing ctrl makes 
the character duck.
 
I basically need a way to get the basic, unmodified key the user pressed. This 
would have to return 'w', no matter if ctrl+'w' or shift+ctrl+'w' was pressed. 
Is that somehow possible?

When the user presses shift + w, I can do something like this:
[code]
if(ea.getModKeyMask()  osgGA::GUIEventAdapter::MODKEY_SHIFT)
handleKey(ea.getKey() - 'A' + 'a');
[/code]
But this only works for shift, I don't know how to handle ctrl or combinations 
of modifiers.

Thank you!

Cheers,
Martin[/code]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=13413#13413





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Help: Using OSG To Build Tiled Display Wall

2009-05-17 Thread Martin Scheffler
Distributing the scene graph is the approach Avango is taking - 
http://avango.org/.  Avango is based on OSG and allows scene graphs distributed 
across machines. The authoritative version of scene graph branches may lie on 
different machines. Transformation matrixes are automatically distributed. 
I noticed that the avango project has not had any publicity here. I wonder why? 
I had to work with Avango a few years back when it was still based on 
Performer, and found it quite nice.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=12350#12350





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Help: Using OSG To Build Tiled Display Wall

2009-05-16 Thread Martin Scheffler
Philip,

The NVidia Quadro Plex D4 seems to handle eight display outputs 
(http://www.nvidia.com/object/product_quadroplex_2100_d4_us.html - sorry for 
posting a german language link before).

Has anybody tried that out? I would like to know how complex the geometry may 
be for the system to display at an acceptable frame rate. Having eight displays 
on one machine would make clustered IG systems unnecessary for some 
applications that have limited complexity geometry. I am thinking of using this 
for my stuff, but would like to hear from others about their experiences on the 
matter.

So, has anyone used systems like this with OSG?

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=12326#12326





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Help: Using OSG To Build Tiled Display Wall

2009-05-15 Thread Martin Scheffler
Hi,

I am currently thinking about how to do a multi-display simulation with OSG 
that uses a single machine to feed all displays. The app I am currently working 
on requires multiple views, but is difficult to distribute across machines 
because of some randomness components in my graphics stuff.

My simulation requires at least four projectors (or eight if necessary and 
possible). I am thinking about using a Nvidia Quadro Plex system 
http://www.nvidia.de/page/quadroplex.html.

Has anyone here used heavy-duty graphics hardware to feed four or more views 
from one machine? What hardware setup do you use, and are you able to render 
reasonably complex scenes? Or can you point me in a good direction for more 
info?

Looking forward to your responses -
Martin[/url]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=12206#12206





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] osgOcean release

2009-05-07 Thread Martin Scheffler
Hi,

I tried everything out and it looks awesome!
Some notes:
The demo crashes when I use multiple screens. Disabling the extra screen fixed 
this, so does preventing fullscreen.
I have started to integrate this as an actor into the Delta3D game engine. This 
works pretty good, the only thing that misses is a way to set the location of 
the water shaders from the outside. At the moment the shader locations are hard 
coded to the resources folder. Could you change that?

Thank you!

Cheers,
Martin Scheffler

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=11626#11626





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [osgPlugins] collada: use of bind_vertex_input

2009-04-23 Thread Martin Scheffler
Hi,

I export from Max using the feeling exporter 3.05b (c gives the same results).
I have a diffuse map and an ambient map in my model. When importing the collada 
file into osg, the maps are not shown. It seems that I have to modify 
[code]instance_material symbol=r8.3.007_1 
target=#r8.3.007-material/[/code]
to 
[code]
instance_material symbol=r8.3.007_1 target=#r8.3.007-material
bind_vertex_input semantic=CHANNEL2 input_semantic=TEXCOORD input_set=2/
bind_vertex_input semantic=CHANNEL1 input_semantic=TEXCOORD input_set=1/
/instance_material
[/code]
Then everything works as expected. 
Is this faulty behavior of the exporter? The collada 1.4 spec says:


[quote]
The bind_vertex_input element binds geometry vertex streams (identified as 
input elements
within geometry elements) to material effect vertex stream semantics. Although 
applications commonly
perform automatic binding of vertex streams with identical semantic 
identifiers, there are frequently
mismatches in a semantic identifier’s meaning. Use bind_vertex_input to 
remove these
ambiguities 
[/quote]

So maybe the exporter could detect texture coordinate sets automatically?

Thanks,
Martin[/quote]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=10711#10711





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] simple water shader?

2009-04-14 Thread Martin Scheffler
Hi,

For my project I need indoor water for puddles.
Because I don't have much time to spend on this I would like your advice on how 
to do this the fastest way.

I don't need scene reflections or even transparent water, a glossy animated 
normal map would be good enough for me. 

* Is there pre-existing stuff out there that I can use?
* If not, how would I go at creating a shader for this? Is it necessary to have 
multiple normal maps or does it suffice to combine some sine functions to 
deform the local normal?

Thank you.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=10192#10192





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Picking Polygons?

2009-03-30 Thread Martin Scheffler
Hi Robert, thanks for your answer.

I now switched to use triangles for the intersection mesh. This works, but only 
if I disable using the KD tree for intersection testing. 

When I do 
 intersectVisitor.setUseKdTreeWhenAvailable(true);
the primitiveIndex values are not correct. When I switch this to false 
everything works correctly.
I'm sorry I can't provide a better test case at the moment as I am in a hurry 
to get my stuff done.

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=9453#9453





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Picking Polygons?

2009-03-28 Thread Martin Scheffler
Hi all,

I have a geometry containing a number of polygons, each a
osg::DrawElementsUInt(osg::PrimitiveSet::POLYGON,0).

I want to use the LineSegmentIntersector to pick a polygon of the mesh.
Everything works fine, only I can't make sense
of the primitiveIndex value of the Intersection class.

When I pick my mesh, I get these values:

Intersection.IndexList: 118, 64, 67
Intersection.PrimitiveIndex: 142
Geometry.NumPrimitiveSets: 66

So the picked PrimitiveIndex is 142, but there are only 66 polygons in the
mesh!
How can I get to the polygon?

Thank you!
Martin
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


  1   2   >