Board index FlightGear Development Effects and shaders

Trying to get shadows...

An exciting "new" option in FlightGear, that includes reflections, lightmaps, the particle system etc.. A lot is yet to be discovered/implemented!

Re: Trying to get shadows...

Postby penta » Sat Dec 03, 2011 4:02 pm

HHS wrote in Fri Dec 02, 2011 2:06 am:Vivian and Emilian are pretty much ready with the work- maybe worth a little to wait.
EDIT: they are ready- update your FGFS! :D


I'm going a little off-topic here but as you are talking about the new combined effects, I've pulled the latest fgdata git and I have a question: by looking in the model-combined.eff I see a call to the Docs/README.model-combined.eff file but it isn't there. Was it left out of the commit or isn't it ready yet?
penta
 
Posts: 238
Joined: Mon Dec 29, 2008 12:05 pm
Location: Parma-Italy
Version: Git
OS: Ubuntu Linux

Re: Trying to get shadows...

Postby HHS » Sat Dec 03, 2011 4:13 pm

Isn't ready yet.

But for your work on the b1900d interesting, look into their "sandbox".
They have an updated version of the DHC2, which shows how to use the model-combined.eff with normalmap and dynamic-reflection. (which is already an improvement to the old shader)
Lightmaps aren't included on the DHC2 yet. Depending on my time next week, I will update the EC130 with lightmaps.
Up, up and away
User avatar
HHS
 
Posts: 3625
Joined: Thu Jul 19, 2007 9:09 am
Version: GIT

Re: Trying to get shadows...

Postby icecode » Tue Dec 06, 2011 5:13 pm

So now I noticed that the problems come from what I do with Depth, (I thought stencil was the only thing that did the job in shadows), so... it is still possible to get shadows, at least from what I've seen! The documentation is really scarce, and every paper says one thing...
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Trying to get shadows...

Postby fredb » Tue Dec 06, 2011 6:08 pm

I recently fixed an issue in the <depth> effect attribute where the content of the <near> element was also used for <far> resulting in a null depth range (near == far).
You either need to update fg, or delete the <far> element to get the default 1.0
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 11:41 am
Location: Paris, France

Re: Trying to get shadows...

Postby icecode » Tue Dec 06, 2011 9:56 pm

I don't use near/far right now, but if one day I have to use it, nice to have that little bug fixed. :wink:
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Trying to get shadows...

Postby HHS » Tue Dec 06, 2011 11:04 pm

Icecode GL wrote in Tue Dec 06, 2011 5:13 pm:So now I noticed that the problems come from what I do with Depth, (I thought stencil was the only thing that did the job in shadows), so... it is still possible to get shadows, at least from what I've seen! The documentation is really scarce, and every paper says one thing...


And that means- you are working again on it?
Up, up and away
User avatar
HHS
 
Posts: 3625
Joined: Thu Jul 19, 2007 9:09 am
Version: GIT

Re: Trying to get shadows...

Postby icecode » Wed Dec 07, 2011 5:40 pm

I didn't say I would give up, I will continue working on this, but slowly than before.
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Trying to get shadows...

Postby planetacancun » Sat Dec 10, 2011 6:50 pm

Callsign:Fallen-
Videos: http://youtube.com/planetacancun2
planetacancun
 
Posts: 322
Joined: Thu Jul 30, 2009 5:52 pm
Callsign: Fallen-
IRC name: Fallen-
Version: GIT
OS: Ubuntu

Re: Trying to get shadows...

Postby fredb » Sat Dec 17, 2011 2:52 pm

I just want to announce that I am currently working on a new renderer (code named Rembrandt) that will include, among other things, shadows :

Image

I am hacking C++ and this is shadow mapping, not shadow volumes
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 11:41 am
Location: Paris, France

Re: Trying to get shadows...

Postby El Flauta » Sat Dec 17, 2011 4:56 pm

You may join your efforts to get results soon. Great improvements!
Vive FlightGear! Have you a Ñ on your keyboard? Spain-LatinAmerica FlightGear community!
--
PZL M18B Dromader
CASA C-101 Aviojet
Cessna 337G Skymaster
User avatar
El Flauta
 
Posts: 426
Joined: Fri Mar 14, 2008 1:09 am
Location: SCVM, Chile
Callsign: CC-FLT
Version: 3
OS: Windows 7 SP1

Re: Trying to get shadows...

Postby icecode » Sat Dec 17, 2011 6:49 pm

Then, that means I should stop developing this? They look just awesome, good work.
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Trying to get shadows...

Postby fredb » Sat Dec 17, 2011 7:06 pm

If you manage to get something non obtrusive, your work could be an interim solution
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 11:41 am
Location: Paris, France

Re: Trying to get shadows...

Postby icecode » Sat Dec 17, 2011 7:11 pm

Then I prefer to leave the work, good luck with the new renderer!
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Trying to get shadows...

Postby curt » Sun Dec 18, 2011 1:56 pm

icecode: speaking purely from an engineering perspective; one option would be to take a close look at Fred's approach, understand it, and then compare it to your approach. If your approach has different strengths (or weaknesses) as every set of engineering choices will have, and if you have the desire to keep pushing your approach forward, then there could be some value. But it comes down to your decision of course -- balancing all the different factors with some of your own gut feelings about what might work best in the long term, and of course weighing in what you want to work on. Even though Beethoven's Sonata Pathetique has been performed beautifully for 100's of years, there still could be value in learning how to play it yourself. There can be an educational aspect to this as well. There are many reasons why a person might choose to work (or not work) on something.
curt
Administrator
 
Posts: 1168
Joined: Thu Jan 01, 1970 1:00 am
Location: Minneapolis, MN

Re: Trying to get shadows...

Postby icecode » Sun Dec 18, 2011 2:06 pm

I've been taking a look at Fred's code, and looks like he implemented shadows taking advantage of deferred-lighting. His main goal is deferred-lighting, shadows are part of the mentioned goal.

He is using shadows maps, so the only thing I can apport is a shadow volume support or making a better shadow map approach. But Fred, you are using a primitive way to create shadow maps, I mean you can use osgShadow now that is possible. (Maybe I am wrong, but you are doing the same osgShadowMaps do).

I won't "lose" more time in trying to implement shadows, it is like going backwards. If Fred finally implements deferred-lighting, the current way I am using would get deprecated again, like when we switched from PLib to OSG.
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 5 guests