Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Quad), 595 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
improve automatic shader application #306547
01/23/10 00:24
01/23/10 00:24
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
[ok]
applying shaders in WED, good idea but not really helpful for huge projects with big levels, it'd be annoying to have to click on every model and assign shaders so i do think the auto assigning via d3d_automaterial is good..

[however]
currently setting this to 1/2 and i'd have to write a material for almost every texture in the game, this is also another time consuming act plus the 15 character limit is a pain, this feature may seem ok as it is for small scenes but when it comes to a decent level with shaders on every surface then it shows just how much it could be improved.

[what am suggesting is]
i do wish there was a way i could edit some core files on how it reads the names so it'd assign materials based on for example the first 3 letters, this way i could just define some global materials that could be shared, so i could have:

SM_wall1.tga //specular metal
SW_wall1.tga //specular wall
BC_wall1.tga //bumped concrete

the i could have:

MATERIAL* SM_ ={...} //assign shader to all textures starting with SM_
MATERIAL* SW_ ={...}//assign shader to all textures starting with SW_
MATERIAL* BC_ ={...}//assign shader to all textures starting with BC_

i dont know if it can be done like that with the current system, could i edit a file? i may have to edit some core files but it'd make level creating easy because then all we'd have to do is name our textures correctly before assigning them and every map we make would automatically have shaders applied easily.. think its plausible?

for example, every element in the following screenshots has a shader applied, the two options we have now:
-click on each object and apply shaders manually which may cause problems when an object has more than one material
-write a material for every single texture in your level while making sure that the name limit of that texture plus "_nm" is under 15 characters



Re: improve automatic shader application [Re: darkinferno] #306550
01/23/10 00:42
01/23/10 00:42
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline
User
BoH_Havoc  Offline
User

Joined: Jun 2004
Posts: 655
to your left
while on the topic:
If you apply a shader to a block, and don't set it's FLAT flag, there is a huge fps drop. On the other hand, if you apply the shader through d3d_automaterial, there is no big hit on the fps.
Don't know if it's possible, but maybe add a new flag between FLAT and SHADED, where you can apply shaders without a big fps drop AND get the lightmaps? laugh

I also like darkinferno's idea a lot. Defining texture catchphrases like he mentioned and then automatically applying shaders to the corresponding textures sounds nice. Also the 15 characters limit is a little anoying, but i guess this is because of performance reasons?

regards


Shade-C EVO Lite-C Shader Framework
Re: improve automatic shader application [Re: BoH_Havoc] #306568
01/23/10 08:46
01/23/10 08:46
Joined: Jul 2003
Posts: 893
Melbourne, Australia
Matt_Coles Offline

User
Matt_Coles  Offline

User

Joined: Jul 2003
Posts: 893
Melbourne, Australia
I completely agree with everything mentioned. The character limit is a big pain and the d3d_automaterial 1/2 can be painfully slow

Re: improve automatic shader application [Re: Matt_Coles] #306617
01/23/10 16:19
01/23/10 16:19
Joined: Oct 2002
Posts: 806
Zapan@work Offline
User
Zapan@work  Offline
User

Joined: Oct 2002
Posts: 806
Maybe a dialog/plugin for wed would be greate. We've created a standalone tool sometime ago, which reads the wmp file and creates a wdl file (for our glider game) with the material defs for each textures wich gets assigned. This works very well, but the engine/shaders (a5/a6) were very slow during this time so we droped it... maybe until now laugh

Re: improve automatic shader application [Re: Zapan@work] #306690
01/24/10 05:35
01/24/10 05:35
Joined: Jul 2003
Posts: 893
Melbourne, Australia
Matt_Coles Offline

User
Matt_Coles  Offline

User

Joined: Jul 2003
Posts: 893
Melbourne, Australia
hmm that's an interesting idea, and would save the bloated wait for d3d_automaterial to do it's thing.

Re: improve automatic shader application [Re: Matt_Coles] #306821
01/25/10 07:49
01/25/10 07:49
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
As to the first problem, I agree there should be an easier way, but I don't like to control this with names. How about the following solution, switched on with d3d_automaterial: When you assign a material to a certain texture, it's automatically assigned to all blocks with this texture in the level. This won't cause a loading delay.

As to the second problem, I have to disclaim the rumor that you can get "fps drop" when applying shaders directly. Shaders are little programs on the 3D card that don't care about how they were applied. When you get an fps drop, there's something wrong, maybe with the shader, or with the level.

Re: improve automatic shader application [Re: jcl] #306854
01/25/10 12:39
01/25/10 12:39
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
yes jcl, that feature added to d3d_automaterial sounds rather good also, i could definately also work with thatm i still like the name idea though since then we wouldnt have to be navigating the world and applying materials but oh well.. your suggestion also sounds good

Re: improve automatic shader application [Re: darkinferno] #306855
01/25/10 12:43
01/25/10 12:43
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
beta page says it's already implemented on coming up version wink that was fast.


3333333333
Re: improve automatic shader application [Re: Quad] #306948
01/26/10 01:28
01/26/10 01:28
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline
User
BoH_Havoc  Offline
User

Joined: Jun 2004
Posts: 655
to your left
Quote:
As to the second problem, I have to disclaim the rumor that you can get "fps drop" when applying shaders directly. Shaders are little programs on the 3D card that don't care about how they were applied. When you get an fps drop, there's something wrong, maybe with the shader, or with the level.


Just tried it (again...).
Applying shader through d3d_automaterial = 1 => ~180-200fps
Applying shader through WED => 6-23 fps

Tried with my own shaders as well as some of the ones which come with A7.

But as it's just a rumor i guess i'm just hallucinating the fps drop, as well as the other users who have the exact same problem.
Well, i like d3d_automaterial better anyway as you don't have to rebuild the level each time. Just thought it would be a nice feature to have. wink


Shade-C EVO Lite-C Shader Framework
Re: improve automatic shader application [Re: BoH_Havoc] #306951
01/26/10 02:24
01/26/10 02:24
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
ya, seems i'll still stick to d3d_automaterial=1, i too experinced fps drop, whether its a shader/engine error, idk but either way, using a string is still alot fast plus my update_textures function always crashes...

Page 1 of 2 1 2

Moderated by  aztec, Spirit 

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