Re: [osg-users] mygui integration (for Wang Rui)

2015-11-11 Thread Wang Rui
Hi Trajce,


This should be easy because MyGUI window is encapsulated in derived 
osg::Drawable class and displayed in a HUD camera. You may simply set the 
camera ortho matrix to a different value like (0.0, 0.4, 0.0, 0.4) to have OSG 
scene as background.


Wang Rui


-- Original --
From:  "Trajce Nikolov NICK";;
Date:  Wed, Nov 11, 2015 04:43 AM
To:  "OpenSceneGraph Users"; 

Subject:  Re: [osg-users] mygui integration (for Wang Rui)



Hi Wang,

did you had luck to have osg scene as a background (the osg blusish background 
with a model)? Any hints for this?


Thanks a lot!


Nick


On Tue, Nov 10, 2015 at 7:45 AM, Trajce Nikolov NICK 
 wrote:
Thanks Wang for the fast reply ... I will .. 

Cheers,
Nick


On Tue, Nov 10, 2015 at 1:55 AM, Wang Rui  wrote:


Hi Trajce,


The osgmygui example is compiled against MyGUI 3.01 and will look for 
resource.xml file in current working directory to locate MyGUI media files. The 
template of resource.xml can be found at /CMake/Templates, which 
should also be installed to /bin automatically.


Sorry for my inactivity these days, and feel free to use and commit to the 
osgRecipes project. :-)


Wang Rui


-- Original --
From:  "Trajce Nikolov NICK";;
Date:  Tue, Nov 10, 2015 03:01 AM
To:  "OpenSceneGraph Users"; 

Subject:  [osg-users] mygui integration (for Wang Rui)



Hi Wang,

I am looking at your work with mygui and I was wondering where do you host the 
referenced config .xml files to run the sample. Please let me know


Thanks as always !


Nick


p.s. I hope the community will not mind for posting this to the user list :-)


-- 
trajce nikolov nick

 







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





-- 
trajce nikolov nick

 
 




-- 
trajce nikolov nick___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] mygui integration (for Wang Rui)

2015-11-09 Thread Wang Rui
Hi Trajce,


The osgmygui example is compiled against MyGUI 3.01 and will look for 
resource.xml file in current working directory to locate MyGUI media files. The 
template of resource.xml can be found at /CMake/Templates, which 
should also be installed to /bin automatically.


Sorry for my inactivity these days, and feel free to use and commit to the 
osgRecipes project. :-)


Wang Rui


-- Original --
From:  "Trajce Nikolov NICK";;
Date:  Tue, Nov 10, 2015 03:01 AM
To:  "OpenSceneGraph Users"; 

Subject:  [osg-users] mygui integration (for Wang Rui)



Hi Wang,

I am looking at your work with mygui and I was wondering where do you host the 
referenced config .xml files to run the sample. Please let me know


Thanks as always !


Nick


p.s. I hope the community will not mind for posting this to the user list :-)


-- 
trajce nikolov nick___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG RECIPES Data

2015-04-14 Thread Wang Rui
Hi Dave,


One of the purpose of the osgRecipes project is to provide all source code used 
in the book OpenSceneGraph 3.0 Cookbook, published by Packt Publishing. And 
what you found is just corresponding to the second example in Chapter 5. And it 
should be a mistake... The correct code snippet, as shown in the book, is as 
below:
image = osgDB::readImageFile( "0.ffmpeg", new osgDB::Options("format=vfwcap 
frame_rate=25") );


It in fact uses the FFmpeg plugin to load video stream from the webcam using 
the VFW option. You may change the filename to some other disk files like 
"c:/path/file.avi.ffmpeg" and then ignore the option string. But there is no 
"animate PNG" support in OSG... so sorry for the misdirection. :-)


Also thank you for supporting the osgRecipes project.


Wang Rui


-- Original --
From:  "Dave Sargrad";;
Date:  Wed, Apr 15, 2015 05:42 AM
To:  "osg-users"; 

Subject:  [osg-users] OSG RECIPES Data



Hi,

I've found the osgRecipes  (https://github.com/xarray/osgRecipes) to be quite 
useful. However most of the data is missing from these, and there is no proper 
reference to the location of the data. I stumbled on this 
(https://github.com/openscenegraph/osg-data) data. It seems to be a close fit 
to the recipes. However some data files are missing. For example right now I'm 
in cookbook_05_02. This cookbook is looking for one of two datafiles (in my 
case pic.png). I think this is just a placeholder, and I'm expected to drop my 
own "animated PNG" into place. I've tried several such png's found on the web, 
but none seem to do what one might expect.


Code:
 osg::ref_ptr image;
if ( arguments.argc()>1 )
image = osgDB::readImageFile( arguments[1] );
else
{
#ifdef WIN32
image = osgDB::readImageFile( "Images/bouncing_beach_ball.png" );
#else
image = osgDB::readImageFile( "/dev/video0.ffmpeg" );
#endif
}

osg::ImageStream* imageStream = dynamic_cast( 
image.get() );
if ( imageStream ) imageStream->play();



I've never used animated png's before so I'm not sure how best to find a 
compatible image.

In this code snippet, I replaced pic.png with a bouncing_beach_ball.png found 
here 
(http://upload.wikimedia.org/wikipedia/commons/1/14/Animated_PNG_example_bouncing_beach_ball.png).

Thank you for any insights.

Cheers,
Dave

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





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


Re: [osg-users] Register object wrapper for osg::Geode

2015-03-24 Thread Wang Rui
Hi Robert and John,


As Geode and Group serializers both contain only one user macro for storing 
children nodes, I think we can simply rewrite the Geode serializer like this:
REGISTER_OBJECT_WRAPPER( Geode,
 new osg::Geode,
 osg::Geode,
 "osg::Object osg::Node osg::Geode" )
{
ADD_USER_SERIALIZER( Drawables );  // _drawables‍

{
UPDATE_TO_VERSION_SCOPED( 115 )
REMOVE_SERIALIZER( Drawables‍ );‍
ADD_USER_SERIALIZER( Children );  // _children‍
}
}


Similar work should be done on osg::Drawable serializers as well to support 
some important attributes like NodeMask and CullingActive. This is the fastest 
way to update serializers and keep back-compatibility in my opinion, without 
changes to the core modules.


An alternative way is to have a new REGISTER_VERSIONED_OBJECT_WRAPPER macro to 
submit a new ObjectWrapper to the registry, in which only wrapper with newer 
version number can be accepted, such like:‍
REGISTER_VERSIONED_OBJECT_WRAPPER( 115, Geode,
 new osg::Geode,
 osg::Geode,
 "osg::Object osg::Group osg::Geode" )‍

{
...
}


The second way might be easier and more readable for further use.


Cheers,


Wang Rui


-- Original --
From:  "Robert Osfield";;
Date:  Tue, Mar 24, 2015 05:37 PM
To:  "OpenSceneGraph Users"; "Wang 
Rui"; 

Subject:  Re: [osg-users] Register object wrapper for osg::Geode



Hi John and Rui,


Well spotted.  I am not sure what to do about this one.  I think fixing the 
REGISTER_OBJECT_WRAPPER to include osg::Group may well break the parsing of 
.osgb files as the current serializers aren't versioned for the associates list.


Having two separate wrappers might be the way forward.  Or adding some for of 
versioning for the associate list.


Any thoughts Rui?



Cheers,

Robert.


On 24 March 2015 at 08:33, John Ivar Haugland  wrote:
Hi, 

I notice that osg::Geode now inherits osg::Group instead of osg::Node. 


However, in the corresponsing serializer osg::Group is not mentioned in 
REGISTER_OBJECT_WRAPPER( Geode,

 new osg::Geode,
 osg::Geode,
 "osg::Object osg::Node osg::Geode" )





Is this correct ? or should it be changed to 


REGISTER_OBJECT_WRAPPER( Geode,

 new osg::Geode,
 osg::Geode,
 "osg::Object osg::Node osg::Group osg::Geode" )






Kind regards
John Ivar Haugland





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


Re: [osg-users] [ANN] OpenMW: Announcing switch to OSG

2015-02-25 Thread Wang Rui
Hi Max,


It's great to see such a famous open source game chooses OSG. I personally 
focus on improving the rendering quality of OSG-based applications using 
deferred lighting and advanced shadow mapping techniques, which may be found at 
http://www.openscenegraph.com/index.php/gallery/use-cases


Some of my implementation were already open sourced under Github/osgRecipes. 
And I plan to release my current deferred pipeline after some recent client 
work. Maybe at that time I could help improve the game rendering, too. :-)


Cheers,


Wang Rui‍






-- Original --
From:  "Max Maslov";;
Date:  Thu, Feb 26, 2015 11:30 AM
To:  "osg-users"; 

Subject:  Re: [osg-users] [ANN] OpenMW: Announcing switch to OSG



Thanks for the warm welcome!

And visit our forum https://forum.openmw.org/ - we're always looking for new 
developers and just interested folk.

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





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


Re: [osg-users] Please test svn/trunk and OSG-3.2 branch in prep for 3.3.2 dev release and OSG-3.2.1-rc4

2014-06-26 Thread Wang Rui
Thanks Robert. So it is much clear to me now.

Wang Rui


2014-06-27 0:23 GMT+08:00 Robert Osfield :

> HI Rui,
>
> On 26 June 2014 17:12, Wang Rui  wrote:
> > Both dynamic and static libraries/examples build fine on Windows 7,
> Visual
> > Studio 2010. Also interested in the new osgUI library. Will go a little
> > deeper to see if I can write some more examples for it. :-)
>
> I am still working on osgUI it so you probably won't be able to
> achieve much yet.  I'm mainly testing it through lua scripts as this
> tests both the C++ side and the scripting integration.  My own
> intention is to put high level UI elements together with scripting,
> composing it using low level C++ widgets that have full wrappers
> exposed via the osgDB serializers.
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Hi ALL OSG Community members, For Robert Osfield's justice and proving all is reality no virtual reality, tonight(china time) www.osg3d.org first public the OSG D3D 9.0's Codes

2014-06-26 Thread Wang Rui
As far as I know there is GLDirect (
http://sourceforge.net/projects/gldirect/) that can work like a bridge
between OpenGL and D3D. I don't know if your application depends on it to
"support" DirectX, but this is not important... Just can't understand
your motivation of providing single-exe applications that obviously come
from some other engines or be packed "meticulously" with certain tools,
and emphasizing they are OSG beginner works.

But it's OK, will also wait to see the source code. It is already overnight
in Chinese time now so I wonder if you mean the next night?

Wang Rui



2014-06-26 23:50 GMT+08:00 LearningOSG LearningOSG :

> Hi ALL OSG Community members,For Robert Osfield's justice and proving all
> is reality no virtual reality,tonight(china time) www.osg3d.org first
> public the OSG D3D 9.0's Codes
>
>   Thanks robert's justice!
>
>   When all is finished tonight,Please download the codes!
>
>   cheers
>
>   Learned osg five months
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test svn/trunk and OSG-3.2 branch in prep for 3.3.2 dev release and OSG-3.2.1-rc4

2014-06-26 Thread Wang Rui
Hi Robert,

Both dynamic and static libraries/examples build fine on Windows 7, Visual
Studio 2010. Also interested in the new osgUI library. Will go a little
deeper to see if I can write some more examples for it. :-)

Wang Rui



2014-06-26 23:21 GMT+08:00 Robert Osfield :

> Hi All,
>
> I will the tag the 3.3.2 dev release, and the OSG-3.2.1 release
> candidate 4 tomorrow (Friday 27th June).  Could users checkout and
> build svn/trunk and the OSG-3.2 branch to make sure it compiles on
> your platforms and works against your applications.
>
> Please post to this thread if things work or don't so I know whether
> it looks things are looking like they are converging nicely for a
> tagging svn/trunk and OSG-3.2 branch.
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN]OSGWARES 1.0 Beta Release notes(a gift for Robert and osg community)!

2014-06-26 Thread Wang Rui
Hi all,

I saw this IP in the Chinese OSG forum, too, whose name changes from
"learning OSG two months" to "five months" continuously... And my feel is
the same... very strange. His original executables are highly packed and
can't be proved to be related with OSG (in fact it depends on D3D11 when
checked with DependencyWalker). He said that the OSG source code were
totally rewritten with DirectX in his programs but I'd rather think it a
bad joke..

I personally think this IP bothers others in an ill-disposed manner (not
studying, not sharing code, not selling products...) but don't have
enough evidence currently. And I'm really confusing about his motivation.
So I'm just sharing the information I know here, and hope my guess goes
wrong at last.

Wang Rui


2014-06-26 20:33 GMT+08:00 Robert Osfield :

> On 26 June 2014 12:21, Jordi Torres  wrote:
> > Quite strange,
>
> Agree it's very odd conduct for an OSG user/possible contributor.  Out
> of the blue anonymously claiming losts of things that don't add up.
>
> > The ip corresponds to Hong Kong, the whole web implementation is quite
> > strange if you look at the code. The download links are not "normal"
> 
> > html tags.
> > The domain name that he/she elected is also suspicious. The post he/she
> made
> > is targeted for OSG newbies, and obviously the person (who does not give
> > his/her name) don't know much about OSG.
> >
> > So I was looking forward to see more (that OSGWARES thing) before report
> > spamming.
>
> Specific targeting of malware at OSG users?  Might be a possibility.
>
> Trying to get a trojan installed on one or more of our computers?
>
> If it is an attack vector then it's a pretty crude one.
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG static linking

2014-03-08 Thread Wang Rui
Hi Chris,

As far as I know, USE_OSGPLUGIN only calls a C-styled function through a
static proxy variable, which is defined by REGISTER_OSGPLUGIN in the plugin
source code body. So compiler can thus find and register the plugin while
static linking. It should do no harm to user applications no matter
dynamic/static linked.

Wang Rui


2014-03-09 0:14 GMT+08:00 Chris Hanson :

> I think what Paul was asking is, if you build and install OSG, is there
> any state retained anywhere (in a #define in a config.h or something) that
> indicates _if_ OSG itself WAS built with OSG_STATIC, and therefore if the
> application needs to configure its own #if blocks to automatically
> instantiate the USE_OSGPLUGIN code.
>
> And the secondary question is -- is there any harm in having USE-OSGPLUGIN
> blocks in an application that is using OSG dynamically linked?
>
> I tried to answer the question, but discovered that I don't actually know
> these answers.
>
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OT: Windows GDI/GDI++ Alternative

2014-03-05 Thread Wang Rui
Hi Gordon,

You may have a look at my latest submission to osgRecipes:
https://github.com/xarray/osgRecipes/tree/master/integrations/osgagg

I've jusst updated my work on integrating OSG and AGG (Anti-Grain Geometry)
after several silent months working for clients and my first baby. It
provides almost all graphics interfaces I think useful. Hope it will be of
help to you, too. :-)

Will be back to regular OSG developments soon.

Cheers,

Wang Rui



2014-03-05 12:34 GMT+08:00 Gordon Tomlinson :

> Hi Folks
>
>
>
> This question is a little of topic but  thought this group might be a good
> group to ask, I have a windows application ( that has an OSG component)
> that it looks like I have to port to Linux (Redhat), this application makes
> a lot of use of the  Windows GDI/GDI++ library (Windows graphics device
> interface) and my current Linux knowledge is 9 years stale
>
>
>
> Can anyone recommend a good Linux alternative to the Windows GDI/GDI++
> that offers comparable functionality
>
>
>
>
>
> Thanks
>
>
>
>
>
> Gordon
>
>
>
>
>
>
> _
>
> *Gordon Tomlinson *"Self defence is not a function of learning tricks but
> is a function of how quickly and  intensely one can arouse one's instinct
> for survival"
> -*Master Tambo Tetsura*
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Is it possible to use EffectCompositor to describe effects per object?

2013-10-30 Thread Wang Rui
Hi Michael,

Effect compositor in fact adds the child scene graph to a camera binding to
a FBO, and then uses RTT cameras to perform the post processing work. The
last step is always to show the final image on an HUD quad so all other
scene nodes will be occluded. The only way to make the effect compositor
work with other fixed pipeline nodes is to write to the depth values in the
shader code of the last step, which cannot be automated.

The dof.xml does such work so you may try ./osgeffectcompositor
--normal-scene cessna.osg --effect dof.xml to see how normal and deferred
shaded objects are merged. At present I haven't had a better idea about
this problem. :-)

Wang Rui



2013/10/30 michael kapelko 

> Hi.
> I've recently implemented deferred shading with normal mapping and shadow
> mapping using EffectCompositor, but it has effect on the whole scene, not a
> single object.
> Is it possible to use EffectCompositor to apply effects per object?
> Thanks.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] deferred shading in osg

2013-08-04 Thread Wang Rui
Hi Nick,

You may want to have a look at the osgeffectcompositor example in the
osgRecipes project, which is an initial deferred shading framework for OSG.
Also there is the osgPPU project that can do the same work for you, I think.

Wang Rui



2013/8/5 Trajce Nikolov NICK 

> Hi Community,
>
> has anyone has done some work on this and willing to share hints, snippets
> ?
>
> Thanks a lot!
>
> Nick
>
> --
> trajce nikolov nick
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] New versions of the SilverLining Cloud, Sky & Weather SDK and the Triton Ocean SDK

2013-07-31 Thread Wang Rui
You may also have a look at the osgRecipes project which has an osgtriton
example with patch support.

Wang Rui


2013/8/1 Chris Hanson 

> You might want to contact Frank Kane at Sundog software directly. I don't
> think is really appropriate for the OSG users mailing list.
>
>
> On Thu, May 30, 2013 at 12:27 PM, Mohammed Djeralfia 
> wrote:
>
>> Hello,
>> I am new with Triton, I want to set Water  to a specific area in my
>> project --> use Patch but all my objects were covered by water. So can you
>> give us a simple code for osg using patch to try it.
>> Thank you in advance.
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=54324#54324
>>
>>
>>
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
>
> --
> Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
> http://www.alphapixel.com/
> Training • Consulting • Contracting
> 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4
> • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
> Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry •
> Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile •
> iPhone/iPad/iOS • Android
> @alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
> 623-PIXL [7495]
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Solving forum.openscenegraph.org problems

2013-07-30 Thread Wang Rui
Hi Robert,

I'm currently working on the Chinese translation of OpenGL Programming
Guide 8th Edition, as well as some client projects. It's heavy work for me
so sorry for not being with the community these days. Fortunately I'm going
to have a few more time later and will be back for more tests and feature
addtions :-)

In 2008, I started a Chinese OSG forum (bbs.osgchina.org), and have been
managing it until now, which has about 7 housand members and more than 50
thousand posts. My experience is simply that you can hardly satisfy
everyone who has questions in the forum. In most cases, askers will only
put the questions like 'why my scene is black' or 'how to implement 3DGIS
software', and it is nearly impossible to give a complete answer. I will
always ignore such topics or just give an one-line answer to save their
time and my time at that time. :-)

We had better support forums and even social networks for OSG users,
especially those young men, to get in touch with each other. This will also
help OSG itself to grow more quickly and get more attentions when related
news are coming. Release news will also receive more feedbacks if published
on forum. In fact, in my opinion, the forum should not be somewhere filled
with questions and answers, but a place for sharing ideas and achievements,
making friends, and looking for opportunities. We need not only moderators
but also active members to publish news, feature suggestions, discussions
and project galleries in the forum, to attract more people to attend and
encourage them to share their ideas, too.

Wang Rui



2013/7/31 Björn Blissing 

> Hi Robert et al,
>
> I would love for the forum to keep working. The forum is usually my goto
> place to find new information about OpenSceneGraph and I actually like the
> format better then the e-mail lists. Although the current state of the
> forum makes me a bit sad for the new users.
>
> I have been contemplating volunteering to do some basic moderation, ie.
> proof reading the first messages that users post before getting forum
> approval. My main hesitation has been, as I guess for all of you, lack of
> time.
>
> I also tend to work with OSG related project in irregular time periods. I
> have actually been working with OSG on and off since 2002. (My first
> experience with OSG was at a presentation that Robert held in Stockholm in
> November 2001). I usually work with it for a month or two and then I am
> away from the community for a couple of months doing other projects. The
> forum is perfect for this on-and-off "lifestyle" since it doesn't clog up
> my e-mail folders when I am inactive as a OSG user. (Registering and
> unregistering from the email lists became rather tedious.)
>
> So rather then letting the forum die, I would like to volunteer as
> moderator. Although I probably would be a moderator that would be rather
> inactive during some periods. But if there are more moderators our inactive
> periods hopefully shouldn't overlap too much.
>
> TLDR; I hereby volunteer as a forum moderator.
>
> Best regards,
>
> Björn Blissing
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=55494#55494
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] HowTo use UPDATE_TO_VERSION for custom osg::Object separate from osgVersion()

2013-04-21 Thread Wang Rui
Hi Peter,

Sorry for the delay. I'm still struggling on some business so not submit
the new serializer version-control code. But as far as I know, there
is no  UPDATE_TO_USER_VERSION
in any developer/stable version of OSG. It only exists in my submission,
which needs to be improved so not merged.

Thus I think maybe you have applied this submission in your OSG directory
before, and then overwrite it with the new 3.1.5 release?

I will finish my present work as soon as possible and submit to the OSG
core again.

Wang Rui



2013/4/18 Peter Bako 

> Hello Wang.
>
> Recently, I downloaded osg version 3.1.5 and I found out, that my
> UPDATE_TO_USER_VERSION macros don't work anymore. I digged into the osg
> source and found out that it is not there anymore, so I searched the forum
> but I didn't find any reason why was it removed.
>
> I used osg 3.1.1 before. I don't want to force you, I just want to ask,
> why was it removed if it was already there once?
>
> Thank you!
>
> Cheers,
> Peter
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=53678#53678
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Versioning to WRITE an old version ?

2013-03-29 Thread Wang Rui
Hi Robert and Renaud,

Sorry for the delay. I have just finished one of my client work and
uploaded some pictures at www.openscenegraph.com (Gallery - Use cases -
City of Xining). Hope someone would enjoy it. :-)

Current serialization mechanism doesn't support writing to previous
versions. And as Robert mentioned, we can implement such feature by
customizing the version number of OutputStream while writing to files. This
functionality will be submitted along with the alterable versioning
mechanism soon, maybe this weekend.

Thanks,

Wang Rui




2013/3/26 Robert Osfield 

> Hi Renaud,
>
> I haven't ever tried forcing the serializes to write to an old
> version, Wang Rui is the original author so to answer the question I
> have to dig into the code.  Looking at src/osgDB/OutputStream.cpp is
> curerntly hardwired to write out the current OSG version:
>
> *this << PROPERTY("#Version") << (unsigned
> int)OPENSCENEGRAPH_SOVERSION << std::endl;
>
> So for now I don't think there is a way and to provide a solution
> would require modifications to the source code.  My first thought
> would be perhaps one could have a so OutputStream version member
> variable default to OPENSCENEGRAPH_SOVERSION but allow this to be
> overwridden then use this when writing out version and selecting which
> wrappers to use in the ObjectWrapper.cpp.
>
> I know that Rui has been thinking about introducing a more flexible
> versioning scheme for the serializers so perhaps this capability could
> be worked into this work.  He has recently mentioned that he's too
> busy with other work to get back to this right now but once he gets a
> quieter spell he come back to it.
>
> Robert.
>
> On 28 February 2013 19:12, Renaud Paris  wrote:
> > Hi,
> >
> > I've just spent some times on understanding serialization and versioning
> > in wrappers. As far as I understand, you can read files written by
> previous versions. But is there a way to write as if it was written by a
> previous version?
> >
> > Do I miss something? Would it be a wrong idea to force version before
> writing and to modify ObjectWrapper::write to use either
> OPENSCENEGRAPH_SOVERSION or the wrapper version in order to select a
> > serializer or not?
> >
> > Thank you!
> >
> > Cheers,
> > Renaud
> >
> > --
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=52910#52910
> >
> >
> >
> >
> >
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] HowTo use UPDATE_TO_VERSION for custom osg::Object separate from osgVersion()

2013-03-19 Thread Wang Rui
Hi Christian,

I'm currently closed to the deadline of my client work so I have to focus
on it rather than the contribution. :-) I will try to get out of there and
consider implementing the custom serialiser version functionality.

Wang Rui



2013/3/19 Christian Noon 

> Hi Wang Rui,
>
> Just wanted to ping this ticket to see if you've had a chance to make any
> progress.
>
> Thanks!
> --
>
> Christian
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=53145#53145
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Possible to make pixel-pretty text in OSG?

2013-03-12 Thread Wang Rui
Hi Jesper,

I've already integrated OSG and AGG (Anti-grained geometry library) to make
use of the latter's 2D drawing ability. AGG can draw nice antialiased
shapes and texts with very high quality AFAIK, so maybe you would like to
have a look at it and see if it could benefit your work.

You may download the osgagg example at:
https://github.com/xarray/osgRecipes/tree/master/integrations/osgagg

Wang Rui




2013/3/12 Jesper D. Thomsen 

> Hi guys,
>
> ** **
>
> We’re using OSG in our application to display a modelview and also as the
> basis for our chart views, which in general is working great for us.
> One area where we would want to improve our quality is in the display of
> text in our charts, where we’re using OSGtext for axis labels etc. (see
> attached screenshot).
>
> Is there any way in OSG to make this text look nicer in order to be able
> to use smaller text and still have it readable? Right now, the text quality
> suffers badly from (I’m guessing) the way the text is rendered to bitmaps
> and then rescaled when being displayed. I have included a tooltip
> containing pixel-based text in the screenshot as a comparison
>
> ** **
>
> Would using OSGPango for text help with this, or would I somehow be able
> to use OpenGL text directly instead?
>
> The text in question is always being display billboarded and with a fixed
> pixel height.
>
> ** **
>
> Thanks
>
> ** **
>
> Jesper D. Thomsen
>
> AnyBody Technology
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] HowTo use UPDATE_TO_VERSION for custom osg::Object separate from osgVersion()

2013-02-26 Thread Wang Rui
Hi Christian,

Current serialization code doesn't support version control of custom
serializers. I have once planned to submit this functionality, but it seems
someone stole my memory after that... Sorry for the inconvenience. I will
try to make it as soon as possible.

Wang Rui



2013/2/26 Christian Noon 

> Hello,
>
> I've dug through the forums as much as possible and I can't seem to figure
> out if there's a way to actually do this. I've written my own wrapper for a
> custom osg::Node that sits in my own library. I need to have the ability to
> create different versions of my serialization to accommodate future changes
> in the file structure. I've managed to get the UPDATE_TO_VERSION and
> UPDATE_TO_VERSION_SCOPED methods working, but they only allow me to control
> versioning based on the osg soversion. This is a huge problem for me if I
> need to change my serialization more often than the OSG version is actually
> updated. Is it possible to decouple the version number of my wrappers from
> the osg version?
>
> Thanks for all your help, really appreciate it!
> --
>
> Christian
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=52869#52869
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Cheaper way to implement rendering-to-texture and post-processing pipeline?

2013-02-15 Thread Wang Rui
Hi,

In my present implementation in the osgRecipes project, I create a list of
pre-render cameras internally as post processing passes, instead
of explicitly in the scene graph. So on the user level they may simply
write:

EffectCompositor* effect = new EffectCompositor;
effect->loadFromEffectFile( "ssao.xml" );
effect->addChild( subgraph );

And during the cull traversal, cameras (and screen quads) are added
directly to the cull visitor:

cv->push*();
camera->accept(*cv);
...
cv->pop*();

This simplifies the class interface but doesn't change the render
stage/render bins we current use. But at least, the post processing passes
are not traversable by a scene node visitor, thus not part of the scene
graph and will not affect intersection test and other updating work, as
Paul and Aurelien point out..

But we may not be able to directly migrate these to a draw callback,
because CullVisitor doesn't really render anything, but will create the
render-graph for SceneView. A possible idea in my mind is to execute the
FrameBufferObject::apply() method along with Quad::drawImplementation()
manually in the draw callback, which means to have another complete
deferred draw process, besides the main renderstage/renderbin back-end. I
don't know if it could be a good choice because the implementation may
finally look like an OpenGL-style one, not an OSG composition.

Thanks,

Wang Rui




2013/2/15 Aurelien Albert 

> Hi,
>
>
> > the concept of post-processing is inherently non-spatial, so it really
> doesn't belong in a scene graph at all
>
>
> => this is why I think we should be able to execute a render pass on an
> arbitrary camera : the subgraph of this camera may not have a spatial
> organization, but a process-logic organization
>
>
> > Wouldn't it be better to have a list of dedicated RTT objects as
> described by Rui, and process them as a Camera post-draw callback
>
>
> => this also my idea : have a dedicated "executeCamera" method which take
> a camera and a state as arguments : with that we can call it from a final /
> post draw call back.
>
> Rather than a list of dedicated RTT objects which will never cover all the
> diferent use cases, I think this is better to re-use the camera class with
> it's subgraph, which already works well : by building different small
> sub-graph we can implement different processing (with a render quad as
> input, or with a point cloud, or with anything else).
>
>
>
> Aurelien
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=52688#52688
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Cheaper way to implement rendering-to-texture and post-processing pipeline?

2013-02-14 Thread Wang Rui
Hi all,

Thanks for the replies. It is always midnight for me when most community
members are active so I have to reply to you all later in my morning. :-)

Paul, I haven't done any comparisons yet. Post processing steps won't be
too many in a common application, and as Robert says, the cull time cost of
a camera and a normal node won't be too different, so I think the results
may be difficult to measure.

Aurelien's past idea (using RenderBins directly) also interests me but it
will change the back-end dramatically. I'm also focusing on implementing a
complete deferred pipeline including HDR, SSAO, color grading and AA work,
and finally merge it with normal scenes like the HUD GUI.
The automatic switch between DS and normal pipeline is done by changing
whole 'technique' instead of moving child nodes, which may be found in the
osgRecipes project I'm maintaining.

But I don't think it easy to implement an executeCameraAsync() method at
present. As OSG is a lazy rendering system and one can hardly insert some
CPU side computation into FBO cameras. Maybe it could be done by using pre-
and post-draw callbacks of a specified camera.

I also agree with Daniel's second opinion that the pipeline should be
compatible with multi-views. As a node in the scene graph we can easily do
this by sharing the same root node in different views. For the first
opinion, because we also have nodes that should not be affected by the
post-processing effects (like the GUI, HUD display), and developers may
require multiple post effects in the same scene graph (e.g., draw dynamic
and static objects differently), I don't think it convincing to totally
separate the post processing framework and place it in draw callbacks or
viewer's graphics operations.

So, in conclusion, I will agree with Robert that OSG itself don't need an
additional RTT node at present and will use cameras to perform every
passes, which is already proved in my client work to be compatible with
most current OSG functionalities including the VDSM shadows, and some
external libraries like SilverLining and osgEarth.

I will try to tidy and submit my current code in the next week as well as a
demo scene. And then I will modify the osgRecipes project to use the new
idea flashed in my mind to find the pros and cons of it.

Thanks,

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


[osg-users] Cheaper way to implement rendering-to-texture and post-processing pipeline?

2013-02-14 Thread Wang Rui
Hi Robert, hi all,

I want to raise this topic when reviewing my effect
composting/view-dependent shadow code. As far as I know, most of us use
osg::Camera for rendering to texture and thus the post-processing/deferred
shading work. We attach the camera's sub scene to a texture with attach()
and set render target to FBO and so on. It works fine so far in my client
work.

But these days I found another way to render scene to FBO based
texture/image:

First I create a node (include input textures, shaders, and the sub scene
or a screen sized quad) and apply FBO and Viewport as its state attributes:

osg::ref_ptr tex = new osg::Texture2D;
tex->setTextureSize( 1024, 1024 );

osg::ref_ptr fbo = new osg::FrameBufferObject;
fbo->setAttachment( osg::Camera::COLOR_BUFFER,
osg::FrameBufferAttachment(tex) );

node->getOrCreateStateSet()->setAttributeAndModes( fbo.get() );
node->getOrCreateStateSet()->setAttributeAndModes( new osg::Viewport(0,
0, 1024, 1024) );

Then if we need more deferred passes, we can add more nodes with screen
sized quads and set texOutput as texture attributes. The intermediate
passes require fixed view and projection matrix. So we can add it a cull
callback like:

cv->pushModelViewMatrix( new RefMatrix(Matrix()),
Transform::ABSOLUTE_RF );
cv->pushProjectionMatrix( new RefMatrix(Matrix::ortho2D(0.0, 1.0, 0.0,
1.0)) );

each_child->accept( nv );

cv->popProjectionMatrix();
cv->popModelViewMatrix();

This works well in my initial tests and it won't require a list of
osg::Camera classes. I think this would be a light-weighted way for the
post-processing work as it won't create multiple RenderStages at the
back-end and will reduce the possibility of having too many nests of
cameras in a scene graph.

Do you think it useful to have such a class? User input a sub-scene or any
texture; the class uses multiple passes to process it and output to a
result texture. The class won't have potential cameras for the RTT work,
and can be placed anywhere in the scene graph as a deferred pipeline
implementer, or a pure GPU-based image filter.

I'd like to rewrite my effect compositor implementation with the new idea
if it is considered necessary, or I will forget it and soon be getting
ready to submit both the deferred shading pipeline and the new VDSM code in
the following week. :-)

Cheers,

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


Re: [osg-users] [osgCompute] END_BRACKET

2013-02-12 Thread Wang Rui
Hi Sajjadul,

The ‘BEGIN_BRACKET' and 'END_BRACKET' macros are changed from static ones
to class members in rev. 13058 to fix threading read/write problems . They
are not modified yet in OSG 3.0.1 (older than rev.13058) so you will see
the compiling problems above. Please try to use some later developer
releases (like 3.1.4, or directly use the trunk) instead to make osgCompute
compiled.

Wang Rui



2013/2/13 Sajjadul Islam 

> Hi,
>
> I downloaded the latest osgCompute from the repository and i have the
> openscenegraph 3.0.1 installed in the system.
>
> And i am getting the similar compilation error while building the
> osgCompute:
>
>
> Code:
>
> [ 35%] Building CXX object
> src/osgCudaSerializer/CMakeFiles/osgdb_serializers_osgCuda.dir/Program.cpp.o
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/src/osgCudaSerializer/Program.cpp:
> In function ‘bool writeResources(osgDB::OutputStream&, const
> osgCuda::Program&)’:
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/src/osgCudaSerializer/Program.cpp:66:21:
> error: ‘class osgDB::OutputStream’ has no member named ‘BEGIN_BRACKET’
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/src/osgCudaSerializer/Program.cpp:87:11:
> error: ‘class osgDB::OutputStream’ has no member named ‘END_BRACKET’
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/src/osgCudaSerializer/Program.cpp:
> In function ‘bool readResources(osgDB::InputStream&, osgCuda::Program&)’:
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/src/osgCudaSerializer/Program.cpp:95:21:
> error: ‘class osgDB::InputStream’ has no member named ‘BEGIN_BRACKET’
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/src/osgCudaSerializer/Program.cpp:116:11:
> error: ‘class osgDB::InputStream’ has no member named ‘END_BRACKET’
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/src/osgCudaSerializer/Program.cpp:
> In function ‘bool writeComputations(osgDB::OutputStream&, const
> osgCuda::Program&)’:
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/src/osgCudaSerializer/Program.cpp:141:22:
> error: ‘class osgDB::OutputStream’ has no member named ‘BEGIN_BRACKET’
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/src/osgCudaSerializer/Program.cpp:152:11:
> error: ‘class osgDB::OutputStream’ has no member named ‘END_BRACKET’
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/src/osgCudaSerializer/Program.cpp:
> In function ‘bool readComputations(osgDB::InputStream&, osgCuda::Program&)’:
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/src/osgCudaSerializer/Program.cpp:160:22:
> error: ‘class osgDB::InputStream’ has no member named ‘BEGIN_BRACKET’
> /home/sajjad/Downloads/OpenSceneGraph/osgCompute/osgCompute/src/osgCudaSerializer/Program.cpp:184:11:
> error: ‘class osgDB::InputStream’ has no member named ‘END_BRACKET’
> make[2]: ***
> [src/osgCudaSerializer/CMakeFiles/osgdb_serializers_osgCuda.dir/Program.cpp.o]
> Error 1
> make[1]: ***
> [src/osgCudaSerializer/CMakeFiles/osgdb_serializers_osgCuda.dir/all] Error 2
> make: *** [all] Error 2
>
>
>
>
>
>
> Any idea folks?
>
> Cheers,
> Sajjadul
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=52627#52627
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
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-02-11 Thread Wang Rui
Hi Vitezslav,

That's good to hear that Qt5 integration can work now. Could you please
send your patches (complete source files are recommended) to the
osg-submissions so Robert can review and merge them?

Cheers,

Wang Rui



2013/1/28 Vitezslav Zajic 

> Hi Wang,
> I've patched OSG to get multithreaded rendering working. I've used
> QGLContext::moveToThread, as you suggested, before the thread starts and
> the same function when the thread ends.
>
> I'm sharing the patch. Maybe it will save a little of your time. Please
> note that I'm not sure this is the best way to do it, take it just as a
> hint what has to be done.
>
> Cheers,
> Vitezslav
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=52239#52239
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/osg_qt5_multithreading_564.txt
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Using to clean up include/osg/Math

2013-02-06 Thread Wang Rui
Hi Robert,

The  header changes can build with Visual Studio 2012 under Windows
7. I'd like to help test on the OpenSolaris platform later if I could
download and make it work on my virtual machine. :-)

Wang Rui



2013/2/6 Robert Osfield 

> Hi All,
>
> On 6 February 2013 11:02, Robert Osfield  wrote:
> > With this issue I'm inclined to make the change and then push the
> > problem out in the community to test, if no one complains that it'll
> > be plain sailing all the way to the next stable release, for this
> > topic at least.
>
> I have gone ahead and cleaned up include/osg/Math so that it uses
>  and  on all platforms, there is only one platform
> specific hack left and that for MS's dumb arse "we're not doing the
> Standard C++ properly, we'll do it in a own way so naa naa naa", the
> hack being _isnan in place of the proper std::isnan.
>
> I have checked this clean up in to svn/trunk so would appreciate
> testing out in the community for as wide range of platforms as you
> can.
>
> Fingers crossed it'll just work for all the platforms we need and life
> can be good :-)
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Sharing some screenshots of my present work :-)

2013-01-28 Thread Wang Rui
Hi Daniel,

Yes, I've implemented own HDR/Bloom for use along with SilverLining
sky/cloud. You may found my contribution to the SilverLining libray in its
latest osgRecipes example. :-)

I once managed to submit my effect compositor and new shadow map code to
the OSG core to build a deferred shading system for it. But I must delay my
plan at present because of some client work. I may consider resubmit them
in a few weeks.

Wang Rui





2013/1/28 Daniel Schmid 

> Hi Wang
>
> I'm using your VDSM implementation in my project, and also Silverlining
> for atmosphere simulation. Did you implement your own tone-mapping (HDR) or
> do you use Silverlining in the standard way?
>
> In case you use your own tone-mapping, I would be interested in some
> sample code, because I didn't manage to achieve something that was usable...
>
> Thank you!
>
> Cheers,
> Daniel
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=52236#52236
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] AlphaPixel Whitepaper on VirtualPlanetBuilder/OSGDEM

2013-01-23 Thread Wang Rui
Hi Chris,

That's great to have more papers about the implementations of more OSG
components! Thank you for the efforts on them. :-)

Is it possible to translate these papers into Chinese and put them on some
Chinese forums, of course, with original copyrights?

Thanks,

Wang Rui



2013/1/22 Chris Hanson 

> As promised last week:
>
> http://alphapixel.com/content/openscengraph-virtual-planet-builder-osgdem
>
>
> Feedback welcomed.
>
>
> --
> Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
> http://www.alphapixel.com/
> Training • Consulting • Contracting
> 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4
> • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
> Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry •
> Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile •
> iPhone/iPad/iOS • Android
> @alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
> 623-PIXL [7495]
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Which GPGPU postprocessing method is best for me?

2013-01-07 Thread Wang Rui
Hi Ethan,

You may found the osgeffectcompositor in osgRecipes project as Jeremy says.
I'm currently working on a better version of ViewDependentShadowMap and
will try to provide a complete pipeline using forward shadows and deferred
shading work. It is always appreciated if you and others could provide some
more ideas and suggestions. :-)

Wang Rui



2013/1/8 Ethan Fahy 

> Thank you Jeremy I'll have a look at that implementation (I was actually
> just reading through Rui Wang's cookbook when you posted this).  In the
> meantime I'll also try compiling osgPPU and osgCompute and go through some
> examples to assess which of these can accomplish what I am looking to do.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=51827#51827
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Create a custom RenderStage

2013-01-02 Thread Wang Rui
Hi Aurelien,

Oh, that's an interesting idea that not intrude the scene graph but with a
special renderbin mode. I have never tried but know there is a
Camera::setRenderingCache() method that would provide RenderStage instance
corresponding with each camera node. It is used in osgUtil/CullVisitor,
which has an internal RenderingCache class. Maybe you could do something
here to replace the RenderingCache to your own one.

W.r.t the creation of RenderBin instances, it is done in
CullVisitor::pushStateSet() and can hardly be re-implemented unless you
rewrite some source code of OSG itself, I think.

Hope it helps,

Wang Rui


2013/1/2 Aurelien Albert 

> Hi Wang,
>
> Thanks for your quick answer !
>
> I'm already doing pre and post-processing of various king : tone-mapping,
> DOF, motion blur... using multiple cameras, slave or childs.
>
> Now I'm trying to create custom renderstages, without multiple cameras,
> but using a RenderBin prototype. This could be very usefull in some
> situations, for example :
>
> - having a graph with a parent group and 3 childs : "A", "B" and "C"
> - render node "A" and node "C" using a custom pre-renderstage
> - render node "B" as usual
>
> To do so with multiple cameras, the graph need to be manipulated to create
> a new camera and move "A" and "C" under this camera.
>
> Using a custom RenderStage registered as a RenderBin prototype, there is
> no need to edit the scene graph, but just edit the "RenderBin" of A and C
> statesets.
>
> In this situation, culling and events traversal are also done as described
> in the "main graph" :
>
> - parent
> ---> A
> ---> B
> ---> C
>
> But whith multiple cameras it leads to something like :
>
> - parent
> ---> child camera
> --> A
> --> C
> ---> B
>
>
>
> Cheers,
> Aurelien
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=51748#51748
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Create a custom RenderStage

2013-01-02 Thread Wang Rui
Hi Aurelien,

The OpenSceneGraph Cookbook provides a simple Depth-of-Field example that
implements post-processing work with multiple camera ndoes (not slaves).
You may have a look at it at https://github.com/xarray/osgRecipes . FYI, It
also includes an osgeffectcompositor example that provides an initial
deferred shading solution for OSG developers.

Wang Rui


2013/1/2 Aurelien Albert 

> Hi,
>
> I use differents custom RenderStages : as pre-renderstage for
> pre-processing and as post-renderstage for post processing.
>
> These processing are executed using FBO render targets.
>
> Currently I'm doing that with slaves cameras, but :
>  - the "RenderStage" class is derived from the "RenderBin" class
>  - it is possible to register new RenderBins using the
>  "addRenderBinPrototype" method
>
> So I wonder if it is possible to create a new RenderStage prototype to
> replace my slave cameras ?
>
> How to configure the rendertarget of these renderstages ?
>
> My goal here is to learn how to create / customize RenderStages and
> RenderBins.
>
> Thank you!
>
> Cheers,
> Aurelien
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=51746#51746
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgmovie receive stream

2012-12-16 Thread Wang Rui
Hi David,

I believe we can make use of the ffmpeg plugin to receive video streams. In
fact webcams can already be retrieved and shown in OSG. Personally I
haven't tested how to load rtsp/udp video streams using osgdb_ffmpeg
directly. But in the osgRecipes project I have successfully used the VLC
SDK to do the same work. I hope it will also help.

Wang Rui



2012/12/16 DavidHornung 

> Any Suggestions?
>
> is it possible to receive a network video stream ?
>
>> Hello,
>>
>> is it possible to play a received stream with the ffmpeg osg plugin?
>>
>> Since it is possible to read from /dev/video0 it should, or?
>>
>> Cheers,
>> David
>>
>
> __**_
> osg-users mailing list
> osg-users@lists.**openscenegraph.org 
> http://lists.openscenegraph.**org/listinfo.cgi/osg-users-**
> openscenegraph.org<http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VirtualPlanetBuilder and the Cookbook

2012-12-06 Thread Wang Rui
Hi Tony,

Just use the .tif files. :-)

Wang Rui



2012/12/7 Tony Vasile 

> Hi,
>
> Haven't heard anything from this post for a couple of weeks does anyone
> have an idea of what I have to do?
>
> Thank you!
>
> Cheers,
> Tony
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=51449#51449
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Retrobooster playable demo

2012-11-29 Thread Wang Rui
Unbelievable! That's really a nice work. :-)

Wang Rui



2012/11/30 Terry Welsh 

> A little more blatant self-promotion here. I just released the first
> playable demo of my OSG-based game. Check it out if you want to see some
> crazy OSG action. http://www.reallyslick.com/retrobooster/downloads.html
> --
> Terry Welsh
> www.reallyslick.com
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
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

2012-11-29 Thread Wang Rui
Hi Kristofer,

Yes, I've noticed your submission but haven't had time to try it. I'd like
to have a look at your code this weekend after my client work. :-)

Thanks,

Wang Rui



2012/11/29 Kristofer Tingdahl 

> Hi,
>
> I did, FYI, submit a patch to adapt the cmake-system to compile with qt5
> to osg-submissions a couple of days ago, but I have not heard anything. If
> you did not subscribe to that list, you can get my changes at
>
> https://docs.google.com/open?id=0B_4ZHt6ZZHE9Q2RBLUxac1hZQ2M
>
> I was, as you describe as well, not able to get multi-threaded rendering
> working.
>
> Sincerely,
>
>
> Kristofer Tingdahl
>
> --
> Kristofer Tingdahl, Ph. D.
> CEO
> dGB Earth Sciences
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
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

2012-11-28 Thread Wang Rui
Hi Martin,

Oh, good news! I'm working on Qt5, too. You may see something in the
osgRecipes project. In just provided a simple example integrating OSG and
Qt5 and draw Qt widgets in the scene graph. It is tested under Windows, but
can't work in multithreaded mode.

Unfortunately this seems not an OSG related problem, but an issue in
QGLContext that can't work under different threads even doneCurrent() is
executed in time. In the following link I found that Qt expects have
already noticed it:
https://codereview.qt-project.org/#change,40644

I'd like to then use moveToThread() to move QGLContext to the rendering
thread so that it could work (at present it will fail and say it can't make
a context current on another thread). Maybe these information will help
you, too.

Cheers,

Wang Rui



2012/11/29 Martin Scheffler 

> Hi all,
>
> here is a rough first version of Qt5 running together with OSG.
>
>
> It works fine on linux with Qt5 beta 2. On windows I get compile errors, a
> conflict between the OpenGL defines in OSG and those in Qt. Maybe it may
> become necessary to separate qt and osg even more so that their headers
> don't collide.
>
> OSG is now rendered to an opengl context created by Qt. The context object
> renders to a QWindow. Unfortunately there is not yet an easy way to add a
> QWindow as a child to QWidget (this will come in Qt 5.1 I have heard). But
> it is possible to add a QWindow to a QWidget by using the window handle.
>
> What's next:
> * Render in a different thread - I just didn't come around to try it, I
> don't expect that many problems
> * Try to render Qt Quick over the OSG scene. Qt could then be used to make
> HUDs. Maybe it is even possible to still keep OSG and Qt in different
> threads?
>
> Thank you!
>
> Cheers,
> Martin[/img]
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=51281#51281
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Ideas about a resource system, and deferred rendering framework

2012-11-16 Thread Wang Rui
Hi Michael,

Current implementation is maintained in osgRecipes (
https://github.com/xarray/osgRecipes), and some snapshots are shared in the
mail-list a few days ago using both VDSM and the compositor.

Wang Rui




2012/11/17 michael kapelko 

> What's the progress on this? And is there any open repository?
>
>
> 2012/9/17 Jeremy Moles 
>
>> On Tue, 2012-09-11 at 10:54 +0800, Wang Rui wrote:
>> > Hi Jeremy,
>> >
>> > Thanks for the tests and feedback. I'm focusing on creating a material
>> > system which may be a little similar to the Ogre one but will be very
>> > easy to integrate with OSG scenes. I'd like to also have a benchmark
>> > including a complete deferred shading pipeline in the near future to
>> > show others how OSG produces realistic worlds. :-)
>> >
>> > Your requirement could be easiliy implemented with one forward pass
>> > rendering the scene to a texture, and two deferred passes doing the
>> > blur work with the texture as input. A final compositing pass will
>> > make use of the outputs of the blur passes and output to a new
>> > texture. You can get and use the new texture then in the scene for
>> > your own purpose instead of direct displaying them on screen. I'd like
>> > to upload a DOF effect file and an updated example some days later to
>> > demonstrate how these work.
>>
>> Hi Wang,
>>
>> Did you ever get a chance to work up an example showing something like
>> this? I've been trying to get it to work using a modified blur-x/blur-y
>> approach from osgPPU, but have had no success.
>>
>> > Thanks,
>> >
>> > Wang Rui
>> >
>> > 2012/9/11 Jeremy Moles :
>> > > On Mon, 2012-09-10 at 22:57 +0800, Wang Rui wrote:
>> > > This looks really cool so far. I'd be really interested to know if it
>> > > supports the following (and would be willing to create examples if
>> > > you're willing to help)...
>> > >
>> > > Scenario: I want to render an entire subgraph to an FBO texture once,
>> > > then apply 2 or more completely different shaders in some order, then
>> > > put the final result into a last texture to be used somewhere in the
>> > > scene. I'm doing a guassian blur, which typically applies two
>> different
>> > > shaders for x and y.
>> > >
>> > > I have this working in osgPPU, but I think you already have enough to
>> do
>> > > it here, I just couldn't put the pieces together. :)
>> > >
>> > ___
>> > osg-users mailing list
>> > osg-users@lists.openscenegraph.org
>> >
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Sharing some screenshots of my present work :-)

2012-11-14 Thread Wang Rui
Hi all,

I'd love to share some snapshots of my present work, which lasts for half a
months and depends heavily on a modified version of osgShadow and the OSG
effect compositor in developing. The scene is from part of a CBD area in
Beijing, and it will be shown on a wall with four projectors at last. I use
VDSM with additional PSSM support and customized shaders to provide
real-time illumination and shadowing. And the compositor which is currently
maintained in osgRecipes is used to add glow effect and final color
grading. SilverLining SDK is used for sky and cloud rendering.

The scene includes only a few refined building models, but with OSG's
dynamic paging ability we can easily support very large city with nearly
the same rendering quality. I will be glad to submit both the shadow and
compositor functionality to OSG core at the end of this year, or at the
beginning of next year (as Robert is busy at present :-) and hope it could
be improved again and again and also help other develop their applications.

Current city models may not be suitable for open source use so I may have
to find and commit a copyleft set of models along with the coming
submissions. It would be appreciated if somebody could provide me some at
that time.

Cheers,

Wang Rui


[image: 内嵌图片 6]
[image: 内嵌图片 1]
[image: 内嵌图片 2]
[image: 内嵌图片 3]
[image: 内嵌图片 4]
[image: 内嵌图片 5]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] problem with linear depth in fragment shader

2012-11-08 Thread Wang Rui
Hi Peterakos,

Try changing the internal format of the output buffer to float32. I guess
it is a precision problem. During the SSAO implementation of effect
compositor (in osgRecipes now) I also encountered the problem and using 32
bit float values seems good to me.

Wang Rui


2012/11/9 Peterakos 

> Hello.
>
> I try to create linear values for depth using the following code:
>
>
> Vertex Shader
>float depth_in_eye_space = (gl_ModelViewMatrix * gl_Vertex).z;
>depth = (-depth_in_eye_space - near)/(far - near); //depth is varying
>
> Fragment Shader
>gl_FragColor = vec4(depth, depth, depth, 1);
>
>
> The problem is that in the depth texture, many different levels of
> depth are creating. (attached 1)
> That causes problems in my next pass which uses the depth texture to
> create an ssao image. (attached 2)
>
> How can i get the right depth values in depth texture ?
>
> Thnx.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
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-08 Thread Wang Rui
Hi Kristofer,

I can't remember the exact time I wrote the GraphicsWindowQt class, maybe
two or three years ago. I designed it along with the OpenThreads for Qt to
make OSG's threading and windowing APIs compatible with Qt so that to later
migrate to Symbian/Meego... But then iPhone and Android change the world
and the plan is deprecated. :-) But Qt integration is still a very
interesting and valuable topic nowadays and thanks to the contribution of
the whole community, the GraphicsWindowQt class is now usable for some
practical uses. I myself also use Qt in some client projects and think of
integrating OSG with QML as well as some Qt 5.0 new features (e.g., the
Qt3D module) some time later.

I agree that the relationship of GraphicsWindowQt and GLWidget is
confusing. Other windowing interface like GraphicsWindowWin32 can either
create its new window or accept an existing one for the rendering context
use. An ideal result in my opinion is that we can directly set a QGLWidget
as an OSG window using Traits::inheritedWindowData, but the event handling
must be overrode, for example, using installEventFilter() to make sure OSG
can communicate with Qt window. In this way maybe we will not have to use
any adapters but only send a QGLWidget pointer to the traits like:

osg::ref_ptr windata = new
osgQt::GraphicsWindowQt::WindowData(qtWidget);
traits->inheritedWindowData = windata;
osg::GraphicsContext* gc =
osg::GraphicsContext::createGraphicsContext(traits.get());

And thus remove present GLWidget class and provides a clear solution to Qt
developers. What do you think about that?

Wang Rui

2012/11/8 Kristofer Tingdahl 

>
>
> The example code works, my application (OpendTect) works. I do however
> have a couple of questions:
>
>1. I never grasped the complexity of QGraphicsViewerQt::init,
>especially where we get the context from the traits, and gets the window,
>and then the osgQt::GLWidget from it (around line 550). It requires
>the QGraphicsViewerQt to have an getGLWidget just because of this, so
>I have reluctantly kept that function.
>2. There were some context-handling that I did not fully grasp: In
>GraphicsWindowQt::makeCurrentImplementation() we did not check if the
>current context was identical to our context, while in GraphicsWindowQt
>::runOperations() and swapBufferImplementation we did. I have kept
>this functionality with a bool on osgQt::WidgetAdapter::
>makeCurrentImplementation, while I have feeling that this distinction
>is bogus, and the boolean argument can be dropped.
>3. Who should own the Adapter? If it is a widget (as it is now with
>osgQt::GLWidget), then it normally owned outside, while if it not a
>widget (which is what I want), then it would ideally inherit osg
>::Referenced.
>
> There are also a few more systematic changes I want to do on osgQt (which
> are not done yet).
>
>1. On the CMakeList.txt level, I would want to have an option whether
>to use optimized Qt or not. We have both in our environment, and today it
>uses debug-qt with debug-osg and release-qt with release-osg. Most
>often we are not debugging qt, and it I'm thinking of an option: Use
>optimized qt. Default would still be what it is today.
>2. I want to have support for global namespacing in Qt. Qt has support
>for always putting all Qt classes in a namespace, and we are planning
>on using that to avoid clashes between developers making plugins to
>our system and who want to use another Qt than we do. It would mean we make
>a set of macros that add the namespace in front of all Qt classes.
>
>
> Comments and suggestions are welcome!
>
>
> - Kristofer Tingdahl
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Open Asset Import Library

2012-10-25 Thread Wang Rui
Hi Michael,

AssImp use a simpler scene graph to manage read data, in which one
node could have a transformation matrix and multiple meshes, and
multiple child nodes. Materials (including textures) are managed
globally in a  map so objects could share one texture.
But one mesh can only be linked to one material. I personally think
Assimp will divide any object into meshes to support multiple
materials if required, but I don't know Blender output would be
handled in similar way in such case.

Wang Rui


2012/10/25 michael kapelko :
> Wang Rui, I research what format best to use for moving objects from
> Blender to OSG, and I see Assimp claiming to load Blender files
> directly. Since you said you wrote the plug-in already for it, I'd
> like to try it out.
> I have a follow up question: can I possibly differentiate Blender
> model from Blender material to have several skins for the same
> material in OSG? Does your plug-in do anything of the sort?
> Thanks.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG-3.0.0 Windows Prebuilt Installer

2012-10-15 Thread Wang Rui
Hi,

AlphaPixel has already provided complete OSG binary downloads for
developers under Windows, Linux and Mac OSX:
http://www.alphapixel.com/osg/downloads/free-openscenegraph-binary-downloads

So I decide not to maintain another version of prebuilt binaries that
may make beginners confused. The download link can also be found in
the OSG 3.0 Cookbook.

Thanks,

Wang Rui


2012/10/13 Avit Hohol :
>
> ProfKebe wrote:
>> Hi all,
>>
>> I'm actually reading the OSG 3.0 guide from Wang Rui, and I wanted to know 
>> if it was possible to get the v3.0.0 / v3.0.1 with the Windows installer 
>> (actually I can get only the v2.9.9 max.) ?
>>
>> Thank you!
>>
>> Cheers,
>> JereM
>
>
>
> I do wait for the installer as well, i have also found the installer with 
> v2.9.9.
> Do we know anything about a possible release data ?
>
> Thank you
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=50588#50588
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CompositeViewer multiple windows, same scene problem

2012-10-08 Thread Wang Rui
Hi Alvaro,

I just did a quick test under Windows 7, with OSG 3.0.1 and Qt 4.8.2.
Two views (created from GraphicsWindowQt) of a CompositeViewer in two
windows can render the same node (lz.osg for my case) smoothly. Could
you please provide more information about your implementation?

If you are going to render textures of view 1 directly in view 2,
maybe you have to enable OpenGL's shared context feature. You may
specify camera 1's graphics context to Traits::sharedContext in such
case.

Wang Rui


2012/10/4 Alvaro Segura :
> Hi,
>
> We are having trouble using a CompositeViewer with 2 views in 2 windows, 
> showing the same scene (same Node*).
>
> The first view (in addView order) is rendered correctly, but the second view 
> is badly rendered with some missing or garbled geometries.
>
> If only one view is added, its rendering is fine. If instead of 2 windows, we 
> use only one window with two contiguous viewports, rendering is fine.
>
> Each view has its own Camera and GraphicsContext. We use GraphicsWindowQt 
> with or without the shareWidget argument. Using setUpViewInWindow() instead 
> does the same.
>
> Seems that the first render is misusing the GL context or something so that 
> the other has trouble. Threading is set to SingleThreaded to avoid potential 
> sharing problems (but the TaskManager is showing many running threads (?)).
>
> The problematic models are FBX exported from 3ds Max, BTW.
>
> Is there any setting that has to be set in OSG/CompositeViewer to tell it 
> that the scene is shared? Does anyone have an idea what can be wrong in such 
> a setup?
>
> Thank you!
>
> Alvaro
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=50406#50406
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Render passes and stereo handling

2012-10-08 Thread Wang Rui
Hi Gaurav,

A possible solution I think (but never tested it) is to set a draw
callback to left/right render stage (stages can be obtained from
camera->getRenderer()->getSceneView()->getRenderStageLeft(), and then
use RenderBin::setDrawCallback... Oops). And you may know if left or
right render stage is drawing in the callback and change your shader
inputs in time. But this is really ugly and unsafe in multithreading
mode...

Maybe it is good for OSG to add a flag in RenderInfo to indicate if
current drawing process is for left or right eye. And I just do wonder
if there are some better ideas not to change your stereo inputs on the
fly (maybe you can only change the contents and dirty them).

Wang Rui


2012/10/2 Gaurav Chaurasia :
> Hi,
> Is there a way to know which eye (left/right) is currently being drawn inside 
> osg::Camera::DrawCallback. There is the UserData field in RenderInfo, but I 
> don't think I can use it for my purpose without having to patch 
> osgUtil::SceneView.cpp - the patch being that I update UserData before 
> drawing each eye.
>
> Actually, I am doing render passes with render targets for a stereo 
> application. So I need to switch shader inputs like textures,uniforms for 
> each eye just before the draw call. I figured I can use the PreDrawCallback 
> for the purpose because it is called inside RenderStage::draw just before the 
> actual rendering happens. If someone has a cleaner solution, I would be most 
> grateful.
>
> Thank you!
>
> Cheers,
> Gaurav
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=50378#50378
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] select point from pointcloud

2012-10-08 Thread Wang Rui
Hi Markus,

Default LinesegmentIntersector is unable to handle intersections with
lines and points. But PolytopeIntersector which will require a
rectangle on screen (or a polytope in space) may do the work for you.

The OpenSceneGraph 3.0 Cookbook (Packt Publishing) introduces how to
use custom intersector to select points in the last chapter.
Unfortunately the whole chapter was removed at last because of page
count limitation. But you can still find the source code from the
Github repo and test it freely:
https://github.com/xarray/osgRecipes/tree/master/cookbook/chapter10/ch10_07

Another way to do point selection effectively is to make use of the
glReadPixels() function with depth component. You can then obtain the
depth value(s) at your mouse point and compute real point coordinate
when it is valid.

Wang Rui


2012/10/1 Markus Ikeda :
> Hi,
>
> I'm new to OSG and I tried the osgkeyboardmouse example
>
> root/OpenSceneGraph/trunk/examples/osgkeyboardmouse/osgkeyboardmouse.cpp
>
> but I still couldn't manage to use the polytope intersector to select a 
> subset of points via mouseclick in a pointcloud.
>
> Did anybody have the same problem and solve it ?
>
> Thank you!
>
> Cheers,
> Markus
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=50360#50360
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Help:why does renderbin affect the display of textures ?

2012-10-08 Thread Wang Rui
Hi Shuiying,

I guess that there may be something wrong in the draw implementation
of drawable B. Although OpenGL calls can be executable in custom
drawables, it is still suggested that you apply all kinds of rendering
states to the drawable using StateAttribute derivatives. But without
looking at some detailed code, I can hardly find out the actual reason
inside.

Wang Rui


2012/10/8 wang shuiying :
> Is nobody interested in this question?:-(
>
> Hello,
>
> I have two drawable nodes A and B under the same main group node. I
> mapped two different textures on the drawables respectively. Those two
> drawables do not have any overlappings in terms of pixels on the screen.
> Drawable A is described using open scene graph library while drawable B
> is described using openGL terms. Depth test is disabled by Drawable A
> and enabled by drawable B. Texture display on A uses a shader while B
> does not.
>
> When the renderbin of drawable A is set to be -1 and that of drawable B
> is 1, the two textures cannot show at the same time. That is to say,
> when I toggle on both drawable A and drawable B and make them both seen
> on the screen, the texture on drawable B doesn't show, but the color of
> B is correct. Under such circumstance, when I manipulate the view in a
> way such that drawable A is out of sight, then the texture on drawable B
> will appear.
>
> If I reverse the renderbins of those two drawables, then the textures
> can show at the same time.
>
> I just cannot figure out why this happens.
>
>  If it is due to depth test, why should such conflicts happen, since
> they have no overlapped pixels on the screen? Even it is due to depth
> test, why is the color  correct?
>
> Would someone please be so kind enough as to explain that to me?
>
> Thanks millions in advance!
>
> Best regards
> Shuiying
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Backward compatibility with custom serializers

2012-10-05 Thread Wang Rui
Hi Farshid,

2012/10/5 Farshid Lashkari :
> Thanks Wang, Robert.
>
> How would I go about using the UPDATE_TO_VERSION macro in this scenario? My
> understanding is that the macro is used when the version of OSG is updated.
> However, the version of OSG is the same between the two versions of my
> application, it's just that the serialization support for my custom object
> was added in the newer version.
>

Oh, this seems to be already discussed in another thread. I was
thinking of implementing a user version macro at that time but then I
was a little too busy to worked on it. I will consider adding a new
UPDATE_TO_USER_VERSION macro to allow version control of custom
serializers as soon as possible, maybe tomorrow. :-)

> Could this be a bug with current loader? I've attached a zip file that
> contains an ive, osgt, and osgb version of the same model. The ive loads and
> displays fine in 3.0.1, but as I mentioned, the osgt/osgb files do not
> display anything.
>

Yes, this is a bug just found in osgWrappers/serializers/osg/Node.cpp,
which uses UPDATE_TO_VERSION incorrectly so it also affects the
following StateSet serializer. I think the brackets after the macro
really confuses us and will do something soon to make it more
readable.

Thanks,

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


Re: [osg-users] Backward compatibility with custom serializers

2012-10-04 Thread Wang Rui
Hi Farshid,

Unfortunately the InputStream doesn't have a good mechanism to handle
unsupported class in binary files without the version control macro
UPDATE_TO_VERSION (for IVE files, version control is supported
internally in the plugin source code). Text files can ignore unknown
class blocks because the advanceToCurrentEndBracket() method makes it
possible to jump to next block. But for binary files, there are no
straightforward flags to mark the beginning or end of a wrapper class'
data. So I think adding UPDATE_TO_VERSION macro in your serializers
would be the only way to keep compatibility at present.

Wang Rui


2012/10/4 Farshid Lashkari :
> Hi,
>
> I recently added serialization support for a custom osg::Object derived
> class in my application. I saved the object to a osgt and osgb file and
> attempted to load it into an older version of my application, which didn't
> have serialization support for my custom object yet.
>
> Loading the osgt file gives me the following warning message:
>
> InputStream::readObject(): Unsupported wrapper class MyLibrary::MyObject
>
> This is expected. However, when I attempt to load the osgb file I get the
> following output then my application crashes:
>
> InputStream::readObject(): Unsupported wrapper class MyLibrary::MyObject
> InputStream::readObject(): Unsupported wrapper class
>
> Before I spend time looking into this, I was wondering if it is expected for
> the binary loader to crash on unsupported objects? I'm working with osg
> 2.9.12, if that makes a difference.
>
> Cheers,
> Farshid
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
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-09-15 Thread Wang Rui
Hi Ricky and Michael,

Yes, Hikari is Windows only as it uses COM to render Flash components
onto bitmaps and then apply them to textures, which is of course of
low efficiency. And it won't be able to support newer version of Flash
because Adobe already closes the door to Flash COM programming. :-(

Thanks,

Wang Rui


2012/9/15 michael kapelko :
> Hikari is Windows only:
> http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Comparison+of+GUIs&structure=Libraries
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
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-09-11 Thread Wang Rui
Oh, you mean GameSWF. Yes it is in my TODO list. But in fact GameSWF
doesn't handle AS3 so it may not be enough for Flash UI needs. I was
interested in Vektrix before, which provides a better framework for
Flash and AS3 (using Tamarin), but it seems inactivated now.

Thanks for the notification,

Wang Rui


2012/9/12 michael kapelko :
> I've just recalled that there also exist gameswf project which allows
> for Flash UI inside games.
> http://tulrich.com/textweb.pl?path=geekstuff/gameswf.txt
>
> Would be nice to see this one integrated. Would make a lot of hype
> with some easy flash demos :P
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] AntTweakBar with Opengl 3.2

2012-09-11 Thread Wang Rui
Hi Peterakos,

Sorry for a little late to reply the same question on GitHub.

The AntTweakBar example currently use a camera draw callback to render
UI elements. This may not be suitable for some practical uses, as draw
callbacks won't keep its own state sets. Thus when you apply shaders
to scene graph, the state will affect the AntTweakBar calls and make
the final results invalid.

A good idea to solve this is to reimplement this example using a
custom drawable which render AntTweakBar in the drawImplementation()
method. I will consider rewrite this example soon. And you are
welcomed to contribute. :-)

Thanks,

Wang Rui

2012/9/12 Peterakos :
> Hello.
>
> Has anyone managed to make AntTweakBar work with OpengGL 3.2 and the usage
> of shaders in the models ?
>
> Thnx.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Ideas about a resource system, and deferred rendering framework

2012-09-11 Thread Wang Rui
Hi Jeremy,

I will add a setEnable() method for each technique and pass of the
compositor so we can control the forward/deferred rendering work more
accurately. A texture which is attached with certain pass won't be
updated if the pass is disabled, and will become activated when the
pass is enabled again. I may upload the new version this weekend and
hope it will help achieve your goal.

Wang Rui

2012/9/11 Jeremy Moles :
> On Tue, 2012-09-11 at 10:54 +0800, Wang Rui wrote:
> Are there ever cases, when doing sophisticated layering of rendering
> like this, that you'd want to manually "kick off" the EffectCompositor
> for just a single frame and update the texture only once? (For example,
> by setting the NodeMask to 0xF for one frame, then back to 0x0 when
> you're done updating the View).
>
> Is there a term for this kind of approach, and would it make sense to
> also support this model of rendering directly or should it be left up to
> the user?
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Ideas about a resource system, and deferred rendering framework

2012-09-10 Thread Wang Rui
Hi Jeremy,

Thanks for the tests and feedback. I'm focusing on creating a material
system which may be a little similar to the Ogre one but will be very
easy to integrate with OSG scenes. I'd like to also have a benchmark
including a complete deferred shading pipeline in the near future to
show others how OSG produces realistic worlds. :-)

Your requirement could be easiliy implemented with one forward pass
rendering the scene to a texture, and two deferred passes doing the
blur work with the texture as input. A final compositing pass will
make use of the outputs of the blur passes and output to a new
texture. You can get and use the new texture then in the scene for
your own purpose instead of direct displaying them on screen. I'd like
to upload a DOF effect file and an updated example some days later to
demonstrate how these work.

Thanks,

Wang Rui

2012/9/11 Jeremy Moles :
> On Mon, 2012-09-10 at 22:57 +0800, Wang Rui wrote:
> This looks really cool so far. I'd be really interested to know if it
> supports the following (and would be willing to create examples if
> you're willing to help)...
>
> Scenario: I want to render an entire subgraph to an FBO texture once,
> then apply 2 or more completely different shaders in some order, then
> put the final result into a last texture to be used somewhere in the
> scene. I'm doing a guassian blur, which typically applies two different
> shaders for x and y.
>
> I have this working in osgPPU, but I think you already have enough to do
> it here, I just couldn't put the pieces together. :)
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] a bug or feature in the osgb writer?

2012-08-28 Thread Wang Rui
Hi John,

Oh, so you are talking about the saving/reading of geometry shaders,
not just geometries. :-)

After checking the osg::Program serializer, I can confirm this is a
bug. As GL_POINTS is defined as 0, the serializer will ignore it as
incorrectly recognize it as GL_NONE. And when you load the file again,
the Program class will use a default value for GeometryInputType, that
is, GL_TRIANGLES.

I'll submit the patch to osg-submissions at once. You can also modify
the line at src/osgWrappers/serializers/osg/Program.cpp:

#define PROGRAM_PARAMETER_FUNC( PROP, NAME ) \
static bool check##PROP(const osg::Program& attr) \
{ return attr.getParameter(NAME)!=GL_NONE; } \

to

#define PROGRAM_PARAMETER_FUNC( PROP, NAME ) \
static bool check##PROP(const osg::Program& attr) \
{ return true; } \

and see if it can work.

Thanks,

Wang Rui


2012/8/28 John Kelso :
> Hi,
>
> I apologize for the delay in responding.
>
> Here's my attempt to provide a simple example. I am attaching the three
> referenced files.
>
> I run my program and dump the node in question into two files: dump.osgt and
> dump.osg.
>
> If I grep for "Geometry" in the two files I see:
>
> dump.osgt:553:  GeometryVerticesOut GL_GEOMETRY_VERTICES_OUT_EXT
> 4 dump.osgt:554:  GeometryOutputType GL_GEOMETRY_OUTPUT_TYPE_EXT
> 5 dump.osgt:696:osg::Geometry {
> dump.osg:49:GeometryVerticesOut 4
> dump.osg:50:GeometryInputType POINTS
> dump.osg:51:GeometryOutputType TRIANGLE_STRIP
> dump.osg:661:  Geometry {
>
> That is, the osgt file seems to be missing the line
>   GeometryInputType GL_GEOMETRY_INPUT_TYPE_EXT 0
>
> If I convert dumop.osgt file to an osg file and diff it with the original
> osg
> file I see:
>>
>> diff dumpFromOsgt.osg dump.osg
>
> 46c50
> < GeometryInputType TRIANGLES
> ---
>>
>> GeometryInputType POINTS
>
>
> I think the problem is just in the writer, not the reader, because if I
> manually add the missing line to the osgt file it works. And, it if convert
> the modified osgt file to an osg file the input type is now points, not
> triangles.
>
> I seem to get the same results for osgb as I do for osgt.
>
> I'm not sure how to answer the question about setVertexArray versus
> setVertexAttribArray. But points.osg is the point data that's loaded.
>
> I hope this helps. Please let me know if you need anything else that might
> help with solving the problem.
>
> Thanks,
>
> John
>
>
___
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-25 Thread Wang Rui
Thanks Frank. I'm downloading the new SDKs now, and will have a look at
them as soon as possible.

Wang Rui


2012/8/24 Frank Kane 

> Happy to see our stuff on the list! When you get to it, please be sure to
> grab the new 1.5 release of the Triton Ocean SDK and 2.5 of the
> SilverLining Sky, Cloud, and Weather SDK that came out this week. I
> overhauled the OSG integration samples on both to take advantage of
> separate update / cull / draw threads and to get rid of their reliance on
> an icky projection matrix callback. It's a lot cleaner now.
>
> Thanks,
> Frank Kane
> Founder, Sundog Software,LLC
> http://www.sundog-soft.com
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=49512#49512
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
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-25 Thread Wang Rui
Thanks Michael,

As the libRocket integration is already implemented in the dtEntity project
(code.google.com/p/dtentity), I'd love to make use of the existing one and
avoid re-inviting wheels unless I myself just have different demands of the
same library. So that's why I exclude libRocket from my TODO list, neither
do Cairo, Pango, OpenAL, etc. Maybe you could have a look at dtEntity's
implementation first and see if it could satisfy you and others. :-)

Thank you,

Wang Rui


2012/8/24 michael kapelko 

> Good work!
> I'm not sure if I voted for libRocket, so here it is.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG Serialization - changes on custom Classes

2012-08-25 Thread Wang Rui
Hi Peter,

I've just submitted a patch which adds user version to the serializers.
Could you please have a look at it in the osg-submissions archive and test
if it could work for your cases?

Thank you,

Wang Rui


2012/8/21 Peter Bako 

> Hi mr. Rui Wang.
>
> Thank you for your help.
> It would be nice if we can set an auxiliary version number manually, when
> writing or reading files.
> This mechanism would be perfect!
> Can I assume that this modification will be implemented in the next month?
> Or what do you suggest to me to do? It is not time critical in the next
> month, but then it will be :-).
>
>
> This is a little off-topic, but why is the osg web page inaccessible?
> Trac detected an internal error:
> OperationalError: database is locked
>
>
>
> Thank you!
>
> Cheers,
> Peter
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=49384#49384
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2012-08-23 Thread Wang Rui
Hi all,

I wish someone here still remember the osgRecipes project I've created and
announced here some months ago. It included 9 different examples at that
time, introducing how to integrate OSG with other 3rdparty libraries and
APIs like Awesomium, Micorsoft Kinect, TUIO, AssImp, etc. Now I'm glad to
tell you that there are another 9 examples out, with 9 completely new
integration examples. They are:

* Box2D: a nice 2D physics engine for games
* Bullet: A professional multiphysics library, this example is very simple
and completely different from the osgBullet project.
* libGizmo: gizmo control library for 3D object manipulation, much
lightweight than osgManipulator and really easy to use!
* MicroPather: a path finder and A* solver, already included in the source
code. Consider add AI to your OSG based games now?
* MyGUI: a fast, flexible and simple GUI, as good as CEGUI, I think.
* ngPlant: a plant modeling software, good for creating trees!
* OpenNI: natural interaction devices middleware, another way to use Kinect!
* OTL: ODBC template library, for DATABASE I/O with only a plugin! Only
tested with Sqllite3 at present
* RVO2: Reciprocal collision avoidance for multi-agent simulation. Thanks
Christian Buchner for the original osgrvo2 example on osg-submissions

All the examples are tested on Windows 7. Hope someone could help me test
them on other platforms.

You may download the project source code in public domain at:
https://github.com/xarray/osgRecipes

which is also the code repo of the book OpenSceneGraph 3.0 Cookbook.

And see how these examples perform at:
https://github.com/xarray/osgRecipes/wiki

The TODO list of the third wave (still 9 eamples, I think) of osgRecipes is
also listed here for someone who have interests:
Berkelium, Microsoft DirectWrite, GUIChan, MathGL, OIS, Recastnavigation,
ROBOOP, Sundog Silverlining & Triton

Call for more integration ideas now. :-) And glad to see some of the
examples merged into the core OSG trunk, for example, the OTL database
plugin (no dependency), and the AssImp and FreeImage plugins.

Any attentions, feedbacks, and contributions are always appreciated.

Cheers,

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


Re: [osg-users] OSG Serialization - changes on custom Classes

2012-08-23 Thread Wang Rui
Hi Peter and Robert,

I'm glad to consider a backward-compatible way to add custom versioning
mechanism to current plugin. I would submit it as soon as possible so Peter
and everyone else could test it and see if it suitable for pratical uses.

Wang Rui


2012/8/23 Robert Osfield 

> Hi Peter and Rui,
>
> On 21 August 2012 12:59, Peter Bako  wrote:
> > It would be nice if we can set an auxiliary version number manually,
> when writing or reading files.
> > This mechanism would be perfect!
> > Can I assume that this modification will be implemented in the next
> month?
> > Or what do you suggest to me to do? It is not time critical in the next
> month, but then it will be :-).
>
> As I have plenty of other work on my plate I'll defer to Rui to come
> up with a suggested solution, or yourself if you fancy rolling up your
> sleeves up.  I do wonder if a user definable format key/string might
> be appropriate - I guess the schema and present version number take us
> a bit down this route, but perhaps one needs a list of schema or
> versions so that multiple layers can be added on for 3rd party libs
> can add their own feature set and rev it independently from the OSG
> versioning.
>
>
> > This is a little off-topic, but why is the osg web page inaccessible?
> > Trac detected an internal error:
> > OperationalError: database is locked
>
> The openscenegraph.org server has been rather beset by problems so we
> are working on a replacement.  Try the new openscenegraph.com when the
> .org version is down.
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] OSGT does not read nodemask

2012-08-23 Thread Wang Rui
Glad to see the problem has been found and solved before I got to this
mail. :-)

Wang Rui

2012/8/24 Johannes Scholz 

> Hi,
>
> jup. If i have the time possibly tomorrow.
>
> Thank you!
>
> Cheers,
> Johannes
>
> 
> ---
> Johannes Scholz
> Software Engineer
> P3 Voith Aerospace GmbH
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=49476#49476
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG Serialization - changes on custom Classes

2012-08-21 Thread Wang Rui
Hi Peter,

Oh there is another feature of the osgb plugin that I almost forget. :-) It
supports serializer control using the version number. You may read about it
at this page:
http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/2010-November/007273.html


Unfortunately the version number mentioned above will automatically be set
to OPENSCENEGRAPH_SOVERSION, so unless the OSG soversion changed, all your
modifications to your own serializers will not be separated. I guess we may
have to modify the plugin source code slightly to add an option to allow
setting the version number (or just an auxiliary version number) manually
when writing/reading files to achieve your goal.

Regards,

Wang Rui


2012/8/21 Peter Bako 

> Hi mr. Wang Rui.
>
> Thank you for your response. I am actually an owner of your OSG book :-).
> I tried your suggestion, it works, but the limitation is that we can have
> only 2 versions of osgb files (old format - with the schema) and the new
> (actual format).
> Does this mean that there is no way to make more versions readable for my
> application? For example, could we generate schema for every version and
> try to load the file with the schema from the oldest version, if not
> succeed, then with the newer version, then with newer and so on until the
> load is successful (loaded component is not NULL).
> I don't see under the hood of binary serialization, I couldn't find the
> correct file.
>
> I need this functionality because I know, that my application will grow
> after release and maybe we will need to change the serialization after the
> release to the customers.
> Do you have any other idea to make this possible?
>
> Thank you once more!
>
> Cheers,
> Peter
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=49376#49376
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Is it possible to do boolean operations with objects (primitives)?

2012-08-20 Thread Wang Rui
Hi,

OpenCSG is good enough to perform stencil-based CSG operations at realtime.
But it is difficult to integrate it with OSG because OpenCSG maintains a
rendrable list itself. The only way I think is to get the renderbin list
deeply in the OSG core and transfer it to OpenCSG, but it is absolutely a
terrible idea. That's why I exclude this library from the osgRecipes plan.
:-)

Wang Rui


2012/8/21 Chris Hanson 

> http://www.opencsg.org/
>
> --
> Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
> http://www.alphapixel.com/
> Training • Consulting • Contracting
> 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4
> • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
> Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
> LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG Serialization - changes on custom Classes

2012-08-20 Thread Wang Rui
Hi Peter,

Yes, there is a schema mechanism in the osg plugin which could record a
serializer name list (a schema) at the beginning of every .osgb file and
the reader will automatically check and read the schema to decide each
serializer order and existence.

For your situation, the best way I think is to generate a schema file first
using the option:
writeNodeFile(*node, "file.osgb", new
osgDB::Options("SchemaFile=old_version_format.txt"));

This could be done only once when you save a .osgb file. Note that the
schema file should be created with the old version of plugin.

And then you may read all old .osgb files with the new version of plugin,
using the same option:
readNodeFile("file.osgb", new
osgDB::Options("SchemaFile=old_version_format.txt"));

And the schema will be used to load old version files correctly.

Wang Rui


2012/8/20 Peter Bako 

> Hello guys,
>
> I am using OSG serialization on my custom classes derived from
> osg::MatrixTransform and osg::Geometry.
> I already use this serialization for some time, so I have many .osgb files
> exported on my disk, but now, I want to add some new properties to my Class
> and serialize them (new ADD_BOOL_SERIALIZER). The problem is, that I cannot
> load the old .osgb files anymore. It works only on .osgt files.
> Is there any way, how to extend my serialization, while the old files will
> be still loadable?
>
> Thank you!
>
> Cheers,
> Peter
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=49338#49338
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem with loading 3d-models with asian characters in file name.

2012-08-20 Thread Wang Rui
Hi Carsten,

The OSG_USE_UFT8_FILENAME option actually doesn't work with Asian directory
names, unless your source files are also UTF8. Sometimes I use the
setlocale() function at the beginning of an application to choose current
machine's locale, like the following:

std::locale::global( std::locale("", std::locale::all ^
std::locale::numeric) );

Or directly select the Simplified Chinese locale:

setlocale( LC_ALL, ".936" );

Hope it helps. BTW, I found the latest OSG works well with Chinese
directories and filenames. Maybe you could give it a try again.

Wang Rui


2012/8/20 Carsten Scharfe 

>  Hi,
>
> I hope somebody can help me out with this nasty problem.
>
> I try to load model file (e.g. a collada file) which has some asian
> characters in its file name.
> Although I’ve compiled Osg with OSG_USE_UFT8_FILENAME set to true, no
> model is loaded.
> osgDB::readNodeFile just returns an empty node as result, saying that the
> file was not found.
>
> A filename like E:\3dlibnew\$龙\龙.dae is received as E:\3dlibnew\$?\?.dae
> even in our
> own application.
>
> Do I need to do additional conversions?
> Please help me. Any advice is welcome.
>
> I’m using Osg 3.0 on Win7.
>
> Regards,
> Carsten
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] a bug or feature in the osgb writer?

2012-08-12 Thread Wang Rui
Hi John,

2012/8/11 John Kelso 
>
> and the ive run has the line
>   Using vertex attribute instead
> repeated eight times. I doubt this has anything to do with it, as the ive
>   file is the one that works, but you never know...
>
>
I've looked up in the source code and find that the line will be printed in
Geometry::accept(PrimitiveFunctor& functor). So I wonder if you don't set
vertex array with the setVertexArray() method but instead set it with
setVertexAttribArray()? I haven't tested such situation with the osgb
format but I don't think it will confuse the writing process... It will
be appreciated if you could provide a small piece of your osg/ive file for
us to find out where the problem is.

Thanks,

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


Re: [osg-users] Problem with deferred rendering

2012-07-05 Thread Wang Rui
Hi Daniel,

Why not first have a look at the osgRecipes project which is also the code
repo of the book OpenSceneGraph Cookbook. It does has a very simple
deferred shading example in chapter 6. The book may require you to buy it
but the code is totally free at:
https://github.com/xarray/osgRecipes/tree/master/cookbook/chapter6/ch06_12

Wang Rui


2012/7/5 Daniel Schmid 

> Hi Sebastian
>
> You were talking about a deferred shading example. Do you have any example
> code you could provide? I'm just about to start with deferred shading and
> I'm very interested in having a look...
>
> Regards
> Daniel
>
>
> Sebastian Messerschmidt wrote:
> > Hi Micael,
> >
> > Feel free to ask If you encounter more problems.
> > I was just planning to provide a minimal deferred shading example to the
> > community, but unfortunately I'm busy with other stuff right now.
> >
> >
>
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=48709#48709
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 139.com Spam

2012-06-26 Thread Wang Rui
Hi,

More searches show that the phone number also appears on the following
Chinese bolg:
http://mayun198.bokee.com/

No need to translate it into English, it is totally about 'how to make
money out of thin air'. :-)

I just wonder if the blog name 'mayun198' or something similar could be the
real username in the osg-users. Maybe it has an internal link with the
139.com mail and thus send useless mails to us all the time.

Wang Rui


2012/6/26 Wang Rui 

> Hi Jan,
>
> Yes,  13488874230 <13488874...@139.com> is a phone number,
> and unfortunately it is completely a telemarketing number. I'm sure it is
> NOT from someone related to OSG and I think it was probably registered at
> the forum. Could anybody help check it?
>
> By the way, I wrote a letter to 139.com last week but receives no replies
> from them. You know, it is the China Mobile and it will never notice us
> small potatoes :-(
>
> Wang Rui
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 139.com Spam

2012-06-26 Thread Wang Rui
Hi Jan,

Yes,  13488874230 <13488874...@139.com> is a phone number,
and unfortunately it is completely a telemarketing number. I'm sure it is
NOT from someone related to OSG and I think it was probably registered at
the forum. Could anybody help check it?

By the way, I wrote a letter to 139.com last week but receives no replies
from them. You know, it is the China Mobile and it will never notice us
small potatoes :-(

Wang Rui

2012/6/26 Jan Ciger 

> Hi Robert,
>
> On Tue, Jun 26, 2012 at 3:41 PM, Robert Osfield 
> wrote:
>
>> Hi Jan,
>>
>>
>> The posts aren't coming through the list, I think they are being sent
>> directly.  The are anyone subscribed from a 139.com domain so my
>> initial expectation that someone subscribed from that domain is
>> causing problems, so I can only guess is that perhaps someone has
>> redirected posts to a 139.com account.  Perhaps it's something that is
>> going via the forum in some way.  I really don't know the cause
>> though.  There is nothing I can do about the issue are it isn't a
>> mailman issue so it's something that users will just have to flag
>> locally as spam.
>>
>
>
> Thanks for a quick reply and check. I guess someone is forwarding some
> notifications to their cellphone and their braindead system sends the
> bounces to the original author of the mail and not to the list (which would
> be equally stupid, but lots of software does that - vacation responders ...)
>
> I got the most recent one from: 13488874...@139.com in reply to the file
> format thread.
> I suspect that the number is the phone number of the person, perhaps some
> of our Chinese members could check and call the gent explaining him the
> situation?
>
> Best regards,
>
> Jan
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Ideas about a resource system, and deferred rendering framework

2012-06-22 Thread Wang Rui
Hi Fred and Sergey,

Thanks for the great information. I viewed the Rembrandt wiki page and love
the design of the effect files. I will consider merge some of the concepts
of Rembrandt if possible, along with current osgPPU and osgPostEffects
projects, to try designing an extensible system for all. I would like to
submit some of my initial code here for all of you to review and see if it
could fit everyone's taste. I hope I could have done that in the following
week.

Thanks,

Wang Rui


2012/6/22 Frederic Bouvier 

> I was going to raise that point. Flightgear has for some years now a
> system where designers can express their statesets in XML files called
> effects. A statesets is called a "Pass" in FG (or a FG Pass is implemented
> with a stateset). You can add multiple passes in a Technique, allowing you
> to redraw the same geometry with multiple statesets (including render bins
> details). An effect file gathers multiple techniques that have a predicate,
> based on supported extensions and internal FG switches, which is evaluated
> at run time. The multiple techniques allow us to render the water or the
> urban areas differently based on user preferences and GPU capabilities.
>
> Beside that effect system, we introduced a deferred renderer called
> 'Rembrandt' (currently still experimental but it will be present in the
> next release in August) where the different stages of the renderer are also
> described in XML. In that XML we can add rendering buffers (textures for
> RTT), specify rendering orders and assign effects to stages. The default
> pipeline has boom and ambient occlusion that can be switched on and off at
> run time.
>
> If you have any question, you can consult the wiki page or ask
>
> Regards,
> -Fred
>
>
> - Mail original -
> De: Sergey Kurdakov
>
>
> Hi Wang,
>
>
> might be not quite a significant point,
> but osg based Flightgear has a ongoing Project Rembrandt
>
> http://wiki.flightgear.org/Project_Rembrandt
>
> it has some similar things done,
> so could serve for inspiration.
>
> Regards
> Sergey
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Ideas about a resource system, and deferred rendering framework

2012-06-21 Thread Wang Rui
Thanks Bryan,

Yes, I paid close attention to osgPPU since it appeared. I believe it would
be very helpful for me to design the framework, although the script system
we are going to use may differ. :-)

Wang Rui


2012/6/21 Thrall, Bryan 

> Wang Rui wrote on 2012-06-21:
> > 2. A rendering framework uses one or more techniques, passes, and
> connect
> > their inputs/outputs for complex render work. It can also be recorded
> by the
> > resource system and is implemented as a group node in the scene graph,
> > which performs actual forward/deferred rendering work.
>
> It seems like osgPPU already does this; you might want to look at it to
> see if it meets your needs, or at least could inspire what you're doing.
>
> Hope this helps!
> --
> Bryan Thrall
> Principal Software Engineer
> FlightSafety International
> bryan.thr...@flightsafety.com
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
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-21 Thread Wang Rui
Hi Christian,

Thank you. So I would add osgrvo2 to this new project as soon as possible,
with your copyrights preserved.

Wang Rui


2012/6/21 Christian Buchner 

> Permission granted to use my osgrvo2 integration example (massive
> agent simulation)
>
> Christian
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Ideas about a resource system, and deferred rendering framework

2012-06-21 Thread Wang Rui
Hi Robert, hi all,

During the past few days, I was thinking of implementing a resource system,
as well as a rendering structure which could support both forward and
deferred rendering for OSG. This could help developers design complex
materials and effects, test cutting-edge GPU techniques, and implement
multi-pass / deferred rendering pipelines with user-friendly interfaces or
even a readable script format. Similar work were already done in some game
engines like Ogre3D, CryEngine and Unreal, and I now plan to work out
something with the same power and can fit our OSG users much better. :-)

My initial thoughts are:
1. A resource system records all the resource used in the rendering
pipeline, including textures, state attributes, shaders, uniforms, camera
parameters, and semantics (not used in GLSL, but very useful IMHO).
Resource can be referred by other resource, or obtained from APIs to be
altered. It can be recorded in an XML-based format for reading/writing,
and external uses.
2. A rendering framework uses one or more techniques, passes, and connect
their inputs/outputs for complex render work. It can also be recorded by
the resource system and is implemented as a group node in the scene graph,
which performs actual forward/deferred rendering work.
3. Some in-built techniques and passes can help implement some complex
effects on customized scene quickly. Common ones I planned include HDR,
SSDO, godrays, depth of field, motion blur, lensflare, color grading and
FXAA. A benchmark could be developed first to show how the framework works.
4. Reader/writers could be developed then to convert DAE, CGFX, or even
other game engine scripts into OSG native rendering pipelines, which will
greatly help migrations from other engines.

The resource system itself is actually abstract and can be extended to
contain whole scene information later, so it could be placed in the osgDB
library. And the new rendering pipeline, which can totally replace current
osgFX functionlities, can be placed in osgFX and rendering resource
management will be done here, too.

I'm glad to work with others who has interests in such an idea, and hope an
initial version could be finished before OSG 3.2. For the first stage I
will borrow some code from the osgPostEffects library in my experimental
osgXI project, to quickly build the low-level APIs of the framework. But
anyone who have better ideas, or could contribute some code or effects will
be really appreciated.

Cheers,

Wang Rui
___
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-18 Thread Wang Rui
Hi Michael,

I also recall that their is someone working on OSG and libRocket so I don't
put it in my TODO list. :-) I'm going to first consider some other GUI
libraries like MyGUI, and... HTML5 and Flash?

The project page is : https://code.google.com/p/dtentity/. Maybe you could
just check if his implementation is good enough.

Wang Rui


2012/6/19 michael kapelko 

> Great news!
> Although, I would really like to see OSG + libRocket integration since
> GUI is lacking in OSG :)
> I recall there was a guy who wrote dtEntity thing which has OSG +
> libRocket integration, but I'm unsure how well it supports it.
> I'll be doing OSG + libRocket research myself in the coming months, so
> it's only good to omit such task by having it already supported.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2012-06-18 Thread Wang Rui
Hi all,

I'm glad to announce a new project I'm working on in the scope of
osgRecipes (also the repo of the book OpenSceneGraph 3 Cookbook):
https://github.com/xarray/osgRecipes/tree/master/integrations

Its main and only goal is to integrate as more as possible third-party
libraries/SDKs with OSG to make use of both features. It is in public
domain, so feel free to make use of everything here. :-)

All example code here will show how to integrate OSG with different kinds
of libraries and SDKs in a simple enough and extendible way, that means,
there will be few lines of code for each recipe to make them
understandable. Such external libraries can quickly add extra
functionalities like special effects, visual components and interaction
methods to your OSG scenes and greatly improve the performance of the
applications.

Current third-party libraries that are embedded within OSG are listed here:
* AntTweakBar (a light and intuitive GUI framework):
http://www.antisphere.com/Wiki/tools:anttweakbar
* AssImp (a library to import various well-known 3D model formats):
http://assimp.sourceforge.net/
* Awesomium (a web-browser framework for in-app browsing and HTML UIs):
http://awesomium.com/
* FreeImage (a library supporting popular image formats):
http://freeimage.sourceforge.net/
* Microsoft Kinect SDK:
http://www.microsoft.com/en-us/kinectforwindows/develop/developer-downloads.aspx
* NVIDIA PhysX (a well-rounded physics engine, version 3.2):
http://developer.nvidia.com/physx-downloads
* Spark (a crossplatform particle engine): http://spark.developpez.com/
* TUIO (a common API for tangible multitouch surfaces): already included in
the source code
* VLC (a cross-platform multimedia player and framework):
http://www.videolan.org/vlc/

And these are on my TODO list. Anybody is welcomed to add more here, or
just contribute your own works:
Animata, Microsoft DirectWrite, GUIChan, libGimzo, MyGUI, openNURBS, Sundog
Triton, Woody3D...

All the libraries must be free for downloading and for non-commercial
purpose of use to be added into the project. Also as far as I know, there
are also some good integrations like OSG+libRocket, and OSG+libRVO2, I
would like to merge them, too, or just have a link in my project, if
allowed.

I'm also very glad to see some of the examples merged into the core OSG
trunk, if Robert think it possible. :-)

Any attentions, feedbacks, and contributions are always appreciated. And it
is often existing to see more and more cool stuffs works in OSG.

Cheers,

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


Re: [osg-users] 139.com Spam

2012-06-08 Thread Wang Rui
Hi Robert,

I've already wrote a mail to t...@139.com but I don't think they will reply
quickly enough, as 139.com in fact belongs to a huge state-owned company
(China Mobile) who always ignores others' feelings ;-(

Is it possible that this address is registered to the forum and the mail is
forwarded from there?

Wang Rui


2012/6/8 Robert Osfield 

> Hi Rui,
>
> On 8 June 2012 05:03, Wang Rui  wrote:
> > I also received the email and fortunately I can speak Chinese. The mail
> is
> > sent from the 139.com administer and it said that a registered user
> with the
> > address 13488874...@139.com here is not active, but we still sent mail
> to
> > him (I think this is because the mail list server automatically send
> every
> > mail to him), so the 139.com server automatically replied with the
> notice.
> >
> > A best way to solve it is to remove the inactive user from our mail list.
> > Robert if you couldn't find him, I'll try to contact with their manager
> to
> > explain the situation.
>
> There isn't anyone subscribed to osg-users and osg-submissions with a
> 139.com domain, let alone this specific address.
>
> Could it be another address that is subscribed is forwarding to the
> 13488874...@139.com address?
>
> Thanks for looking into it,
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 139.com Spam

2012-06-07 Thread Wang Rui
Hi all,

I also received the email and fortunately I can speak Chinese. The mail is
sent from the 139.com administer and it said that a registered user with
the address 13488874...@139.com here is not active, but we still sent mail
to him (I think this is because the mail list server automatically send
every mail to him), so the 139.com server automatically replied with the
notice.

A best way to solve it is to remove the inactive user from our mail list.
Robert if you couldn't find him, I'll try to contact with their manager to
explain the situation.

Wang Rui


2012/6/8 michael kapelko 

> May be someone who can talk in Chinese can tell 139.com to shutdown
> this spam thing?
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Open Asset Import Library

2012-06-06 Thread Wang Rui
Hi Chris,

Oh, I'm just working on a new integration project of OSG and different
kinds of 3rdparty libraries. Ande I've already wrote plugins of FreeImage
and AssImp, as I think both are great for importing and exporting, too.
https://github.com/xarray/osgRecipes/tree/master/integrations

Unfortunately I haven't had time to test my AssImp plugin yet (the
FreeImage one works well now and I'll try to submit it soon), so if you
think it valuable and possible for use, please don't hesitate to test it
and help me improve it. :-)

Cheers,

Wang Rui


2012/6/7 Chris Hanson 

> http://assimp.sourceforge.net/main_features.html
>
>
>   Anybody used this?
>
>   Might be interesting to begin an optional plugin to load files via this
> library, if you have it. Some of its importers might be more modern or more
> fully fleshed out than some of our native ones.
>
>
> --
> Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
> http://www.alphapixel.com/
> Training • Consulting • Contracting
> 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4
> • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
> Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
> LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Building new website, assistance appreciated!

2012-05-25 Thread Wang Rui
Hi Jordi,

That's great! Now I can see it.

Thanks,

Wang Rui


2012/5/26 Jordi Torres 

> Hi Wang et al,
>
> Now, once you are logged in, you should see a new item in the login menu
> in the front end (if you have at least author permissions) called 'submit
> article'. It Is very important to select the adequate category, this way it
> will be shown 'in place'.
>
> Cheers.
>
> 2012/5/25 Jordi Torres 
>
>> Hi Wang Rui,
>>
>> I answer myself, admin Backend is not active for publishers. But I see
>> you have admin rights, so you should be able to access. Anyway we should
>> add a menu item (for authors and publishers) in order to submit articles
>> from the front end. I will do it as soon as possible.
>>
>> Cheers.
>>
>> 2012/5/25 Jordi Torres 
>>
>>> Hi Wan Rui,
>>>
>>>
>>> 2012/5/25 Wang Rui 
>>>
>>>> Hi Robert and all,
>>>>
>>>> I'm now ready to help build the new website. :-)
>>>>
>>>> As a publisher, I tried editing page in the main/community section and
>>>> can confirm it worked. But when I was going to add a new page, I couldn't
>>>> find a button or a panel for managing the add/remove operations. I have
>>>> little experience of Joomla but it seems that I could add new pages in
>>>> administrator mode, which is not available for publishers. So I'm just
>>>> interested in that how could a publisher get
>>>>
>>> permissions of adding/removing a page without entering the admin page?
>>>> Or did I miss something important when logging in and browsing the pages.
>>>>
>>>>
>>> You are right, in the case of list layout you should not have problems
>>> ,a icon of new document is available (for example :
>>> http://www.openscenegraph.com/index.php/documentation/platform-specifics/linux).
>>> But for blog layout we have to enable it using a menu key or installing a
>>> module to manage articles from the front-end.  I'll do it ASAP.
>>>
>>> Is not active the admin backend for publishers?
>>>
>>> Cheers
>>>
>>>
>>>
>>>> Any help and advice would be appreciated.
>>>>
>>>> Thanks,
>>>>
>>>> Wang Rui
>>>>
>>>>
>>>>
>>>> ___
>>>> osg-users mailing list
>>>> osg-users@lists.openscenegraph.org
>>>>
>>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>>
>>>>
>>>
>>>
>>> --
>>> Jordi Torres Fabra
>>>
>>> gvSIG 3D blog
>>> http://gvsig3d.blogspot.com
>>> Instituto de Automática e Informática Industrial
>>> http://www.ai2.upv.es
>>>
>>
>>
>>
>> --
>> Jordi Torres Fabra
>>
>> gvSIG 3D blog
>> http://gvsig3d.blogspot.com
>> Instituto de Automática e Informática Industrial
>> http://www.ai2.upv.es
>>
>
>
>
> --
> Jordi Torres Fabra
>
> gvSIG 3D blog
> http://gvsig3d.blogspot.com
> Instituto de Automática e Informática Industrial
> http://www.ai2.upv.es
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Render Scene in Maya's Viewport

2012-05-25 Thread Wang Rui
Hi Bo,

In the source code of OpenSceneGraph Cookbook you will find an example
which shows how to integrate an OSG scene view into a GLUT rendering loop.
Hope it can help:
https://github.com/xarray/osgRecipes/blob/master/cookbook/chapter9/ch09_06/osg_in_glut.cpp


By the way, it is really interesting to see OSG in a Maya scene. :-)

Cheers,

Wang Rui

2012/5/24 Bo Zhou 

> Hi,
>
> I'm trying to integrate osg into a MPxLocatorNode in Maya, draw an osg
> scene by MPxLocatorNode::draw method.
>
> According the Maya's document, we just need to call glVertex3f or
> glDrawArrays API and do not need to setup any modelview, projection matrix,
> or viewport to OpenGL, just draw geometry data.
>
> So how could I finish this task ? Could anybody help me ? Thanks !
>
> Thank you!
>
> Cheers,
> Bo
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=47830#47830
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Building new website, assistance appreciated!

2012-05-25 Thread Wang Rui
Hi Robert and all,

I'm now ready to help build the new website. :-)

As a publisher, I tried editing page in the main/community section and can
confirm it worked. But when I was going to add a new page, I couldn't find
a button or a panel for managing the add/remove operations. I have little
experience of Joomla but it seems that I could add new pages in
administrator mode, which is not available for publishers. So I'm just
interested in that how could a publisher get permissions of adding/removing
a page without entering the admin page? Or did I miss something important
when logging in and browsing the pages.

Any help and advice would be appreciated.

Thanks,

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


Re: [osg-users] ViewDependentShadowMap

2012-04-11 Thread Wang Rui
Hi Daniel,

Original VDSM may not work well with huge terrain and city models as I just
tested it some time ago, but I'm too busy these few days. PSSM must be
implemented to allow higher resolution near to the viewer, and
projective/persp aliasing can hardly be removed without more changes to the
model itself. I've just uploaded an initial version of modified VDSM on
osg-submissions but not merged currently. You may have a look at it in the
mail list.

Wang Rui


2012/4/11 Daniel Schmid 

>  Hi all
>
> ** **
>
> Somehow I feel pretty alone out here working with VDSM… ** **
>
> I have a huge paged terrain, and shadow looks awesome unless that as soon
> as I change my viewpoint (move camera), the shadows start to flicker and
> fuzz. I need somehow to limit the shadow distance… similar to
> MinimalShadowMap where you can set min max clip plane. I tried to modify
> computeShadowCameraSettings method by setting the xyzMinMax values fort he
> projectionMatrix to fix values, but this didn’t bring much success.
>
> ** **
>
> Does anybody have a modified or advanced version of VDSM with a clipping
> limit ?
>
> ** **
>
> Regards
>
> Daniel
>
> ** **
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
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-05 Thread Wang Rui
Hi Christian,

Thanks for the support.

2012/4/5 Christian Buchner 
>
> Here is some nitpicking. Spelling errors like "phone shader" (should
> be phong) or "salve" instead of "slave". So it appears spell checking
> was mostly automated, and not thoroughly checked by human
> proofreading.
>

In fact we have a text editor from the Packt team. Unfortunately he is not
a 3D programming expert so maybe he just think 'phone shader' is a kind
of telecommunication method. :-) I hope those spell mistakes won't affect
your reading and you can at any time send those bugs to the Packt feedback
center, I think.


>
> Also what really bugs me is that the interesting GLSL shader code is
> often abbreviated with "// Please find details in the source code".
> For some examples the shaders are at the heart of what is presented
> (e.g. bump mapping technique), so this is a little annoying.
>
>
The most annoying thing is the page limitation. I even have to delete a
total chapter because the book itself is limited to 400 pages at most.
These annoying comments are also to reduce the page count. Sorry for
bringing the troubles.

Thanks,

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


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

2012-03-31 Thread Wang Rui
Hi all,

First of all, this is NOT a joke on April Fool's Day. :-)

I'm glad to announce the publication of the book OpenSceneGraph 3.0
Cookbook, which is yet another OSG book written by me, with the help of Dr.
Qian Xuelei. Thanks to my technique reviewers: Torben Dannhauer, Vincent
Bourdier, and Chris Hanson. Also many thanks to Robert Osfield and the
whole OSG community!

Exactly 100 recipes are introduced in this book (some may not appear in any
of the pages because of the page count limitation, please refer to the
source code repo). You should be familiar with the basic concepts of the
OpenSceneGraph API before reading this book as it includes some advanced
techniques like a initial deferred shading implementation, quick
integration with physics engines, and so on. There are totally 9 chapters
focusing on different fields, including the installation, nodes,
geometries, camera manipulating, animations, effects, terrain building,
data management, GUI integration, and a bonus chapter which is removed from
the book content because of the too high page count but added as a free
sample chapter on the Packt website.

You can buy the book at the Packt Publishing website:
http://www.packtpub.com/openscenegrap-3-for-advanced-3d-programming-using-api-cookbook/book

and/or Amazon.co.uk:
http://www.amazon.co.uk/OpenSceneGraph-3-Cookbook-R-Wang/dp/184951688X

The source code can be downloaded freely at:
https://github.com/xarray/osgRecipes

Cheers,

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


Re: [osg-users] osgShadow PSSM

2012-03-23 Thread Wang Rui
I would submit the code this weekend and everyone can have a look at it and
make changes to make it better (at present I'm still not satisfied with my
own implementation).

Wang Rui

2012/3/23 Daniel Schmid 

>  So you are mixing PSSM and VSM? Sounds interesting. If you have any
> sample code I could have a look at, I would appreciate…
>
> **
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgShadow PSSM

2012-03-23 Thread Wang Rui
Hi Daniel,

Currently I'm working on the ViewDependentShadowMap and has already added
an initial implementation of PSSM and VSM. I'm using it with my digital
city project which must have huge scenes and multi-threaded rendering
features. I'd like to submit the changes some time later. :-)

Wang Rui


2012/3/23 Daniel Schmid 

>  Hi there
>
> ** **
>
> Obviously PSSM is good for huge scenes (my case), but the wrong choice for
> multi threaded rendering. Is there a attempt to make PSSM multithreaded,
> does anybody have modified it, or what would be the way to go ?
>
> ** **
>
> Regards
>
> Daniel
>
> ** **
>
> ** **
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] A crash problem while using SharedStateManager in the DatabasePager

2012-03-22 Thread Wang Rui
Hi Robert and all,

I've encountered a crash problem while managing and rendering huge scene in
OSG. To make it work smoothly, I use both the IncrementalCompileOperation
and SharedStateSetManager to help improve the paging process. Both my
application soon crashes when the camera is moving over the scene quickly
(which means the scene data is also quickly and frequently loaded and
unloaded). I debug into it and surprisingly find that the
databaseRequest->_loadedModel is sometimes empty in
the DatabasePager::addLoadedDataToSceneGraph() and thus causes the issue. I
add a determination before using the SharedStateManager to optimize the
model and the problem seems disappeared:

if (osgDB::Registry::instance()->getSharedStateManager()
&& databaseRequest->_loadedModel.valid())

osgDB::Registry::instance()->getSharedStateManager()->share(databaseRequest->_loadedModel.get());

I suggest make such changes in the trunk, too, so we won't meet the same
crash problem again. But it in fact doesn't find the truth: when and how a
request in the _dataToMergeList list is changed and the loaded model
pointer is made invalid? I'm just curious about the reason why the
_loadedModel is reset unexpectedly. Is there any other possibilities?

Regards,

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


Re: [osg-users] Methods to improve large scene shadows with ViewDependentShadowMap

2012-03-14 Thread Wang Rui
I finally find the reason of my second issue (the shadow disappears some
time, because of the view matrix computation from the light) and already
submit a patch for both problems. Now I'd like to try to work out a more
comfortable shader solution for this great shadow technique and see if it
could make the life better. :-)

Wang Rui


2012/3/14 Wang Rui 

> Hi Robert,
>
> Some comments on my last post. It may not be a projection matrix
> problem... I've found that in the ViewDependentShadowMap.cpp file, 
> implementation
> of class ComputeLightSpaceBounds:
>
> void update(const osg::Vec3& v)
> {
> if (v.z()<0.0f)
> {
> //OSG_NOTICE<<"discarding("< return;
> }
> ...
> }
>
> Should it be "v.z()<-1.0" here as the clipping space coordinates are in
> the range of [-1, 1]? I changed this line and it works for me; otherwise
> the city on earth will be splitted in a strange way as shown in
> the attached snapshot.
>
> But I'm still struggling with another serious problem that the whole
> shadow map may disappear suddenly when I'm looking with a horizontally
> view from the opposite direction of the light vector. I checked the code
> and surprisingly found that the ComputeLightSpaceBounds returns an
> invalid bounding box in such case. That means the entire scene may be
> culled as in the light space frustum? I'm just confused now but will go on
> tomorrow.
>
> Any good ideas about that? :-)
>
> Wang Rui
>
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG within firebreath?

2012-03-13 Thread Wang Rui
Hi Paul,

Also have a look at the source code of the coming book OpenSceneGraph 3.0
Cookbook. It has an initial implementation of integrating OSG and
FireBreath under Windows. :-)
https://github.com/xarray/osgRecipes

The book link:
http://www.packtpub.com/openscenegrap-3-for-advanced-3d-programming-using-api-cookbook/book

Wang Rui


2012/3/14 Paul Griffiths 

> Thanks for the link.
>
> Don't think ill be using firebreath, seems a bit of a overkill considering
> its windows only.
>
> Theres next to nothing on the osg forum about osg and web browsers, which
> is quite surprising if not shocking!  :O
>
> Anyone have any code to share for browsers internet explorer, firefox and
> any others on other systems other than windows?
>
> If not ill get my head down, pretty good at this sort of stuff.
>
> cheers.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=46226#46226
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Methods to improve large scene shadows with ViewDependentShadowMap

2012-03-13 Thread Wang Rui
Hi Robert,

I've made some tests today and gradually know my problems, but feels thorny
to solve them. :-)

The shadowed scene looks good when it is displayed separately. Although
there are still aliasing when tilting the view point to have a horizontally
view, I think one of the cause is the precision from the near to the far
plane, and can bear or resolve it with some blurring methods. But when I
place the city on the earth and try to make shadows on it (the earth tiles
are not included as shadow casters or receivers), there is one major
problem: the shadow may disappear suddenly when I'm adjusting the look-at
vector for horizontally views. This issue always occurs when I'm in the
opposite direction of the light. I tried following the code
in ViewDependentShadowMap and guess it is still related to the near/far
computation, as in my scene graph, the far plane value may be extremely
large because of the earth radius.

I don't have a proper solution for that case but wonder if we could have a
callback/option in ViewDependentShadowMap to enable setting user-defined
projection matrices instead of reading them from the cull visitor, with
which we can set up the light frustum to have a fixed near/far pair instead
of a changing one. As shadows are meaningless when they are far away from
the viewer, I think this is suitable for most cases and can help improve
the shadow quality when handling large scene cases. The theory of PSSM and
CSM algorithm may help, but at present I think they are not implemented in
the ViewDependentShadowMap class (yes, we have the PSSM but it has problems
working with RTT cameras at present :-)

Wang Rui


2012/3/12 Robert Osfield 

> HI Rui,
>
> Thanks for the links to the data, I will download and have a
> experiment later, most likely tomorrow as I have to go out quite soon.
>
> The screenshot is suggests to me that the main artefact is simply that
> the shader used/fixed function pipeline isn't computing the shadowed
> colour correctly and would disappear if appropriate shaders were used
> to make sure the back facing triangles are coloured the same as the
> shadowed region.  When using the standard fixed function pipeline you
> just get black for the shadowed around so the result always has this
> artefact.
>
> Robert.
>
> On 12 March 2012 13:20, Wang Rui  wrote:
> > Hi Robert,
> >
> > I'd like to provide a set of city models for shadow tests. It is already
> > constructed with paged LODs so can be viewed smoothly on my Windows 7 and
> > GTX 460. I've uploaded it at box.com, totally two compressed packages:
> > http://www.box.com/s/s1bnf4eqenrc30opxzj4
> > http://www.box.com/s/ubu4186593fjc8tslntq
> >
> > Of course tarballs are not suitable for public test. It should be
> > comfortable if we could load and render the city from an HTTP address,
> just
> > like the earth_bayarea example dataset. The snapshot attached shows that
> > most of the shadows are at the right place but some with obvious aliasing
> > issues and streaks (as on the right bottom side).
> >
> > Cheers,
> >
> > Wang Rui
> >
> >
> > 2012/3/12 Robert Osfield 
> >>
> >> Hi Rui,
> >>
> >> Artifacts can be caused by a number of different reasons, as I have
> >> seen the models, screenshots of the artefacts I don't feel comfortable
> >> pointing at any particular cause or solution.
> >>
> >> Having a public model we can test against would be very useful.  Also
> >> modifying the osgshadow example to have a unit test for these case
> >> would also be useful.  Given a unit test we as group can start
> >> refining things for the problem cases.
> >>
> >> As a more general note ViewDependentShadowMap doesn't yet provide
> >> shaders that resolve the issue correct lighting of shadows, the thread
> >> you link to discusses this topic.  Introducing the required shaders as
> >> an option into  ViewDependentShadowMap would address one of the areas
> >> that artefacts can be seen when users don't provide their own shaders
> >> that do the lighting correctly.  This won't solve all the potential
> >> artefacts that we see when doing shadow mapping but it would at least
> >> discount one possible set of problems.
> >>
> >> Robert.
> >>
> >> On 12 March 2012 09:38, Wang Rui  wrote:
> >> > Hi all,
> >> >
> >> > I'm currently working on an example that uses
> >> > osgShadow::ViewDependentShadowMap for generating dynamic shadows on a
> >> > large
> >> > area of buildings. It can work correctly on a huge city which is
> cre

Re: [osg-users] Methods to improve large scene shadows with ViewDependentShadowMap

2012-03-12 Thread Wang Rui
Hi Luc,

I'm glad that someone is working on the same topic and we can share
opinions and experience all the time. :-)

2012/3/12 Luc Frauciel 
>
>
> At what angles did you encounter innacceptable alisasing issues ?
>

A snapshot of the shadowed city I'm working with is attached in my last
post, so does the download link of the model files. It shows some distinct
jags and streaks on a few building surfaces.


> For views that are not near tangent to the ground plane, the results I got
> seems ok.
> Is your problem global or limited to certain points of view ?


I think it may happen in any position. But a view from the high altitude is
always better.


>
> Is your target resolution way beyond the resolution of the shadow map
> (1*1) per ex ?
>
>
The target city's radius is about 2800 and it is formed up by about 1000
mansions.

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


[osg-users] Methods to improve large scene shadows with ViewDependentShadowMap

2012-03-12 Thread Wang Rui
Hi all,

I'm currently working on an example that uses
osgShadow::ViewDependentShadowMap for generating dynamic shadows on a large
area of buildings. It can work correctly on a huge city which is created by
CityEngine and then converted to OSG styled scene graph. It also generates
aliasing issues as expected, but I'm still looking for some good solutions
to reduce such problem and want to discuss them in this thread if possible.
My test program and a simple shader file can be found in attachement.

I've already read a similar topic at:
http://lists.openscenegraph.org/htdig.cgi/osg-users-openscenegraph.org/2011-August/053731.html
And I believe it is necessary to apply some filters on the shadow map (the
test shader file simply uses PCF here) and increase the texture resolution
as well. But for huge scene, a 4096-sized RTT texture will be a heavy
burden. So I wonder if there are some more methods to choose, for example,
is it possible to change the internal format of the texture to
GL_DEPTH_COMPONENT32 to improve the shadow comparision process?

Meanwhile, is it necessary to perform a screen space blurring to reduce the
aliasing effect? It is a serious problem for my scene now as I can't use a
very high resolution. Could anyone suggest some other possible methods on
the post-processing level? To be honest, the ViewDependentShadowMap is the
best shadow solution for me at present as it is easy to be integrated with
custom shaders and embedded into a deferred shading framework.

The test city models are about 180MB. If any of you think it important for
digging into the problem. I'd like to share them freely, too, as I believe
these automatically generated models should not have any copyrights with
them. :-)

Cheers,

Wang Rui
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

int main( int argc, char** argv )
{
	unsigned int rcvShadowMask = 0x1;
	unsigned int castShadowMask = 0x2;

	osg::ref_ptr program = new osg::Program;
	program->addShader( osgDB::readShaderFile("shadowRenderer.frag") );

	osg::ref_ptr city = new osg::MatrixTransform;
	city->addChild( osgDB::readNodeFile("city_root.osgb") );
	city->setNodeMask( rcvShadowMask|castShadowMask );
	city->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::OFF );
	city->getOrCreateStateSet()->setAttribute( program.get() );

	osg::ref_ptr light = new osg::LightSource;
	light->getLight()->setPosition( osg::Vec4(1.0, 1.0, 1.0, 0.0) );

	osg::ref_ptr sm = new osgShadow::ViewDependentShadowMap;

	osg::ref_ptr settings = new osgShadow::ShadowSettings;
	settings->setShaderHint( osgShadow::ShadowSettings::NO_SHADERS );
	settings->setTextureSize( osg::Vec2s(2048, 2048) );
	settings->setMinimumShadowMapNearFarRatio( 0.05 );

	osg::ref_ptr shadowRoot = new osgShadow::ShadowedScene;
	shadowRoot->setShadowTechnique( sm.get() );
	shadowRoot->setShadowSettings( settings.get() );
	shadowRoot->setReceivesShadowTraversalMask( rcvShadowMask );
	shadowRoot->setCastsShadowTraversalMask( castShadowMask );
	shadowRoot->addChild( city.get() );
	shadowRoot->addChild( light.get() );

	osg::ref_ptr options = new osgDB::Options("dds_flip");
	options->setObjectCacheHint( osgDB::Options::CACHE_IMAGES );
	osgDB::Registry::instance()->setOptions( options.get() );
	osgDB::Registry::instance()->getOrCreateSharedStateManager();
	
	osgViewer::Viewer viewer;
	viewer.setSceneData( shadowRoot.get() );
	viewer.addEventHandler( new osgViewer::StatsHandler );
	return viewer.run();
}


shadowRenderer.frag
Description: Binary data
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Rendering without calling osgViewer::frame

2012-02-28 Thread Wang Rui
Hi Sean,

In the coming OpenSceneGraph 3.0 Cookbook (will be published in March), I
provide such an example that renders OSG scene graph using
osgUtil::SceneView directly in GLUT. You may find the source code at:
https://github.com/xarray/osgRecipes/tree/master/cookbook/chapter9/ch09_06
The source code are completely in public domain so you may choose to buy
the book or not. :-)

But as Jason suggested, this is not recommended in most cases as you can't
make use of a lot of OSG features anymore.

Cheers,

Wang Rui


2012/2/29 Sean O'Connell 

> In my application I have a bunch of cameras that render to textures.  Is
> there a way for me to trigger them to render without calling
> osgViewer::frame or going through the osgViewer class?  Ideally I could
> simply call camera->renderView() or something similar.  Is this possible?
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=45868#45868
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
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.0 Cookbook: ready for pre-order and code tests

2012-02-26 Thread Wang Rui
Hi Robert,

I would like to notify you and the community when the book is formally
published and please add the news on the website's front page then. :-)

Thanks,

Wang Rui


2012/2/26 Robert Osfield 

> Hi Rui,
>
> Congratulations to yourself and the rest of the team helping out with book
> ;-)
>
> Do you want me to post an notification about the book on the OSG front
> page right away or should I wait till it's formally published and
> available?
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [ANN] OpenSceneGraph 3.0 Cookbook: ready for pre-order and code tests

2012-02-25 Thread Wang Rui
Hi all,

I'm glad to tell you all that the code repository of the OpenSceneGraph 3.0
Cookbook is now open for tests and feedbacks. The link of the book is:
http://www.packtpub.com/openscenegrap-3-for-advanced-3d-programming-using-api-cookbook/book
And you may preorder it now or just wait for another month for its
publication. Thanks to Robert Osfield and the whole OSG
community, especially the technique reviewers: Torben Dannhauer, Vincent
Bourdier, and Chris Hanson, for your continuous contributions and supports
to this marvelous OpenSceneGraph project and related publications.

The code repository is at:
https://github.com/xarray/osgRecipes
It includes all the source code and resource required for the book. Some
recipes are not contained in the book itself because of the page count
limitation, but now you may find them in the public domain.

I hope that someone could help me test the recipes on different platforms
and see if there are still compile problems and obvious bugs. Any more
suggestions and contributions to osgRecipes itself are also welcomed, as I
would like to make this project a collection and sharing place of OSG
recipes for developers and beginners. Some dozens of examples from one
cookbook are surely not enough currently. :-)

It took me seven months to finish another OSG book with the Packt
Publishing team. Now I'm going to have a rest with my family and will be
back as a normal contributor soon with some new ideas and possible
submissions (e.g. TUIO and Kinect supports :-)

Cheers,

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


Re: [osg-users] Rendering NURBS

2012-02-20 Thread Wang Rui
Hi Anders,

I have a NURBS example in my coming book: OpenSceneGraph 3.0 Cookbook. It
uses the glu* functions within a derived Drawable class.

Also a long time ago, I had have a project osgModeling (currently inactive)
in which I implemented a class that simulates NURBS surfaces with polygons.
But now I personally prefer the openNURBS library (www.*opennurbs*.org)
with which you can either draw curves and surfaces with glu* functions or
convert them to osg::Geometry objects. I have made a very initial and ugly
encapsulation of it with OSG in the experimental project osgXI (
sourceforge.net/projects/*osgxi*).

Cheers,

Wang Rui


2012/2/21 Anders Backman 

> What do you guys out there use for rendering NURBS?
> glu?
>
> Third-party libraries? If so which ones can you recommend?
>
> Thanks,
> Anders.
>
> --
> __
> Anders Backman, HPC2N
> 90187 Umeå University, Sweden
> and...@cs.umu.se http://www.hpc2n.umu.se
> Cell: +46-70-392 64 67
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Git Clients

2012-02-18 Thread Wang Rui
Hi Kim,

TortoiseGit (http://code.google.com/p/tortoisegit/) is a good choice for
windows users, and you have to install another Git console before
installing it, such like msysgit.

Regards,

Wang Rui

2012/2/18 Kim Bale 

> Hi all,
>
> Slightly off-topic so I apologise, but with all this talk of moving OSG
> over to GIT I was thinking about having a go with it and see how it all
> works.
>
> So, can anybody recommend a good git client for windows? I've been using
> Tortoise for subversion for a long time and rather like it, so something
> similar would be good..
>
> Cheers,
>
> Kim.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] multiple windows question

2012-02-16 Thread Wang Rui
Hi Alex,

The composite viewer can have multiple views of different scene graph on
different windows. Setup the Traits of each separated window and set it to
each view's camera, and setup your scenes with the View::setSceneData()
method.

Wang Rui


2012/2/17 Pecoraro, Alexander N 

> What is the best way to have multiple windows with different views of the
> same scene graph? I took a look at the composite viewer example, but it has
> different views of the same scene graph with a single window. So not quite
> what I want.
>
> ** **
>
> Thanks.
>
> ** **
>
> Alex
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Drawing poly line, jitter/vibration issue when moving camera

2012-02-13 Thread Wang Rui
Hi Preet,

2012/2/14 Preet 
>
> I'm using large (values in the hundred-millions), high precision
> numbers (doubles) for the vertices of the line strip, and I think
> that's what's causing the problem (I couldn't recreate the issue using
> smaller, more sane numbers from 1-500 for example, even though the
> same double datatype is used to store both numbers).
>
>
I believe this is the cause of your problem. Use a transform node as the
parent of your geodes and use it to reduce the number of digits.

Regards,

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


Re: [osg-users] Fwd: Ambient Occlusion Implementation 2 review

2011-12-20 Thread Wang Rui
Hi Adrian,

I'd like to help if you think it possible. I'm going to finish my
second OSG book in a few days and then I'll have time to contribute to
the community again. I myself implements a TUIO binding and consider
to submit a new manipulator with it later, but I believe your work
will really shock others a lot and will be the best Xmax gift for
everyone. :-)

Wang Rui


2011/12/20 Adrian Egli OpenSceneGraph (3D) <3dh...@gmail.com>:
> Hello all,
>
> Chrismas and i present this code.  Who can support me preparing this
> algorithm to integrate into the osg core lib.
>
> /adrian
>
>
> -- Forwarded message --
> From: Adrian Egli OpenSceneGraph (3D) <3dh...@gmail.com>
> Date: 2011/10/16
> Subject: Ambient Occlusion Implementation 2 review
> To: rob...@openscenegraph.com, urs.kuenz...@bfh.ch
>
>
> Hi Robert,
>
> I am working hard on different projects as well as you do. A long time
> ago i wrote an ambient occlusion algorithm working with
> openscenegraph. May you can review it and may we can once this
> algorithm integrate into OSG core library. I though i could public the
> source and document in GPU PRO but they doesnt like this fast approach
> do of politics i guess, or may this stuff is really as slow as the
> told me. As i dont get the time to rewrite it for a 2nd conference,
> book, etc. may we could improve the idea and integrate it deeply into
> the core library of openscenegraph and we can but a reference on the
> osg webpage (open source publication) , what do you think?
>
> Please download an have a look into the windows bin32 files and exe.
>
> http://webaddon3d.assoftware.ch/AE/SSAO/GPUPro2_Proposal_Adrian_Egli_CUBIC_SPLINE_BASED_AMBIENT_OCCLUSION.rar
>
>
> regards
> adrian
>
> --
> 
> Adrian Egli
>
>
> --
> 
> Adrian Egli
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] New OSG book on the way, and new plan of OSG recipes

2011-09-29 Thread Wang Rui
Hi Peter,

2011/9/30 PP CG :
>
> How to add and use OpenGL code within OSG. Now and then there are some
> mails on the List, but they seem already quite advanced. Could you possibly
> add few examples about this topic ?
>

Don't worry about this. The title may not be able to tell the methods
used directly. In fact there are already several examples showing how
to integrate OSG and OpenGL in different ways:
[Ch2] Using draw callbacks to execute NVIDIA Cg functions: use camera
draw callbacks to call NVCG functions, can be easily extended to OGL
functions.
[Ch3] Drawing a NURBS surface: customize Drawable to execute GLU functions
[Ch6] Creating a piece of cloud: customize Drawable to render cloud particles
[Ch6] Customizing the state attribute: customize StateAttribute to call NVCG

I'm also thinking of implementing a recipe in the last chapter that
make use of OSG in a GLUT program. But it depends. :-)

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


  1   2   3   4   >