Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,388 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 6 1 2 3 4 5 6
Re: How do you display shadows on invisible surfac [Re: frazzle] #135979
07/16/07 18:53
07/16/07 18:53
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I'm going to stick with my idea and give it a try when I get home.

My plan is to create my level lik I normally would, but using models and no blocks for the level. Make all models as high qality as possible, high-res textures, parallax oclusion mapping, whatever... but only render all that for one frame of every scene, then save that image as a TGA. Then all materials wil switch to the "special shader", and the last scene will be drawn on all models. The textures of the model will switch to a small 8x8 blank tex. I'll have all the quality I can get without the slow-down. I'll have an interactive 3D world as well...

We'll see how it goes...


xXxGuitar511
- Programmer
Re: How do you display shadows on invisible surfac [Re: xXxGuitar511] #135980
07/16/07 19:08
07/16/07 19:08
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Sounds quite promising, good luck Guitar but you know that the theoretical side is always easy in opposite with the practical side
I'll try to go for shadow mapping

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: How do you display shadows on invisible surfac [Re: frazzle] #135981
07/17/07 10:10
07/17/07 10:10
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Well, it works: on the left side without FFP material applied, on the right with the FFP material.



But I am not able to clip the warlock model behind the dummy mesh..

Here is the FFP I'm using, it just implements the flags which are mentioned by that guy from WME:

Code:
material orangeBrat
{
effect = "technique orangeBrat
{
pass p0
{
SrcBlend = Zero;
DestBlend = One;
AlphaBlendEnable = true;
}
};";
}



Just apply the material to every dummy mesh. I will see if I can clip the overlapped parts of the warlock model.

Cheers!

Last edited by HeelX; 07/17/07 10:11.
Re: How do you display shadows on invisible surfac [Re: HeelX] #135982
07/17/07 12:46
07/17/07 12:46
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Nice results HeelX, OB will be quite pleased so far
The mesh problem is like Mnemonic at Wintermute mentioned:

Quote:


This unfortunately also means the hidden geometry must closely match the 2D image, otherwise the depth buffer will mask the 3D character (like on this screenshot: http://www.dead-code.org/blog/wp-content/shadow2.png).

JN





I guess this can be resolved with the methode OB is trying to use and the quote I copied. Just place the parallel planes at the right position which match the position of the invisible scene where than the hand drawn art will be mapped on those planes and OB his problem should be resolved

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: How do you display shadows on invisible surfac [Re: frazzle] #135983
07/17/07 17:39
07/17/07 17:39
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
What about the addition of some other flags, such as:

zEnable
alphaBlendEnable
zWriteEnable
alphaTest
- I need to lookup these flags on MSDN and larn exactly how each works.

And have you tried removing the alphaBlendEnable from the above test? I'm wondering if it's necesary or not.


xXxGuitar511
- Programmer
Re: How do you display shadows on invisible surfac [Re: xXxGuitar511] #135984
07/17/07 17:53
07/17/07 17:53
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Well, I didn't succeeded any further..

AlphaBlendEnable is necessary for making the dummy mesh invisible. I played with zEnable and zWriteEnable but this wasn't the key, too. I also tried to create a material for the warlock character model, but there were also no fruitful results at all.

Re: How do you display shadows on invisible surfac [Re: HeelX] #135985
07/17/07 18:31
07/17/07 18:31
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
I guess that setting these render states is the only way, according to this reply from WinterMute which I qouted from one of the replies OB maded:

Quote:


Hi Ryan,

the hidden geometry indeed needs to be rendered into the depth buffer, so that the shadow volume is properly mapped onto it. In Direct3D the following render states should do the trick:

Code:


m_Device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
m_Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ZERO);
m_Device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE);




This unfortunately also means the hidden geometry must closely match the 2D image, otherwise the depth buffer will mask the 3D character (like on this screenshot: http://www.dead-code.org/blog/wp-content/shadow2.png).

JN





The red part is how it would be setted within D3D which is identical qua functionality to the code snippet HeelX posted. I've read about information that zEnable, zWriteEnable,alphaTest and alphaBlendEnable won't make any difference. Here's the information from msdn regarding render states:

msdn link

To make this error dissapear, you'll have to 'cheat' towards realtime rendering That is the only option AFAIK to resolve this problem until now. Maybe shadow mapping or shadow volumes via shaders won't be affected by invisible scene geometry but on the other hand, OB wants to avoid the shader way but I'll give it a shot though

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: How do you display shadows on invisible surfac [Re: frazzle] #135986
07/17/07 19:11
07/17/07 19:11
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States


xXxGuitar511
- Programmer
Re: How do you display shadows on invisible surfac [Re: xXxGuitar511] #135987
07/17/07 19:52
07/17/07 19:52
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Well like I said, good luck
Btw, I've been testing with the depth buffer and the results I'm getting are good but not perfect. I'll post something when I get some decent result ^^

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: How do you display shadows on invisible surfac [Re: frazzle] #135988
07/17/07 21:35
07/17/07 21:35
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Post deleted by Frazzle

Edit: wrong result, the code wasn't a solutions for the clipping issue. It just sloved the problem I noticed that when the model came close to the object with the material HeelX posted attached to it, the model became invisible but when setting the passable flag off this works as well because that way you can't penetrate the object and can't get invisible ^^

Cheers

Frazzle

Last edited by frazzle; 07/17/07 21:53.

Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Page 3 of 6 1 2 3 4 5 6

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1