OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

pipeline stall


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgPPU [osgPPU]
View previous topic :: View next topic  
Author Message
Riccardo Corsi
Guest





PostPosted: Thu Sep 30, 2010 10:49 am    Post subject:
pipeline stall
Reply with quote

Hi Art and all,

I'm facing a strange issue when integrating a very simple PPU pipeline in my application.
The post fx does its work just fine, but then for some periods it just stops to render, it stalls for a while (frequency and length of these periods seem to be random), and then it starts working again.
Using the debug notification level, i obtain the output pasted below.

The effect I've used for this example is basically the same as the DOF example, but also with other (simpler) fx the issue is the same.

Please note that I'm not using a UnitOut as last unit, but a UnitInOut from which I retrieve the texture to apply to another object of my scene something like:
osg::Texture* pFxTex = pLastUnit->getOrCreateOutputTexture(0);
pGeometry->getOrCreateStateSet()->setTextureAttributeAndModes(0, pFxTex );


Have you got any idea what might be the cause of the issue??
I'm quite lost...
Ricky




--------------------------------------------------------------------
BEGIN FRAME
DepthBypass run in thread 00000000
         program: 02B5F850
         input:  0:00000000
DOF_Result run in thread 00000000
         vp 02C0D238 (ref 0): 0 0 1024 767
         program: 02B605F8
         input:  0:02B5A548-attr (1024x767) 1:02B6FB40-attr (512x383) 2:000000
         output:  02B762B8 (1024x767 )
         fbo: 00000000

ColorBypass run in thread 00000000
         vp 02C0D058 (ref 0): 0 0 1024 767
         program: 02B5B4A8
         input:  0:02B5A548-attr (1024x767)
ResampleLight run in thread 00000000
         vp 02C0D148 (ref 0): 0 0 512 383
         program: 02B65538
         input:  0:02B5A548-attr (1024x767)
         output:  02B6C100 (512x383 )
         fbo: 00000000

BlurHorizontal run in thread 00000000
         vp 02C0CFE0 (ref 0): 0 0 512 383
         program: 02B60158
         input:  0:02B6C100-attr (512x383)
         output:  02B6D580 (512x383 )
         fbo: 00000000

BlurVertical run in thread 00000000
         vp 02C0D1C0 (ref 0): 0 0 512 383
         program: 02B60280
         input:  0:02B6D580-attr (512x383)
         output:  02B6FB40 (512x383 )
         fbo: 00000000

Done DatabasePager::addLoadedDataToSceneGraph0.000766244ms,     0ms  objects0

--------------------------------------------------------------------
BEGIN FRAME
--------------------------------------------------------------------
BEGIN FRAME
Done DatabasePager::addLoadedDataToSceneGraph0.000383122ms,     0ms  objects0

------------------
Post generated by Mail2Forum
Back to top
art (Art Tevs)
Site Admin


Joined: 20 Dec 2008
Posts: 414
Location: Saarbrücken, Germany

PostPosted: Tue Oct 05, 2010 1:15 pm    Post subject:
Reply with quote

Hi Ricardo,

hmm, since I do not know your unit graph setup I could not give the right answer on this. Actually any stalling is not a correct behaviour and shouldn't be a consequence of wrong unit graph. Unit graphs are actually static, so if they start well, they should also work well without stalling. Only if there is dynamically any change happens, then it might create a problem.

What is your last unit, is it the DOF_Result or the BlurVertical. I assume this is the DOF_Result. Due to the order of the output, you will get one frame delay in your results.

Are you sure that your camera, which you use for the input to the Unit graph is updated every frame. Maybe just one of your cameras stalls. Is it possible, that you create a small example application showing the issue?


Thank you!

Cheers,
Art
Back to top
View user's profile Send private message Visit poster's website
Riccardo Corsi
Guest





PostPosted: Tue Oct 05, 2010 3:44 pm    Post subject:
pipeline stall
Reply with quote

Hi Art,

you're right about the output order of the units... I really don't know why the order is mixed...
What I'm sure about is that all the cameras which are input to the PPU are updated every frame, because for debug reasons I use their (attached) texture on another quad without pipeline, and that is draw correctly every frame.

It's a bit complicated to reproduce the issue with an example, I'll try to set it up though.

In the meantime let me just explain you how I setup the different camera, in case you notice something wrong with that.

I have a main scene and then, inside the main view, a phone model in 3D which has to show on its screen the main scene plus some additional contents.
So, without any PPU I have:

1. main viewer camera which renders main scene to the full viewport
2. phone camera (slave, RTT via FBO, shares the viewer scene data) in PRE_RENDER to render main scene from the phone point of view
3. hud camera (RTT via FBO) in PRE_RENDER to render phone additional contents
--> output texture from 2 and 3 are mixed by a simple shader and used on the phone 3D model
4. another slave camera to draw only the phone model (in its own subgraph) on the main window viewport

Now I'd like to add some post process to the camera 2. To achieve that I would:
- attach the PPU to the main scene
- set the PPU::Processor camera to the phone camera 2
- then don't know if it's better to mix the postprocess result with hud camera inside the pipeline, or mix them with the shader I'm using now. In both cases I would not use a UnitOut, but simply getOrCreateOutputTexture() from the last Unit of the pipeline.

It this a correct approach?
Thanks,
Ricky




On Tue, Oct 5, 2010 at 15:15, Art Tevs < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Ricardo,

hmm, since I do not know your unit graph setup I could not give the right answer on this. Actually any stalling is not a correct behaviour and shouldn't be a consequence of wrong unit graph. Unit graphs are actually static, so if they start well, they should also work well without stalling. Only if there is dynamically any change happens, then it might create a problem.

What is your last unit, is it the DOF_Result or the BlurVertical. I assume this is the DOF_Result. Due to the order of the output, you will get one frame delay in your results.

Are you sure that your camera, which you use for the input to the Unit graph is updated every frame. Maybe just one of your cameras stalls. Is it possible, that you create a small example application showing the issue?


Thank you!

Cheers,
Art

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





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
Riccardo Corsi
Guest





PostPosted: Tue Oct 19, 2010 1:01 pm    Post subject:
pipeline stall SOLVED
Reply with quote

Hi Art and all,

just an update for sharing that I've solved my problem.
The pipeline attached to the main viewer scene was rendered by multiple cameras with different output (one to FB and the other RTT) and this was probably causing some issues.
I also changed the pipeline, but I don't think that had nothing to do.
Now I have added the pipeline to its own subgraph and it works without problems.

cheers,
Ricky

On Tue, Oct 5, 2010 at 17:43, Riccardo Corsi < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Art,

you're right about the output order of the units... I really don't know why the order is mixed...
What I'm sure about is that all the cameras which are input to the PPU are updated every frame, because for debug reasons I use their (attached) texture on another quad without pipeline, and that is draw correctly every frame.

It's a bit complicated to reproduce the issue with an example, I'll try to set it up though.

In the meantime let me just explain you how I setup the different camera, in case you notice something wrong with that.

I have a main scene and then, inside the main view, a phone model in 3D which has to show on its screen the main scene plus some additional contents.
So, without any PPU I have:

1. main viewer camera which renders main scene to the full viewport
2. phone camera (slave, RTT via FBO, shares the viewer scene data) in PRE_RENDER to render main scene from the phone point of view
3. hud camera (RTT via FBO) in PRE_RENDER to render phone additional contents
--> output texture from 2 and 3 are mixed by a simple shader and used on the phone 3D model
4. another slave camera to draw only the phone model (in its own subgraph) on the main window viewport

Now I'd like to add some post process to the camera 2. To achieve that I would:
- attach the PPU to the main scene
- set the PPU::Processor camera to the phone camera 2
- then don't know if it's better to mix the postprocess result with hud camera inside the pipeline, or mix them with the shader I'm using now. In both cases I would not use a UnitOut, but simply getOrCreateOutputTexture() from the last Unit of the pipeline.

It this a correct approach?
Thanks,
Ricky





On Tue, Oct 5, 2010 at 15:15, Art Tevs < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Ricardo,

hmm, since I do not know your unit graph setup I could not give the right answer on this. Actually any stalling is not a correct behaviour and shouldn't be a consequence of wrong unit graph. Unit graphs are actually static, so if they start well, they should also work well without stalling. Only if there is dynamically any change happens, then it might create a problem.

What is your last unit, is it the DOF_Result or the BlurVertical. I assume this is the DOF_Result. Due to the order of the output, you will get one frame delay in your results.

Are you sure that your camera, which you use for the input to the Unit graph is updated every frame. Maybe just one of your cameras stalls. Is it possible, that you create a small example application showing the issue?


Thank you!

Cheers,
Art

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





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org






------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgPPU [osgPPU] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts How to use frame buffer object in exi... saedrna1 General 2 Sat Feb 18, 2017 3:54 am View latest post
No new posts Moved to BUILD FORUM - Best Pipeline ... dsargrad General 3 Sun Jun 05, 2016 5:03 pm View latest post
No new posts Creator/OpenFlight (.flt) Extended Ma... hunter789 General 0 Wed Jan 13, 2016 6:07 pm View latest post
No new posts Help: can the location of the fragmen... Chris Hanson General 2 Sat Aug 23, 2014 9:59 am View latest post
No new posts force fixed function pipeline danoo General 3 Fri Feb 07, 2014 10:15 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP