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 

setLightColor and dynamic sun problems.


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgOcean [osgOcean]
View previous topic :: View next topic  
Author Message
Paradox
Appreciator


Joined: 19 Apr 2010
Posts: 128

PostPosted: Thu Jun 13, 2013 4:04 pm    Post subject:
setLightColor and dynamic sun problems.
Reply with quote

Hi,

I'm implementing a simple sun walk into skydome, calculating the light color during day. I'm using osgocean. To setup the ocean scene accordingly with the light color variation, I have to set the light color in osgocean itself via setLightColor. This works but setLightColor dirty the shader anytime and I see a "latch" into the scene when this happens.

You can suggest to me a workaround to avoid the latch? Obviously I don't sets the ocean light color any microsecond, I update the light any 5 secs.

Thank you!

Cheers,
Dario
Back to top
View user's profile Send private message
kcbale
User


Joined: 04 Mar 2011
Posts: 68

PostPosted: Thu Jun 13, 2013 8:34 pm    Post subject:
setLightColor and dynamic sun problems.
Reply with quote

Hi Dario,

I'm not sure I understand what you mean by a 'latch', could you describe the symptoms a little more? I can't remember if the light variable is a uniform or a #define and I'm not in front of a pc to check.

Regards

Kim.

Sent from my iPhone

On 13 Jun 2013, at 17:04, "Dario Minieri" <> wrote:

Quote:
Hi,

I'm implementing a simple sun walk into skydome, calculating the light color during day. I'm using osgocean. To setup the ocean scene accordingly with the light color variation, I have to set the light color in osgocean itself via setLightColor. This works but setLightColor dirty the shader anytime and I see a "latch" into the scene when this happens.

You can suggest to me a workaround to avoid the latch? Obviously I don't sets the ocean light color any microsecond, I update the light any 5 secs.

Thank you!

Cheers,
Dario

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








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Paradox
Appreciator


Joined: 19 Apr 2010
Posts: 128

PostPosted: Thu Jun 13, 2013 9:45 pm    Post subject:
Re: setLightColor and dynamic sun problems.
Reply with quote

Hi kcbale

The light is a uniform and it is used to compute the wave top/bottom color. Because the setLightColor set a statSetDirty, ocean is instructed tu reload all stuffs. This cause a "freeze" at any time this reload is called. I'm planning to setup directly the uniform without dirty the stateSet...I'm try some ideas tomorrow...

kcbale wrote:
Hi Dario,

I'm not sure I understand what you mean by a 'latch', could you describe the symptoms a little more? I can't remember if the light variable is a uniform or a #define and I'm not in front of a pc to check.

Regards

Kim.

Sent from my iPhone

On 13 Jun 2013, at 17:04, "Dario Minieri" <> wrote:

Quote:
Hi,

I'm implementing a simple sun walk into skydome, calculating the light color during day. I'm using osgocean. To setup the ocean scene accordingly with the light color variation, I have to set the light color in osgocean itself via setLightColor. This works but setLightColor dirty the shader anytime and I see a "latch" into the scene when this happens.

You can suggest to me a workaround to avoid the latch? Obviously I don't sets the ocean light color any microsecond, I update the light any 5 secs.

Thank you!

Cheers,
Dario

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








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
kcbale
User


Joined: 04 Mar 2011
Posts: 68

PostPosted: Thu Jun 13, 2013 9:59 pm    Post subject:
setLightColor and dynamic sun problems.
Reply with quote

Hey Dario,

Ah Ok i understand. I'll check over the code tomorrow, it does sound like it might need some minor changes to accommodate your needs.

Regards,

Kim.

Sent from my iPhone

On 13 Jun 2013, at 22:45, "Dario Minieri" <> wrote:

Quote:
Hi kcbale

The light is a uniform and it is used to compute the wave top/bottom color. Because the setLightColor set a statSetDirty, ocean is instructed tu reload all stuffs. This cause a "freeze" at any time this reload is called. I'm planning to setup directly the uniform without dirty the stateSet...I'm try some ideas tomorrow...


kcbale wrote:
Quote:
Hi Dario,

I'm not sure I understand what you mean by a 'latch', could you describe the symptoms a little more? I can't remember if the light variable is a uniform or a #define and I'm not in front of a pc to check.

Regards

Kim.

Sent from my iPhone

On 13 Jun 2013, at 17:04, "Dario Minieri" <> wrote:


Quote:
Hi,

I'm implementing a simple sun walk into skydome, calculating the light color during day. I'm using osgocean. To setup the ocean scene accordingly with the light color variation, I have to set the light color in osgocean itself via setLightColor. This works but setLightColor dirty the shader anytime and I see a "latch" into the scene when this happens.

You can suggest to me a workaround to avoid the latch? Obviously I don't sets the ocean light color any microsecond, I update the light any 5 secs.

Thank you!

Cheers,
Dario

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





_______________________________________________
osg-users mailing list

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

------------------
Post generated by Mail2Forum


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








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Paradox
Appreciator


Joined: 19 Apr 2010
Posts: 128

PostPosted: Fri Jun 14, 2013 3:46 pm    Post subject:
Re: setLightColor and dynamic sun problems.
Reply with quote

Hi kcbale

I've fixed the problem implementing a simple setLightColor with no stateSet dirty: i've updated the uniform value only. This work.

Right now, I look around another issue on the last ocean revision (258). Your ideas are really appreciated: http://forum.openscenegraph.org/viewtopic.php?t=12313

many thanks again

bye!

kcbale wrote:
Hey Dario,

Ah Ok i understand. I'll check over the code tomorrow, it does sound like it might need some minor changes to accommodate your needs.

Regards,

Kim.

Sent from my iPhone

On 13 Jun 2013, at 22:45, "Dario Minieri" <> wrote:

Quote:
Hi kcbale

The light is a uniform and it is used to compute the wave top/bottom color. Because the setLightColor set a statSetDirty, ocean is instructed tu reload all stuffs. This cause a "freeze" at any time this reload is called. I'm planning to setup directly the uniform without dirty the stateSet...I'm try some ideas tomorrow...


kcbale wrote:
Quote:
Hi Dario,

I'm not sure I understand what you mean by a 'latch', could you describe the symptoms a little more? I can't remember if the light variable is a uniform or a #define and I'm not in front of a pc to check.

Regards

Kim.

Sent from my iPhone

On 13 Jun 2013, at 17:04, "Dario Minieri" <> wrote:


Quote:
Hi,

I'm implementing a simple sun walk into skydome, calculating the light color during day. I'm using osgocean. To setup the ocean scene accordingly with the light color variation, I have to set the light color in osgocean itself via setLightColor. This works but setLightColor dirty the shader anytime and I see a "latch" into the scene when this happens.

You can suggest to me a workaround to avoid the latch? Obviously I don't sets the ocean light color any microsecond, I update the light any 5 secs.

Thank you!

Cheers,
Dario

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





_______________________________________________
osg-users mailing list

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

------------------
Post generated by Mail2Forum


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








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgOcean [osgOcean] 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 Problems with view .FBX files arfaa General 0 Thu Jul 27, 2017 2:48 pm View latest post
No new posts Forum problems SMesserschmidt General 2 Wed Apr 12, 2017 7:24 am View latest post
No new posts problems getting shadow demo to work Lee Butler General 1 Mon Feb 20, 2017 4:02 am View latest post
No new posts Having problems running the osgViewer... retrotrap General 2 Thu Nov 24, 2016 12:43 pm View latest post
No new posts [osgEarth] several problems and quest... hulrien General [forum] 3 Thu Nov 24, 2016 10:42 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