How to add headlamp in osgEarth?

classic Classic list List threaded Threaded
11 messages Options
Daven Hem Daven Hem
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to add headlamp in osgEarth?

Hello, everyone!
I want to add light such as headlamp which moves with camera in my scene.
I'm finding available topics for this now. But if any body can teach me, I would appreciate it.
Can I add OSG light on any location(lon/lat/alt)? or Any other solutions? How can I do that?
Please teach me!
Thanks.
 
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to add headlamp in osgEarth?

Look at the osgearth_lights example for starters.
Glenn Waldron / Pelican Mapping
Daven Hem Daven Hem
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to add headlamp in osgEarth?

Where can I get osgearth_lights example?
Daven Hem Daven Hem
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to add headlamp in osgEarth?

Hi, Glenn.
I found this example from your repository of Git. Maybe I had the old version.
Thanks for your teaching.
Daven Hem Daven Hem
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to add headlamp in osgEarth?

Mr. Glenn!
I added phong light of osgearth_light into my scene.

It works fine. But textures of some objects was disappeared. Please look my screenshot.
  - All green texts were displayed as green rectangles
  - All textures of the ship(*.obj) was disappeared, shown as gray
How can I fix it? Please teach me.

Thanks for your time.
Daven.




gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to add headlamp in osgEarth?

Daven Hem Daven Hem
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to add headlamp in osgEarth?

Mr. Glenn!
Thanks for your quick response. It's very interesting.
The ship texture was rendered normally, but not text. Please look my attached screenshot.
Texts were still displayed as green rectangles. My code:

osg::ref_ptr<osg::Geode>        geoText = new osg::Geode();
osgEarth::Registry::shaderGenerator().run(geoText);

How can I fix it?


Daven Hem Daven Hem
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to add headlamp in osgEarth?

Mr. Glenn.
When I turn on osgearth_lights, all texts are displayed as rectangle and are bright.
When I turn on/off this light, all osg::Boxes are bright, illuminate.
How can I fix it?
Is this issue of osgearth_lights?
Daven Hem Daven Hem
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I stop shaderGenerator?

Mr. Glenn!
I've fixed my issues. Thanks for your teaching.
And I have a question about "osgEarth::Registry::shaderGenerator().run( myNode );"
I want to run and stop register shader generator.
How can I stop shaderGenerator?

Thanks. Kind regards.
Daven.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I stop shaderGenerator?

What do you mean?
Glenn Waldron / Pelican Mapping
Daven Hem Daven Hem
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I stop shaderGenerator?

Mr. Glenn.
I want turn on/off osgearth light.
But when I turn on/off light, some texts was oddy.
How can I fix it? So now I removed child node for texts from map node and light.
But texts are always bright.
Thank you for your teaching.
Daven.
Loading...