Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 552 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 1
Page 6 of 19 1 2 4 5 6 7 8 18 19
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: xXxGuitar511] #120761
04/07/07 02:23
04/07/07 02:23
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline OP
Expert
xXxGuitar511  Offline OP
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Alright. This has been making me think for a while, and I'm not sure what to do.


Should static lights be faked as dynamic lights, or used for "ambience" of the model when walking in certain areas? Both are useful, but I'm not sure which one to choose...

What do you think?
single choice
Votes accepted starting: 04/07/07 02:23
You must vote before you can view the results of this poll.

xXxGuitar511
- Programmer
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: xXxGuitar511] #120762
04/07/07 07:17
04/07/07 07:17
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
'Faked as dynamic' looks by far the best. At the moment I've done some testing and I've simply checked 'dynamic' for all my lights in the level and it works rather well with this shader. Perhaps, I'll build a small (birds-eye perspective probably because of the dynamic lights) Doom3 clone game and it will show what I mean,

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: xXxGuitar511] #120763
04/07/07 11:03
04/07/07 11:03
Joined: Dec 2005
Posts: 414
Munich, Germany
R
Robotronic Offline
Senior Member
Robotronic  Offline
Senior Member
R

Joined: Dec 2005
Posts: 414
Munich, Germany
Well I used 24bit TGA for the diffuse map and 32bit TGA for the normal map.
=> no stencil shadows
=> normal map with decent specularity

If I remove the normal map or reduce it to 24 bit
=> stencil shadows
=> no normal map or plastic look

Engine version is last public beta (6.506) and my testobjects are just simple boxes (closed), placed on terrain and blocks.

Well, doing some research it turned out, I´m not the first one who has a problem with the automatic transparency thing in A6: link

I guess it has something to do with this, because the manual recommends, that for stencil shadows the entities must not be transparent.
Maybe these lines of code could solve this?

ZWriteEnable=True;
AlphaBlendEnable=False;
AlphaTestEnable=True;

These, of course, are just some ideas of a shader noob ...

Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: Robotronic] #120764
04/07/07 15:48
04/07/07 15:48
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
as far as the dynamic/ambient lights, definately dynamic, im also almost done with that map reader.

Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: lostclimate] #120765
04/07/07 23:08
04/07/07 23:08
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline OP
Expert
xXxGuitar511  Offline OP
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
@Lostclimate: Nice, I can't wait...

@Robotronic: I'g give your solution a try, but as I said, my [stencil & non-stencil] shadows are showing up, so I can't...

I'm gonna leave the poll open a lil longer until i decide. I'd like to do a combination of both, because a sort of ambience is needed somehow...


xXxGuitar511
- Programmer
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: Robotronic] #120766
04/08/07 02:32
04/08/07 02:32
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Quote:

Well, doing some research it turned out, I´m not the first one who has a problem with the automatic transparency thing in A6:




http://www.conitec.net/beta/aentity-overlay.htm

Ahh yes, the transparency problem, A7 solves this with the new my.overlay flag. It works great, I make good use of it already for my terrain shaders. If your using the beta you can try it out. This will fix alpha problems between the entity and other entities, but not necessarily within the entity itself. The lines you posted might also work.

If your having problems where is seems like your normals flipped, make sure that your first texture for your entity(the non-normalmap) has no alpha map. I think the reason for this lies in the second pass where the lighting requires the blending/alpha transparency. If it has an alpha map then its almost like all the normals of the model flips. Mabye this is a shader problem? Or it might just be how it goes. I know when you make vegetation and the such you cannot have alpha transparency or the normals do the same thing. If you do put an alpha map for the first model, and turn off alphaBlendEnable for the second pass, then the lights do not show for that pass, but the normals do not flip.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: William] #120767
04/08/07 04:39
04/08/07 04:39
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline OP
Expert
xXxGuitar511  Offline OP
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
As for static lights...

I'm going to add a switch to enable/disable the checking for static lights. I'm having unusable results with vecLight, so I must use a trace, and pass the results to the shader. This trace can be slow, so I'm goin to add an option for it. I'll let you know which flag I'll put it on. All feedback is appreciated!


xXxGuitar511
- Programmer
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: William] #120768
04/08/07 17:15
04/08/07 17:15
Joined: Dec 2005
Posts: 414
Munich, Germany
R
Robotronic Offline
Senior Member
Robotronic  Offline
Senior Member
R

Joined: Dec 2005
Posts: 414
Munich, Germany
I can just use the last public beta (A6.50.6) but it´s good to hear, that the transparency problem has been solved. I hope this overlay feature makes it into the next public update. Anyway, I was playing around with alphaBlendEnable & co. but it didn´t help. Most often my testcube just turned into something completely black.

@ xXx Guitar: I think it´s a very good idea, to implement an option for static lights. Makes this great shader even better .

Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: Robotronic] #120769
04/08/07 22:19
04/08/07 22:19
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline OP
Expert
xXxGuitar511  Offline OP
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
@Robotronic: Thanks!

And as for static lighting (again). Accoding to my above poll, I've decided I'm going to add an option [again] in the shader. You'll be able to use faking, ambience, or both...


xXxGuitar511
- Programmer
Re: Normal-Mapping Shader (The Best @ vsps2.0) [Re: xXxGuitar511] #120770
04/10/07 21:52
04/10/07 21:52
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline OP
Expert
xXxGuitar511  Offline OP
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Alright, I'm still working on this shader, and I just corrected a majot bug!

I was calculating the tangents incorrectly. This means that the faces were being lit corectly, but the bumps were getting the light direction incorrectly. I have fixed it now. It's hard to tell the difference, but it makes a big improvment in look when you figure out what to look for!

I still need to fix some of the lighting options, then I'll update the download and let you all know!


xXxGuitar511
- Programmer
Page 6 of 19 1 2 4 5 6 7 8 18 19

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | 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