Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: 1 2 3 [4]
  Print  
Author Topic: Shadow-Mapping Directional Lights  (Read 13248 times)
sybixsus
Customers
Community Member
*****
Posts: 1088


WWW
« Reply #60 on: November 30, 2006, 11:21:35 PM »

Quote from: "Zaknafein"
That is true. If I do a port of this demo it'll be C++ or C#, not Blitz Basic/Delphi/APL or any other.
But if you guys can read VB.Net, nothing stops you from making the conversion yourselves...


Well hopefully. I'm the guy maintaining the BlitzMax module, so I would feel somewhat honour bound to attempt the conversion, even if I don't plan to use it myself. I'm not a trained programmer, though, and I have almost no experience with modern mainstream languages, including all of Microsoft's. I don't particularly have a problem reading VB, C# or C++, as long as it doesn't get into any external stuff because that's when it being a Microsoft language matters.

Of course, if it makes any of use InternalObjects, I've got no chance, because I didn't wrap that class and can't really even if I wanted to. It would force everyone who uses the wrapper to have the DX SDK, which they mostly won't have, and I doubt I could link to it from BMax anyway, since BMax cannot deal with most COM objects.

If it ends up being something fairly modular, that I can understand, and doesn't have any other dependancies that BMax can't handle, I might be able to integrate it directly into the wrapper, either at the BMax or C++ level.
Logged
Zaknafein
Customers
Community Member
*****
Posts: 2670


WWW
« Reply #61 on: November 30, 2006, 11:42:45 PM »

Quote from: "sybixsus"
... as long as it doesn't get into any external stuff because that's when it being a Microsoft language matters.
...
Of course, if it makes any of use InternalObjects, I've got no chance, because I didn't wrap that class and can't really even if I wanted to.

I don't think there will be any problem there. I don't use TVInternalObjects, I have no dependencies to DirectX, and no external/API calls either (apart from the performance counter and fancy loop management, both of which are not related to shadowmapping).

The only thing that might pose a problem is how I manage the various collections, as I am a big fan of hash-tables -- Dictionary<T, U> in .NET. They are used to rapidly access data structures which are indexed by a simpler structure, like a landscape chunk {x, z} identifier would index shadow-maps for this chunk.
But I suppose this could be done with arrays or array-lists/linked lists, whatever BlitzMax supports.
Logged

zaknafein.
>> the instruction limit : my blog & samples repository! <<
Zaknafein
Customers
Community Member
*****
Posts: 2670


WWW
« Reply #62 on: December 01, 2006, 02:31:21 AM »

Another update, probably the last before the release!



I've added support for transparent meshes, including (tested and working) particle systems!
Colored shadows are not supported (yet), but would be doable in my opinion. It's just hard to differentiate an opaque colored mesh from a transparent colored mesh.... and then again, semi-transparent red smoke does not produce red shadows, does it?
Logged

zaknafein.
>> the instruction limit : my blog & samples repository! <<
BlindSide
Customers
Community Member
*****
Posts: 759


WWW
« Reply #63 on: December 01, 2006, 02:34:31 AM »

I know you showed me on msn and everything, but I have to say it again - amazing work Zak, really great stuff =D
Logged

Blind's Dev Blog - www.smithbower.com/devblog/

Irc.Desolation.Org :: #TV3DLicensed :: Moderated IRC channel for all your TV3D needs :: Non-Licensed users welcome.
Massive
Customers
Community Member
*****
Posts: 58


WWW
« Reply #64 on: December 01, 2006, 04:07:52 AM »

Thats just sick, I particularly like the particle shadows, you can just see how that would add that extra bit of polish when it animates.

-Massive
Logged
Waterman
Customers
Community Member
*****
Posts: 1141


« Reply #65 on: December 01, 2006, 04:38:59 AM »

Quote from: "Zaknafein"
That is true. If I do a port of this demo it'll be C++ or C#, not Blitz Basic/Delphi/APL or any other.

Haha. Well i'll take care of the APL part. My approach is however somewhat different, so we don't talk about any coversion here. But i'd be interested in seeing your approach to managing the target area on the landscape.

I wanted to add that landscape shadowing is by no means generic. Take a look outside. The lighting conditions are very complex, and one should be able to extract at least the most essential functionality from that.

For example do we have shadows only when there is sunshine. And the sunshine is determined by the cloud layer. If there are clouds but they don't cover the sky completely, the sunshine (and the shadows) on the ground change. Means that one should make the shadowing to cooperate with the cloud generation, and for the clouds again there is no common solution.

Then one might want to combine the light strenght on the ground with an ambient strenght map (e.g. it's always darker in a forest, even if there is no direct sunshine).

About the fitting onto the ground: One cannot assume any fixed chunk size or scale. Personally i generate the landscape objects using a combination of precision and scale. I don't really care which these are, the only important thing is that the node density is homogenous (and that may change later on). And the landscape objects may overlap each other, or not even touch each other.

Then we have the issue of combining the directional light shadowing with other shadowing. When the sun sets, the lights turn on, and suddenly we have point light sources that should cast shadows as well. And naturallu we want the transition to happen smoothly.

A complete shadowing simulation is utterly complex, unless one selects to set limitations at the conceptual level (which is also a fully valid solution). There needs to be much more prototyping before even thinking of building in new shadowing techniques in the engine itself.
Logged

Things should be described as simply as possible - but not simpler [A. Einstein]
sybixsus
Customers
Community Member
*****
Posts: 1088


WWW
« Reply #66 on: December 01, 2006, 01:41:25 PM »

Quote from: "Zaknafein"
The only thing that might pose a problem is how I manage the various collections, as I am a big fan of hash-tables -- Dictionary<T, U> in .NET. They are used to rapidly access data structures which are indexed by a simpler structure, like a landscape chunk {x, z} identifier would index shadow-maps for this chunk.
But I suppose this could be done with arrays or array-lists/linked lists, whatever BlitzMax supports.

I'm not familiar with the .Net syntax for collections, so I'm not sure how easy I'll find it to read and understand what you're doing. But BlitzMax has hash tables, and I use them quite a bit, so if I can understand it, I should be able to emulate it.

Good news on the DX, Internal Objects and general dependencies. Fingers crossed.
Logged
AriusMyst
Guest
« Reply #67 on: December 02, 2006, 09:52:18 AM »

Getting shadows( of any kind ) working with particles is a pain. So major kudos man, MAJOR, that must've been a real pain. Just one question - how expensive is shadow mapping particles?
Logged
Zaknafein
Customers
Community Member
*****
Posts: 2670


WWW
« Reply #68 on: December 02, 2006, 10:29:28 AM »

It's just about free! I have a 1000 billboard particle system with shadowmapping and the framerate flies around 175.
Sadly until minimeshes support shaders, it doesn't work with minimesh particle systems.
And actually it hasn't been much of a pain at all... :lol: That's what's cool with shadow maps, if you can render it you can probably shadow it.

The demo is completed, but the code is *still* not commented so I'll wait until sunday before releasing it.







The initial release will have commented code, and that's it. Then later I will release a blog page/manual like I did with the HLSLSkyDemo to explain the inner workings and what can/must be adapted or optimized to fit in a real game engine.
Then later if I find the time, I'll make a really modular version and maybe a C# port, because right now there are a lot of inter-modules dependencies in the code, which I am not too happy with.
Logged

zaknafein.
>> the instruction limit : my blog & samples repository! <<
AriusMyst
Guest
« Reply #69 on: December 02, 2006, 12:34:39 PM »

Thats fantastic. Shadow mapping is one of those grey areas for me. I knew Blind had been working on it for some time, so rather than stepping on his shoes( he was way ahead of me already ) I decided to wait an see what he did. I understand the basic principle but beyond that I haven't looked in to it. Its great that you guys have done the leg work on this and given us lazy bastards a route to follow. Especially with the particles - shadowed particles is one thing thats always been on my dream list.  Smiley
Logged
BlindSide
Customers
Community Member
*****
Posts: 759


WWW
« Reply #70 on: December 02, 2006, 12:39:09 PM »

I've had a little sneak-peak of Zak's demo.. you guys are in for a treat!
Logged

Blind's Dev Blog - www.smithbower.com/devblog/

Irc.Desolation.Org :: #TV3DLicensed :: Moderated IRC channel for all your TV3D needs :: Non-Licensed users welcome.
Zaknafein
Customers
Community Member
*****
Posts: 2670


WWW
« Reply #71 on: December 04, 2006, 12:20:13 AM »

Hum. The demo is nearly ready, but I realized a little problem. I'm using a custom release which gives me fixes with isometric cameras, and I can't release that DLL... so the code won't build on earlier DLLs!

I'll try to make a build with the current beta DLL...

Edit : Also, it has become clear that I won't have the time to finish the demo for tonight. So I'll ask for another couple of days... Smiley
Logged

zaknafein.
>> the instruction limit : my blog & samples repository! <<
Rynus_Rein
Community Member
*
Posts: 1010


« Reply #72 on: December 04, 2006, 03:46:13 AM »

Quote from: "Zaknafein"
Hum. The demo is nearly ready, but I realized a little problem. I'm using a custom release which gives me fixes with isometric cameras, and I can't release that DLL... so the code won't build on earlier DLLs!

I'll try to make a build with the current beta DLL...

Edit : Also, it has become clear that I won't have the time to finish the demo for tonight. So I'll ask for another couple of days... Smiley


_o_!
Logged

Rynus Rein
Current Project: MapX Live, Society3D
Zaknafein
Customers
Community Member
*****
Posts: 2670


WWW
« Reply #73 on: December 04, 2006, 09:05:05 PM »

The demo has been released to beta users in the beta forum. For non-beta users, here's a video featuring a wierd british electro soundtrack!

LandscapeShadowMappingFinal.avi (53Mb - XVid)
Logged

zaknafein.
>> the instruction limit : my blog & samples repository! <<
tom_namibia
Customers
Community Member
*****
Posts: 89


WWW
« Reply #74 on: June 20, 2008, 02:35:35 AM »

Hi Zaknafein,

is this demo maybe available?
I really would like to play with it, because it might help in this:

 http://www.truevision3d.com/forums/tv3d_sdk_65/bilboard_shadow-t18002.0.html

Thanks,
Tom
Logged
Zaknafein
Customers
Community Member
*****
Posts: 2670


WWW
« Reply #75 on: June 20, 2008, 08:32:48 AM »

Yep, here's the thread I was refering to :
http://www.truevision3d.com/forums/tv3d_sdk_65/landscape_shadowmapping_demo_sample-t14234.0.html;msg98240#msg98240
Logged

zaknafein.
>> the instruction limit : my blog & samples repository! <<
Pages: 1 2 3 [4]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks