I want to darken the osg::fog at night too, what should I do?

54 views
Skip to first unread message

DAE WOO Ryu

unread,
May 28, 2020, 3:23:01 PM5/28/20
to OpenSceneGraph Users
I want to darken the osg::fog at night too, what should I do?

There seems to be a simple way, but I can't find it.

I need help..

DAE WOO Ryu

unread,
Jun 22, 2020, 10:20:54 PM6/22/20
to OpenSceneGraph Users
plz.. help.. I want to darken fog at night .

2020년 5월 29일 금요일 오전 4시 23분 1초 UTC+9, DAE WOO Ryu 님의 말:

OpenSceneGraph Users

unread,
Jun 23, 2020, 2:55:40 AM6/23/20
to osg-...@lists.openscenegraph.org

Hi, ?

 

Simply set the fog-color to a darker color?

 

From: osg-users <osg-user...@lists.openscenegraph.org> On Behalf Of OpenSceneGraph Users
Sent: Dienstag, 23. Juni 2020 04:21
To: OpenSceneGraph Users <osg-...@googlegroups.com>
Subject: Re: [osg-users] I want to darken the osg::fog at night too, what should I do?

 

plz.. help.. I want to darken fog at night .

2020 5 29 금요일 오전 4 23 1 UTC+9, DAE WOO Ryu 님의 :

I want to darken the osg::fog at night too, what should I do?



There seems to be a simple way, but I can't find it.

I need help..

--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/e017cee5-49e8-4190-89d4-c5e86e18afe8o%40googlegroups.com.

DAE WOO Ryu

unread,
Jun 23, 2020, 3:01:30 AM6/23/20
to OpenSceneGraph Users
hi,

I don’t change the color to make it dark
I want to express that it darkens naturally as time passes by the influence of light.


2020년 6월 23일 화요일 오후 3시 55분 40초 UTC+9, OpenSceneGraph Users 님의 말:

Hi, ?

 

Simply set the fog-color to a darker color?

 

From: osg-users <osg-user...@lists.openscenegraph.org> On Behalf Of OpenSceneGraph Users
Sent: Dienstag, 23. Juni 2020 04:21
To: OpenSceneGraph Users <osg-...@googlegroups.com>
Subject: Re: [osg-users] I want to darken the osg::fog at night too, what should I do?

 

plz.. help.. I want to darken fog at night .

2020 5 29 금요일 오전 4 23 1 UTC+9, DAE WOO Ryu 님의 :

I want to darken the osg::fog at night too, what should I do?

There seems to be a simple way, but I can't find it.

I need help..

--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to osg-...@googlegroups.com.

OpenSceneGraph Users

unread,
Jun 23, 2020, 3:47:48 AM6/23/20
to osg-...@lists.openscenegraph.org

Hi,

 

As there is no concept of day/night in OSG you need to adapt the color based on the time passed (you can use the osg-time for this or use a separate timer) .

Simply adapt the fog-color during the update-traversal.

 

Cheers

Sebastian

 

From: osg-users <osg-user...@lists.openscenegraph.org> On Behalf Of OpenSceneGraph Users
Sent: Dienstag, 23. Juni 2020 09:02
To: OpenSceneGraph Users <osg-...@googlegroups.com>
Subject: Re: [osg-users] I want to darken the osg::fog at night too, what should I do?

 

hi,

 

I don’t change the color to make it dark

I want to express that it darkens naturally as time passes by the influence of light.



2020 6 23 화요일 오후 3 55 40 UTC+9, OpenSceneGraph Users 님의 :

Hi, ?

 

Simply set the fog-color to a darker color?

 

From: osg-users <osg-user...@lists.openscenegraph.org> On Behalf Of OpenSceneGraph Users
Sent: Dienstag, 23. Juni 2020 04:21
To: OpenSceneGraph Users <osg-...@googlegroups.com>
Subject: Re: [osg-users] I want to darken the osg::fog at night too, what should I do?

 

plz.. help.. I want to darken fog at night .

2020 5 29 금요일 오전 4 23 1 UTC+9, DAE WOO Ryu 님의 :

I want to darken the osg::fog at night too, what should I do?

There seems to be a simple way, but I can't find it.

I need help..

--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to osg-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+...@googlegroups.com.

DAE WOO Ryu

unread,
Jun 23, 2020, 4:03:08 AM6/23/20
to OpenSceneGraph Users
hi, Sebastian

Is fog operating independently of light?

Cheers.



2020년 6월 23일 화요일 오후 4시 47분 48초 UTC+9, OpenSceneGraph Users 님의 말:

OpenSceneGraph Users

unread,
Jun 23, 2020, 4:19:18 AM6/23/20
to OpenSceneGraph Users
On Tue, 23 Jun 2020 at 03:21, OpenSceneGraph Users <osg-...@lists.openscenegraph.org> wrote:
plz.. help.. I want to darken fog at night .

osg::Fog has a colour value that you set with fog->setColor(Vec4(r,g,b,a));


OpenSceneGraph Users

unread,
Jun 23, 2020, 4:30:47 AM6/23/20
to osg-...@lists.openscenegraph.org

Hi,

 

Yes, in FFP they don’t interact. If you want some Light+Fog interaction you need to write a shader.

Fog is simply a color “added” with respect to the distance from the viewpoint

 

Cheers

Sebastian

 

From: osg-users <osg-user...@lists.openscenegraph.org> On Behalf Of OpenSceneGraph Users
Sent: Dienstag, 23. Juni 2020 10:03
To: OpenSceneGraph Users <osg-...@googlegroups.com>
Subject: Re: [osg-users] I want to darken the osg::fog at night too, what should I do?

 

hi, Sebastian

 

Is fog operating independently of light?

 

Cheers.



2020 6 23 화요일 오후 4 47 48 UTC+9, OpenSceneGraph Users 님의 :

--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages