Gamestudio Links
Zorro Links
Newest Posts
hello all
by jcl. 09/24/19 09:04
Right AssetsFix for trading Forex on IG?
by Andy60. 09/23/19 21:11
Converting fbx file to mdl7
by Dark_Light. 09/23/19 15:50
New system for Zorro S subscriptions
by jcl. 09/23/19 08:34
IG plugin initial release
by Andy60. 09/23/19 07:40
Any chance of PBR materials with A8?
by Dooley. 09/22/19 21:43
Levels, textures, etc for A8
by Dooley. 09/22/19 03:57
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
8 registered members (svenbob, Tamas, MatPed, Superku, kvm, jenGs, 3run, 1 invisible), 642 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Zylo, Hjuutgckk, Dark_Light, oxygenjoe, web20tpo
18292 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 12 of 14 1 2 10 11 12 13 14
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: Reconnoiter] #463685
12/21/16 14:15
12/21/16 14:15
Joined: Jul 2008
Posts: 1,968
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 1,968
Germany
Like that?
Code:
vec_set (ambient_color, vector (2, 1, 1));
	vec_set (sun_color,     vector (55, 55, 55)); //1,1,1
	// fog setting's	
	fog_color            =    1;
	d3d_fogcolor1.red    =    1;
	d3d_fogcolor1.green  =    2;
	d3d_fogcolor1.blue   =    1;
	camera.fog_start     =   20;//20;
	camera.fog_end       =  500;//150; dann 500
	//turn on shade-c's height based fog (for 100% fog set both values very high (default: 9999990 & 9999999)
	sc_screen_default.settings.fogData.x     = -20; //height fog start
	sc_screen_default.settings.fogData.y     = 150; //height fog end //125
	sc_screen_default.settings.fogNoiseScale =   5;
	sc_screen_default.settings.fogData.z     =   6;
   sc_screen_default.settings.fogData.w     =  -3;


Just guessing around here, long time ago i scripted something. frown

Another thing...
I remeber having a hard time to place good looking blood decals / splashes ( on floor for example ). Did u try already ?

Last edited by rayp; 12/21/16 14:19.

My entry...your exits
Zombies dont like pink glow slime, fact!
"We gonna rock down to electric avenue" "One way ... or anotha ..."
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
-=GOOGLE IS SKYNET=-
rayp.flags |= UNTOUCHABLE;
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: rayp] #463688
12/21/16 14:40
12/21/16 14:40
Joined: Dec 2011
Posts: 1,811
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,811
Netherlands
Yeah like that, the fog itself seems to work perfectly, just that entity fog function doesn't seem to do anything. I even tried it the shade-c example with the fog. Maybe its an unfinished function?

Quote:

I remeber having a hard time to place good looking blood decals / splashes ( on floor for example ). Did u try already ?
, from what I have gathered there is 2 ways, either get fully transparent options (from 0-100% from texture) but get glitches when decals cross each other (and possible more problems with lightning, cannot enirely remember). Or get limited transparency (0% or 100% from texture) but no glitches. I use the limited transparency (/the latter).
Bullets holes look fairly good, but blood not yet, I quess a darker red and more plain blood texture will look best.

Script:
p.material = mtl_simpleTransparentGloss; //I gave it this name for the fx code below
set(p, TRANSLUCENT);

Fx:
Code:
//------------------------------------------------------------------------------
//----- USER INPUT -------------------------------------------------------------
//------------------------------------------------------------------------------

//assign skins
#define SKIN_ALBEDO (skin1.xyz) //diffusemap
#define SKIN_ALPHA (skin1.w) //alphamap
#define SKIN_NORMAL (skin2.xyz) //normalmap
#define SKIN_GLOSS (skin2.w) //glossmap
//...

#define NORMALMAPPING //do normalmapping?

//#define GLOSSMAP //entity has glossmap?
#define GLOSSSTRENGTH 0.25 //glossmap channel will be set to this value if GLOSSMAP is not defined

#define ALPHA //entity has alphamap?
//#define TRANSPARENT //entity alpha should be interpreted as transparent/translucent?

//------------------------------------------------------------------------------
// ! END OF USER INPUT !
//------------------------------------------------------------------------------

#include <scHeaderObject>

//custom code goes here

#include <scObject>


Re: ShadeCEVO simple grass (OVERLAY) ? [Re: Reconnoiter] #464537
02/24/17 10:58
02/24/17 10:58
Joined: Dec 2011
Posts: 1,811
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,811
Netherlands
I noticed that when loading maps with low ambient color and/or sun color, Shade-c (evo) emissive shader (/glow shader) on models seems to go buggy (lightning up the whole model even when all emissive textures are black). Anyone know why this is?

Okay it seems to be related to when the textures are loaded. If I wait half a sec before spawning the previously bugged models, it does work correctly. Also if I have already placed some models of the same type, it also seems to work. So I quess there is a period of when shade-c needs to initialize and when you cannot properly create models. I dont entirely get this but anyway it works now.

Last edited by Reconnoiter; 02/24/17 12:40.
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: Reconnoiter] #464544
02/24/17 16:54
02/24/17 16:54
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline
User
BoH_Havoc  Offline
User

Joined: Jun 2004
Posts: 655
to your left
.


Someone is still using ShadeC?



...

Wow, what can i say....
I feel sorry for you? grin


Since i somehow got here (thank you, internet), lets make the best out of it wink

I see you guys had (and still have?) a hard time using ShadeC. Some of the problems were already solved in the ShadeC Wiki here:
https://github.com/BoHHavoc/ShadeC-EVO/wiki

Solutions to other problems and questions: (note: i can not test these since i do not have gamestudio installed. These are of the top of my head and from looking at the ShadeC source on github):

Q: Is it possible to use non-shadec shaders with shadec?
A: Yes. There are two options.
1. (Not the best option, but good for fast testing) Enable forward rendering support (sc_screen_default.settings.forward.enabled = 1;) and then disable deferred rendering for the entity in question and set it to the forward rendering pass instead. You do that by calling sc_skill(entity, SC_OBJECT_PASS, SC_PASS_FORWARD). To set it back to the default gbuffer pass, use sc_skill(entity, SC_OBJECT_PASS, SC_PASS_GBUFFER). If set to SC_PASS_FORWARD the entity will be rendered using any shader/material you give it using the default Acknex rendering. The entity will then be rendered AFTER all other solid objects in the gbuffer are rendered, and BEFORE rendering transparent objects (...if i remember correctly). Note though, that shadows, ssao and dof might not work correctly. You MIGHT be able to get shadows working by using sc_skill(entity, SC_OBJECT_MATERIAL_SHADOWMAP, yourShadowMaterial). See example 05 for a custom shadowmap material/shader.

2. (Best option) Port the shader to shadec. I tried to make this as simple and easy as possible (yeah, sure. hah!). Read both chapters about custom shaders in the wiki, then take a look at 05_dissolve.fx, 05_dissolveShadow.fx as well as 05_livingBloom.fx, 05_livingBloomShadow.fx in the example folder to see some examples on how it is done. Note that the xxxShadow.fx is only needed if you change the vertex positions or alpha via a shader (i.e. you change the "surface" of the model). Otherwise you wont need it since the shadow will already be correct. Also, have a look at example 05 in general to see how to use these shaders.
For full understanding of how to extend/customize a shadec shader, search for #define include_scObject in default.fx.


Q: Can i use particles with ShadeC?
A: Yes. Enable forward rendering by setting sc_screen_default.settings.forward.enabled = 1; .


Q: Can i use terrainshader XY?
A: Yes. Either port it to shadec or render it in forward mode (shadows might not work). See question above.


Q: Transparency is not working!
A: Two options here:
1. ShadeC only supports one layer of transparency. This is a technical limitation of deferred rendering. To use it, add #define TRANSPARENT to a shadec shader. This is good for things like windows, but will fail miserably when being used for grass.

2. Render the object in forward rendering. See question above on how to to that.


Q: ZNEAR is not working!
A: Yes, this is totally correct due to the nature of ZNEAR and what it does. Do not use it. Ever. It might even be a good idea to not use it in non-shadec projects.
If you want the same behaviour as ZNEAR, make a copy of the shader you use on your ZNEAR object. Then, in the shader, in the technique, set zwriteenable = false and zfunc = always. Also, set sc_skill(entity, SC_OBJECT_DEPTH, 0) to set the depthvalue of the object to a value directly in front of the camera.




No more questions i can remember, but i think those were the most prominent ones. smile
The biggest misunderstanding i think is, that most people think ShadeC can only render objects using deferred rendering. Now you should know, that you can always fall back to forward rendering for specific objects that need it. Be careful however to not overdo it. Forward rendering is perfectly fine if you don't want or don't need ShadeC lighting/shadows for an object. It is also a valid option for transparent objects that need multiple layers of transparency (grass, particles). Also, special effects (refractions, heat haze, cartoon style, etc) and 3D UI are a good usecase for this. For almost everything else you should create a ShadeC compatible shader though, since it will be faster and can make full use of all ShadeC features.



If you guys are interested you can compile a list with questions from everybody and send it to me. I will try to answer them as best as i can. We can also hook up on skype for a live Q&A / go through that list. It would also be very nice to talk to you in general smile I'm located in germany, so talking either in german or english is fine with me.
Keep in mind however, that i am very very busy with my work, so please don't be angry if i don't have enough time to answer everything in detail smile
Please send the questions and your skype name(s) to wolfgang [a.t} gentlymad.org .

I was nice seeing that people still use ShadeC. Thank you for that.



(Although i still feel sorry for you tongue )

Cheers!


Shade-C EVO Lite-C Shader Framework
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: BoH_Havoc] #464550
02/24/17 20:16
02/24/17 20:16
Joined: Dec 2011
Posts: 1,811
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,811
Netherlands
Quote:
Wow, what can i say....
I feel sorry for you?
, its not that bad! grin Using Shade-C evo now for my current project I would take it everytime over the default gs3d stuff and available normal map shaders etc. Its good for us who are not shader experts but do want to finish their gs3d projects. laugh

Also thanks for answers, most of the stuff I have already found out except for:
1) Changing camera.clip_far in the middle of a map. I want to change it when changing fog values, however it gives visual errors than (weird shadows etc). Any solution to this?

2) The ZNEAR one; in which shader do I need to put the zwriteenable = false and zfunc = always lines? Do I need to put it in the .fx file that I link to an entity material? Here maybe? (I am not so good at shader stuff tongue ):

Code:
#include <scHeaderObject>
// <-
// insert custom code here
// ->
#include <scObject>



Quote:

BONES
Set this flag if you want support for GPU Bones.
, omg I did not know this feature, after adding it to the .fx files I now have twice as much fps in my project... blush

Last edited by Reconnoiter; 02/24/17 20:31.
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: BoH_Havoc] #464551
02/25/17 12:07
02/25/17 12:07
Joined: Feb 2003
Posts: 129
RP China
2
20BN Offline
Member
20BN  Offline
Member
2

Joined: Feb 2003
Posts: 129
RP China
Originally Posted By: BoH_Havoc
.
I was nice seeing that people still use ShadeC. Thank you for that.
Cheers!


Hi, BoH_Havoc,

Thanks your support!

There are some questions:
1. How to support 2nd uv LightMap/ShadowMap with ShadeC-EVO? (Target map or skin##)
2. How to support terrain shader with ShadeC-EVO?(Mulit Texture)
3. How to support water shader with ShadeC-EVO?

Cheers!

Re: ShadeCEVO simple grass (OVERLAY) ? [Re: 20BN] #464552
02/25/17 12:39
02/25/17 12:39
Joined: May 2008
Posts: 2,090
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,090
NRW/Germany
Thats a very generous offer of yours! Thank you laugh


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: Reconnoiter] #464553
02/25/17 12:44
02/25/17 12:44
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
Originally Posted By: Reconnoiter

Quote:

BONES
Set this flag if you want support for GPU Bones.
, omg I did not know this feature, after adding it to the .fx files I now have twice as much fps in my project... blush


Hmm In my case it didn't make a difference. In my project when having for example four animated characters in the screen fps drop from 60 to around 30. After setting #define BONES in the .fx if got the same performance. Did you make any other thanges? I noticed that when disabling sun shadows fps get way higher, but not sure if gpu bones rendering is used for shadow mapping views too.


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: painkiller] #464555
02/25/17 14:57
02/25/17 14:57
Joined: Dec 2011
Posts: 1,811
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,811
Netherlands
Quote:
3. How to support water shader with ShadeC-EVO?
, have you tried using Steempipe's water shader from 2004? After adding a alpha channel to the used skybox texture it looks pretty good. Also somewhat supports shade-c evo's lights and shadows if you make its transparent enough.

Quote:
Hmm In my case it didn't make a difference. In my project when having for example four animated characters in the screen fps drop from 60 to around 30. After setting #define BONES in the .fx if got the same performance. Did you make any other thanges? I noticed that when disabling sun shadows fps get way higher, but not sure if gpu bones rendering is used for shadow mapping views too.
, yes I also set "max_bones = 1;" before the change which already helped a bit, and I must say I am using some high poly models. Like 1 with even ~12500 faces. Also, I only set it for entities like player, enemies, allies etc (entities that move around) cause I noticed it created a visible hole/glitch in a static wall model (not sure if this impacts the speed, probably not).

Re: ShadeCEVO simple grass (OVERLAY) ? [Re: Reconnoiter] #464559
02/25/17 16:07
02/25/17 16:07
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
Originally Posted By: Reconnoiter
Quote:
Hmm In my case it didn't make a difference. In my project when having for example four animated characters in the screen fps drop from 60 to around 30. After setting #define BONES in the .fx if got the same performance. Did you make any other thanges? I noticed that when disabling sun shadows fps get way higher, but not sure if gpu bones rendering is used for shadow mapping views too.
, yes I also set "max_bones = 1;" before the change which already helped a bit, and I must say I am using some high poly models. Like 1 with even ~12500 faces. Also, I only set it for entities like player, enemies, allies etc (entities that move around) cause I noticed it created a visible hole/glitch in a static wall model (not sure if this impacts the speed, probably not).


Setting max_bones to 1 improved the performance, but still no difference setting BONES or not. The model I'm using (player and three enemies) has 9616 faces and 5776 vertices, so it should perform okay.


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Page 12 of 14 1 2 10 11 12 13 14

Moderated by  Blink, Hummel, Superku 

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