shade-c : lite-c shader project (HDR,DoF,etc)

Posted By: BoH_Havoc

shade-c : lite-c shader project (HDR,DoF,etc) - 03/23/08 18:43



Well, i told you guys i would release a first version of shade-c this week, so here it is:

shade-c version: 0.87 "FLU" BETA

I couldn't get everything done i wanted as i was (and still am) ill for the last couple of days, but some things are already implemented.

Current Features:
- High Dynamic Range Rendering
- Depth of Field with dynamic autofocus
- Easily attach more Post Processing Effects, set their mtl.skills and mtl.skins (works with the PPEs supplied with A7)
- Small library of ready to use Post Processing Effects (including heat haze, a toon- and sketch shader)
- Ready to use object shaders (including velvety, carpaint and a skin shader)
- lite-c only, no plugins are used
- easy integration

to do list:
- include dynamic hdr gamma correction
- include volumetric sunlight shader
- include volumetric particle shader
- get ambience occlusion to work
- include ambience occlusion shader
- add vecSkill vars to object shaders and write a function to easily set them
- clean up object shaders
- finish vector art shader and implement it
- add more shaders (let me know what you want):
+ "number 23"-like post processing effect
- finish manual
- fix bugs/make shade-c more user friendly/etc.
- everything else i forgot

Grab it here (There's also a compiled testapp)

I hope there aren't too many bugs in the code and typos in the manual.

Well then, enjoy and give feedback please







Posted By: HeelX

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/23/08 18:48

WHOAW

This is the right stuff at the right time. I really wanted to start in the next few hours to add these shaders on my own but you were first ^^

[EDIT]

Is there a way to switch through the shaders in the test bed?

[EDIT2]

Quote:

IMPORTANT NOTE: shade-c uses entity.skills89-99. Make sure they aren't used by your project!




This is bad. Why don't you use a linked datastructure to reduce the necessary skills to 1 ???

[EDIT3]

I noticed that you use 5 or 6 stages for HDR. Isnt it possible to reduce it to one shader? Wouldnt this also increase rendering speed?

Can s_mtl_hdrColor be used to add a color filter to the scene?

[EDIT4]

Could you please describe in short how I can extract the DOF and HDR shader from your framework to integrate them into my own?
Posted By: Quad

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/23/08 19:35

awesome, awesome, awesome, awesome. i was waiting for this.

thanks, its time to play and test what i can do with them.
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/23/08 20:11

Quote:

Is there a way to switch through the shaders in the test bed?




No, sorry. But good point, i will keep that in mind for the next version.

Quote:


IMPORTANT NOTE: shade-c uses entity.skills89-99. Make sure they aren't used by your project!

This is bad. Why don't you use a linked datastructure to reduce the necessary skills to 1 ???





What do you mean by linked datastructure? An array? Reducing the needed skills to 1 would be great.



Quote:

I noticed that you use 5 or 6 stages for HDR. Isnt it possible to reduce it to one shader? Wouldnt this also increase rendering speed?

Can s_mtl_hdrColor be used to add a color filter to the scene?




Yessum i use 6 stages.
1 stage: downsample the scene for speed reasons.
2 stage: do a highpass
3 stage: blur the screen (gaussian i think, i always mix box and gaussian)
4 stage: horizontal blur
5 stage: vertical blur
6 stage: upsample and combine hdr with the scene (tonemapping)

so basically you could cut this down to 4 stages, by not using the horizontal and vertical blur.
If you know a way to do HDR in one pass i would be more than interisted in this

s_mtl_hdrColor is a remaining of my testscene. It's not used by anything ad has no purpose. Thanks for pointing it out.
Applying a color filter to the final hdr stage sounds like a good idea however.

Quote:

Could you please describe in short how I can extract the DOF and HDR shader from your framework to integrate them into my own?




I'll have a look at it, but it shouldn't be to much work. But not today, i'm too tired.
Posted By: Pappenheimer

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/23/08 20:40

I like it very much! What I like the most is that it runs very smooth on my pc!
Posted By: HeelX

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/23/08 20:49

Quote:

No, sorry. But good point, i will keep that in mind for the next version.




Good testbeds allow the user to see everything your <insert app.. in this case shade-C> features. If you are too tired to make a super-adjustable thing, make different demos or different "pages"/"scenes" with different shaders.

Quote:

What do you mean by linked datastructure? An array? Reducing the needed skills to 1 would be great.




It seems that you are storing data in these skills. Though, saying the user that these skills are unavoidable used by shade-C makes a bitter taste on the tongue :-) I was in same situation some weeks ago: for a customer I made a plugin. At first there were only 6 skills I needed, after some development iterations I used over 30 skills to save and log running data which very necessary and not able to be reduced anymore. So I created a struct which holds the data and write the adress of the struct into only one skill. The co-routine which works on that entity with this data than restores by casting each frame a pointer to that datastructure. To remove the entity I wrote a special function which checks if the linking skill is != 0. If yes, the entity is using that plugin and the linked datastructure, so it removes it first and after that ent_remove is called. Easy, isnt it?

Quote:

If you know a way to do HDR in one pass i would be more than interisted in this




I will investigate that later when I figured out how to rip HDR from your "framework".

Quote:

Applying a color filter to the final hdr stage sounds like a good idea however.




That would be nice if you can add this comes in handy when you are programming day/night cycles, like giving the scene a blue touch at night and a warm orange tone when its sunrise.

Quote:

I'll have a look at it, but it shouldn't be to much work. But not today, i'm too tired.




Thanks!

[EDIT]

Maybe you can add a function that removes all stages.
Posted By: frazzle

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/23/08 20:51

As it's still Easter here in Belgium, this is a nice gift indeed (Altought this doesn't beat the major chocolate bunny I got this morning )
Great work man but I can only rate you once ^^

Cheers

Frazzle
Posted By: Pappenheimer

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/23/08 21:33

Quote:

Quote:

Applying a color filter to the final hdr stage sounds like a good idea however.



That would be nice if you can add this comes in handy when you are programming day/night cycles, like giving the scene a blue touch at night and a warm orange tone when its sunrise.



Reading this it comes to my mind: what about fog, do your shaders work with fog, too?
Posted By: JJJohan

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/24/08 02:09

Agh, it doesn't work for me .

I'm running gamestudio pro a7.

When I try to run my game it says:

Code:

Error in 'MAIN' line 13: 'var' undeclared identifier

< var s_rtScale = 256; //render-target size>

<include ^s_shadeC.c>;>
MAIN.WDL 1:2 (): Script error s_shadeC.c



All I did was include the s_shadec.c file and call s_initshaders
Posted By: mpdeveloper_B

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/24/08 03:10

this is cool, now if only you could take the sketch shader, and add the models skins to it with toon shading, it'd be perfect, also since i don't have lite-c i can't use this, but when i get a7 i'll probably get it on the first day

edit: i noticed that you kinda did it with the toon shader, but maybe witout bloom it would look better
Posted By: William

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/24/08 08:45

Thank you very much for releasing this! I tried out a few of the shaders already. Although, I am having problems with a few that require the depthmap. For some reason I think it is rendering my depthmap as pretty much all black. In the DOF shader, the entire screen is blurred to the max, same with the haze shader. So I tried substituting the rendered depth map for one I made quickly in PS, to make sure this was a depth map problem, and it worked fine(white showed no blur, blacked showed much). But I need the depthmap to be rendered real-time. I foudn that if I change this line to this in the s_rDepth.fx:

technique Depthmap
{
pass Pass0
{
cullmode = none;
alphablendenable=true;
zwriteenable=true;
// Lighting = true;
fogEnable = false;

VertexShader = compile vs_2_0 ShadowMapVertexShader();
PixelShader = compile ps_2_0 ShadowMapPixelShader();
}
}

It will render the depthmap partly better. All my texture are 32bit .tgas on my models in the test scene. But either way, no matter how much I mess with these variables:


Code:
 //DOF
// my.skill90 = 1 => object will always stay sharp
var s_bDOF = 1; //activate/deactivate dof
var s_dofBits = 32; // 16/32/64 dof bitdepth
var s_dofParams[3] = {55450, 420, 2.5}; //x = focal plane depth "area of sharpness" | y = focal plane pos | z = blurstrength
//

//VOLUMETRIC LIGHT
// my.skill89 = 1 => object is affected by volumetirc light
//

var s_maxDepth = 55400;
//Sets the scene depth. Setting this to a higher or lower value has no effect on the shaders except rendering the
// scenedepth of course. If you write a custom shader and need a depthmap, change this value according to your needs.
// This will most likely be used by the ambience occlusion shader in the future (if i ever get it done, that is ;) )



I cannot seem to get a DOF effect that is sharp in the front, and blurry in the back. It's just a blurry screen, or a blurry screen with some sharpness in an odd area... is there any way to output the depthmap, to see exactly what it's rendering? Or maybe it's something else? My models in my scene are very large, and are constructed a long way from their origin in MED, I don't know how a Depth Map is rendered or if this would be a problem...
Posted By: DoC

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/25/08 10:04

heavy o.O
but all now in lite-c ... the end for wdl ..damnit... why conitec why you had start with that hellthing ._.

well, i get start learning lite-c...
Posted By: PadMalcom

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/25/08 12:09

I need a pro... :'(

@Doc: The earlier you get used to Lite-C the faster you'll start to prefer it Same happend to me.
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/25/08 13:10

Quote:

It seems that you are storing data in these skills. Though, saying the user that these skills are unavoidable used by shade-C

makes a bitter taste on the tongue :-) I was in same situation some weeks ago: for a customer I made a plugin. At first there

were only 6 skills I needed, after some development iterations I used over 30 skills to save and log running data which very

necessary and not able to be reduced anymore. So I created a struct which holds the data and write the adress of the struct

into only one skill. The co-routine which works on that entity with this data than restores by casting each frame a pointer to

that datastructure. To remove the entity I wrote a special function which checks if the linking skill is != 0. If yes, the

entity is using that plugin and the linked datastructure, so it removes it first and after that ent_remove is called. Easy,

isnt it?




I only understood half of it, but i will have a look at it again when i'm less dizzy Reducing the needed skills to 1 is a must!

Quote:


Quote:

I'll have a look at it, but it shouldn't be to much work. But not today, i'm too tired.



Thanks!




Alright here goes:
For HDR you have to create 6 views (or less if you only blur it once or twice).
1st view => s_hdrDownsample.fx : applies a 4x downsample
2nd view => s_hdrHighpass.fx : does a highpass for getting the bright parts of the scene
3rd view => s_hdrBlur.fx : blurs the highpass
4th & 5th view => s_hdrHBlur.fx & s_hdrVBlur.fx : blurs it even more
6th view => s_hdrTonemap.fx : upsamples the bloom (we did that in the last 5 views), combines it with the original scene and does tonemapping

the size of view 1-5 has to be a power of 4 (256x256, 512x512, depends on your game's resolution). view1-5.bmap also needs to be a power of 4 (same as size)

s_hdrHighpass.fx vecskill1.x => sets the bloomstrength (range: 0-1)
s_hdrBlur.fx & s_hdrHBlur.fx & s_hdrVBlur.fx vecskill1.x => sets the blurstrength
s_hdrTonemap.fx vec.skill1.xw => x: applies gamma correction w: size of view 1-5

camera.stage = view1;
.
.
view5.stage = view6;

that should be it (for HDR)


DoF:
4 views for dof + 1 view rendering the depthmap (s_rDepth.fx)
1st view => s_dofDownsample.fx : 4x downsample, you know the drill
2nd & 3rd view => s_dofHBlur.fx & s_dofVBlur.fx : blur it and apply anti edge bleeding
4th => s_dof.fx upample the blurred view, combine it with the original scene using the depthmap

again, view 1-3 have to be a power of 4 and 256² oder 512² in size/bmap.

s_dofHBlur.fx & s_dofVBlur.fx vecSkill1.x => blurstrength
s_dof.fx vecSkill1.w => size of view1-3 |
texture TargetMap; //Blurred Scene
texture mtlSkin1; // original Scene
texture mtlSkin2; // Depthmap

s_rDepth vecSkill1.xyz => x = focal plane pos | y = focal Plane depth / area of sharpness | z = if you set this to 1, the object will be rendered white (=sharp) all the time.
The DoF-Depthmap gets rendered to .a ! s_rDepth also outputs a "normal" depthmap to rgb. you can set its values with vecSkill5.xy (x maxDepth | y focal plane)

camera.stage = view1;
.
.
view3.stage = view4;

and thats it for dof.
I hope i didn't forget something.



Quote:

edit: i noticed that you kinda did it with the toon shader, but maybe witout bloom it would look better




Yeah, i have HDR and DoF activated on this shot. If you deactivate them there won't be any bloom But thanks for pointing it out, i will write a note after "Cartoonshader" on the site and also upload a new picture.

Quote:

I need a pro... :'(




I don't even have A7 Pro myself. All you need is A7 Com



@William:
I have no idea whats happening here. Could you try setting s_dofParams to something like this:
var s_dofParams[3] = {900, 80, 2.5};

and then calling s_dofDynFocus(30,10000,1); after s_initShaders()?
If everything works out, every object you look at should become sharp.

To output the Depthmap you can use this:
open up s_showRT.fx, find this line
float4 Color = tex2D(smpSource,(Tex.xy));
and insert this after it
Color.rgb = Color.a;

Now call this after s_initShaders();
s_ppe(1,"s_showRT.fx",nullvector);
s_ppeTex(1,1,s_bmap_depth);

This should output the DoF-Map.
Also please make sure you have set s_bDoF = 1 before callign s_initShaders(). If you don't want to set s_bDoF, please call s_initDepth() so the depthmap gets rendered.



cheers and thanks for all the feedback. I see i have lots to improve
Posted By: PadMalcom

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/25/08 13:16

As long as Conitec doesn't lower the prices for students I will keep my Extra! But Shaders are so great that I'm really thinking about investing now

Thanks again for the code, it helps a lot to understand the use of shaders!

P.S. The directX dll is missing in your sample project...
Posted By: HeelX

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/25/08 17:27

Thanks for working it out. I will tell ya when I have figured out something.

Here is a snippet how to associate datastructures with entities:

Code:
// some random datastructure

typedef struct ZUZU {
char frame [128];
var speed;
var mode;
} ZUZU;

// associate datastructure

ENTITY* ent = ent_create(...);
ZUZU* dingDong = ...
ent->skill[10] = (long)((void*)dingDong); //link datastructure with skill

// retrieve datastructure

ZUZU* fooBar = (ZUZU*)(ent->skill[10]);


Posted By: William

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/25/08 21:53

I checked out the depthmap and noticed that all particles render as black. So I turned off particles -

s_view_Depth.clip_near = 0;
set(s_view_Depth,NOSHADOW);
set(s_view_Depth,NOPARTICLE);

and I can see that the depthmap is completely black if in the shader it is like this -

technique Depthmap
{
pass Pass0
{
cullmode = none;
//alphablendenable=true;

VertexShader = compile vs_2_0 ShadowMapVertexShader();
PixelShader = compile ps_2_0 ShadowMapPixelShader();
}
}

or completely rendered white if it's like this -

technique Depthmap
{
pass Pass0
{
cullmode = none;
alphablendenable=true;

VertexShader = compile vs_2_0 ShadowMapVertexShader();
PixelShader = compile ps_2_0 ShadowMapPixelShader();
}
}

I don't know what the cause of this is... I'm pretty sure I had a depthmap shader working in my project before. But I can't seem to figure out this one, I turned of fog too, but that doesn't seem to be the problem. Changing the values for the dof effect don't seem to do anything.
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/27/08 00:22

@ HeelX: Thanks! This seems familiar, i think i did something like this way back in school. I'll see if i can get it working

@ William: Again, i have no idea what might be the cause of this...could you send me a sample project where the depthmapshader isn't working?
Posted By: JibbSmart

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/27/08 08:11

if you're using a floating-point depthmap, perhaps William's problem is hardware incompatibility.

julz
Posted By: William

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/27/08 08:36

Hmm, but his demo seems to run fine for me. And I'm using a fairly standard card(7800 gtx). I sent him a test level though.
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/27/08 15:11

I'm not using any fp textures for the moment. But you can change the textures to a floating texture if you want (just change the vars according to the manual) and the shaders will use it.

William's problem had to do with a watershader he's using. The whole depthmapshader got clipped away. I have to write a note in the manual about that.

I also just noticed the depthmap shader isn't supporting textures with an alpha channel. Expect a fix for this soon
Posted By: Slin

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/27/08 20:25

Very nice contribution!
Your system to manage postprocessing remembers me a lot at the one sylex3 uses which is alright but a bit uncomfortable because you need to know the already taken numbers.
Having used sylex3 for some time as well as having seen quite some big but unflexible contributions, I am know working on a postprocessingpack for some time trying to avoid those mistakes. Having some problems with getting the average screenbrightness for hdr I am awaiting your solution

For transparancysupport for the DoF, the easiest and as I think the only real solution ist to simply use alphatesting.
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/28/08 18:11

New version available for download

Quote:

Recent changes:
v0.88
- Depthmap shader now supports transparent textures
- Depthmap now is stored in s_bmap_depth (R) and dof-depthmap in s_bmap_depth (G)
- Fixed a bug in the depthmap shader which caused clipping of the depthmap
- Added function s_ppeReset(num) to reset/remove a custom post processing effect
- Added vecSkill1.z to s_P_heatHaze. You can now change the "smoothnes" of the heat haze effect when using the depthmap as hazemap. Have a look at the manual for more information.




Get it here

Quote:

Very nice contribution!
Your system to manage postprocessing remembers me a lot at the one sylex3 uses which is alright but a bit uncomfortable because you need to know the already taken numbers.
Having used sylex3 for some time as well as having seen quite some big but unflexible contributions, I am know working on a postprocessingpack for some time trying to avoid those mistakes. Having some problems with getting the average screenbrightness for hdr I am awaiting your solution




Yeah it's kinda like sylex. But if you are a more advanced shader user you don't have to use the s_ppe* functions and make use of the given stages/bmaps instead. However i'm open for any suggestions
If you are interisted in merging your shaderpack with shade-c, please drop me a line in icq. I think it would be nice to just have one shaderpack around instead of 2 different packs that MAY not work together.
About the hdr gamma: I had it working once, no idea why it isn't working anymore. This is really giving me headaches.
Posted By: BoH_Havoc

Fire in the hole! - 03/29/08 01:09

Coming up next:








Don't expect another release for a couple of days. I have some other stuff to finish first that's not related to shade-c.
Posted By: DavidLancaster

Re: Fire in the hole! - 03/29/08 08:21

That is really awesome! Thank you!

Just out of curiosity, may I ask how you baked the lightmaps? Using Max?
Posted By: Quad

Re: Fire in the hole! - 03/29/08 09:43

this is avesome .
Posted By: fogman

Re: Fire in the hole! - 03/29/08 14:33

Do you use multiple uv-sets for lightmapping?
I don´t have the time atm to get into this awesome contribution, but the demo looks very promising.
Posted By: mpdeveloper_B

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 03/29/08 15:07

Quote:

Quote:

edit: i noticed that you kinda did it with the toon shader, but maybe witout bloom it would look better




Yeah, i have HDR and DoF activated on this shot. If you deactivate them there won't be any bloom But thanks for pointing it out, i will write a note after "Cartoonshader" on the site and also upload a new picture.





actually, the more i think about it, i don't like the toon shader, the sketch shader makes it look TOO outlined, and it looks low quality. I did see a toon shader from a game recently that had toon shading along with shadows that were just sketch lines, they were thin but there was alot of them, i can't remember the name of the game but it was one of the coolest toon shaders i've ever seen
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 04/01/08 11:53

 Quote:

Just out of curiosity, may I ask how you baked the lightmaps? Using Max?


I used Cinema 4D R9.6 for this. max's gui is too complex for my stupid brain ;\)

 Quote:
Do you use multiple uv-sets for lightmapping?


I would love to, but no. The lightmap is baked to the diffuse map.

 Quote:
I did see a toon shader from a game recently that had toon shading along with shadows that were just sketch lines, they were thin but there was alot of them, i can't remember the name of the game but it was one of the coolest toon shaders i've ever seen


If you ever come across this game again, please tell me it's name or show some screens. I'm always searching for some nice looking shaders \:\)
Posted By: VeT

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 04/28/08 12:57

with a help of function

 Code:
void s_ppe_change(num, var* skills){
	
	if(num == 1){
		if(s_bHDR == 1 && s_bDOF != 1){
			s_view_hdrCombine.stage = s_view_ppe1;
		}
		if(s_bDOF == 1){
			s_view_dof.stage = s_view_ppe1;
		}
		if(s_bHDR + s_bDOF == 0){
			camera.stage = s_view_ppe1;
		}
		s_mtl_ppe1.skill1 = floatv(skills[0]);
		s_mtl_ppe1.skill2 = floatv(skills[1]);
		s_mtl_ppe1.skill3 = floatv(skills[2]);
	}
	if(num == 2){
		s_view_ppe1.stage = s_view_ppe2;
		s_mtl_ppe2.skill1 = floatv(skills[0]);
		s_mtl_ppe2.skill2 = floatv(skills[1]);
		s_mtl_ppe2.skill3 = floatv(skills[2]);
	}
	if(num == 3){
		s_view_ppe2.stage = s_view_ppe3;
		s_mtl_ppe3.skill1 = floatv(skills[0]);
		s_mtl_ppe3.skill2 = floatv(skills[1]);
		s_mtl_ppe3.skill3 = floatv(skills[2]);
	}
	if(num == 4){
		s_view_ppe3.stage = s_view_ppe4;
		s_mtl_ppe4.skill1 = floatv(skills[0]);
		s_mtl_ppe4.skill2 = floatv(skills[1]);
		s_mtl_ppe4.skill3 = floatv(skills[2]);
	}
	if(num == 5){
		s_view_ppe4.stage = s_view_ppe5;
		s_mtl_ppe5.skill1 = floatv(skills[0]);
		s_mtl_ppe5.skill2 = floatv(skills[1]);
		s_mtl_ppe5.skill3 = floatv(skills[2]);
	}
	if(num == 6){
		s_view_ppe5.stage = s_view_ppe6;
		s_mtl_ppe6.skill1 = floatv(skills[0]);
		s_mtl_ppe6.skill2 = floatv(skills[1]);
		s_mtl_ppe6.skill3 = floatv(skills[2]);
	}
}


its possible to make funny zoom
 Code:
// in main
s_ppe(1,"s_P_radialBlur.fx",vector(0.5,0.5,0.01));

// in cam
var blur_rate;
		if (mouse_right == 1) 
		{ 
			camera.arc = max(camera.arc - time_step*3, 30); 
			blur_rate = max(blur_rate - time_step/3, 0.05);
		} 
		else 
		{ 
			camera.arc = min(camera.arc + time_step*5, 60);
			blur_rate = min(blur_rate + time_step/5, 0.01);
		}
		s_ppe_change(1,vector(0.5,0.5,blur_rate));

Posted By: mpdeveloper_B

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 04/28/08 14:27

 Originally Posted By: BoH_Havoc
If you ever come across this game again, please tell me it's name or show some screens. I'm always searching for some nice looking shaders \:\)


i didn't find the exact one, but i did find a toon shader that makes it look exactly like an anime (and my new favorite :P ):

Naruto Ultimate Ninja storm, here's a trailer:

http://www.gametrailers.com/player/29216.html
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 04/28/08 19:21

That's an object based shader, not a post processing effect \:\)
But it does look cool non the less. I'll see what i can come up with in the future. Thanks for the link \:\)
Posted By: Quad

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 04/28/08 20:37

im also interested in such shader \:D

(i was more likely interested in team-fortress-two-shader, i think if this shader produced -the one in the video-, that tf2 shader can be derived from it by adding in to it)
Posted By: mpdeveloper_B

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 04/28/08 23:28

 Originally Posted By: BoH_Havoc
That's an object based shader, not a post processing effect \:\)
But it does look cool non the less. I'll see what i can come up with in the future. Thanks for the link \:\)


that's what i was hoping for \:\) unless you could do that with a ppe
Posted By: Ilidrake

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/01/08 05:01

I've really been having a hard time implememnting these shaders. I'm kinda new to lite-c so it's probably me. How do I include this in my project? It has a simple explanation in the manual but i keep getting an error on line 13 of your shader code.
Posted By: Martek

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/01/08 19:45

Hi,
in an other thread someone said, shader can be used by every A7 version.
I've got the Extra version and wonder if I can use shader.
I tried it with C-script long time ago and I get an error. Now I treid
it with Lite-C and now I get no error.

So can I use Shader with my A7 Extra version?

Mfg, Martek
Posted By: Quad

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/01/08 20:00

shaders are com+ afaik.
Posted By: Martek

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/01/08 21:37

But why get I no error message?
Posted By: Quad

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/01/08 21:50

http://www.conitec.net/english/gstudio/order7.php

page says it is not supported by extra. I dont know why it doesnt gives any error message i never tried shaders with lower GS versions.
Posted By: VeT

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/06/08 22:16

man, are you alive? \:\)
how are you, what is the news with shade-c?
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/07/08 15:03

well, i'm alive and kickin' ;\)
But i haven't had much time to work on shade-c in the last weeks as i have some personal stuff going on. I will most likely continue working on shade-c in june.
As for new effects:
Yes, i have some new things and some of them are already working quite good. But i won't release a new version until they work the way i want. I also wan't to change shade-c so it makes use of structs instead of skills as heelx suggested.
To name some of the new things i was working on in the last weeks/months:
dynamic gamma correction for the hdr shader (i'm this close to get it done finally)
Soft Stencil Shadows (PPE)
different kinds of toon shaders (PPE and object based)
advanced normalmapping shaders
team-fortress-2-like character shader
some shader "studies" which i might include as they turned out kinda nice

some screens:
scene without any shaders



First try at TF2 shader



PPE toon shader + tf2 shader



PPE toon shader



object based toon shading



Gooch shading + PPE toon shader



Some screens of my demo app (guess you have to see it in motion to actually notice the new stuff ;\) )










Well, thats it for the moment. Nothing really fancy, but i kinda like it \:\)
Posted By: Quad

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/07/08 15:36

awesome.
Posted By: MMike

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/08/08 16:51

this is just for .. c.lite right?
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/08/08 18:48

Yes, this is A7 Com/Pro in lite-c mode only.
Posted By: Helghast

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/19/08 13:56

works like a charm in my current lite-c program...
one question though, i kinda hacked DOF into a new script (for my project to have more overview), but the area in the DOF "area of sharpness" is being filled with black... why is this, and how can i change that...

I can upload a screenshot if you want.

regards,
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/19/08 14:02

Yes, please upload a screenshot as i don't know exactly whats wrong smile
Posted By: Helghast

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/19/08 14:17




as you can see, the focus plane has black fog in it :S
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/19/08 17:01

Looks like you didn't pass the original scene to the dof shader, so the sharp parts are just shaded black as there is no texture.

from s_dof.fx
Code:
texture TargetMap; //Blurred Scene + Depth
texture mtlSkin1; // Scene
texture mtlSkin2; // Depthmap

Posted By: Helghast

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/19/08 17:35

Originally Posted By: BoH_Havoc
Looks like you didn't pass the original scene to the dof shader, so the sharp parts are just shaded black as there is no texture.

from s_dof.fx
Code:
texture TargetMap; //Blurred Scene + Depth
texture mtlSkin1; // Scene
texture mtlSkin2; // Depthmap


i did have these, all i did was take the parts that arent DOF related from the .c file, and pasted all that into my own project.
so i pasted the .fx files 1 on 1, as they were there already.
i didnt change any of the .fx files, so it's probably something in the .c files, but i have no idea what...

regards,
Posted By: Helghast

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/19/08 21:45

sorry @ double post...

but when i include shade-c as you gave us (full project), i DO get the wanted result!


however, i dont want to include all these things into my project, i tried ripping that DOF bit out (obviously failed). It would be awesome if you could provide me such a standalone .c file, or atleast maybe point me out what i have done wrong (i can send you my DOF.c).

regards,
Posted By: mpdeveloper_B

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 05/20/08 19:55

some critiquing:

TF2 shader: looks ok, it's getting there. Not a bad job.
PPE toon shader: it's a bit bright, and in my opinion needs a few more color change "lines".
Object based toon shader: I take it you're going for the naruto shader i sent laugh so far it's looking good, it just needs a few tweaks, and if you can try to make the models look 2d using the shader, you'd have the full effect.
Gooch: i've never used this shading, so i'm guessing this is the proper effect. either way it looks good.
Full scene with shaders: Wow! very nice, everything looks fantastic.

Overall, stuff's looking like it's turning out well, keep it up. smile smile
Posted By: VeT

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 06/09/08 20:35

man, dont keep silence, we are worring about you laugh
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 06/09/08 21:44

Hehe, don't worry. ^^
I continue work on shade-c last week. I had a look at all the code and i think that i'll rewrite most (if not all) of it. Shouldn't take too long as the shaders are already there. Rewriting the whole thing should lead to a small performance boost (that is if everything works out as planned wink ) and to better usability.

I think the whole thing should take about a week or two (i also want to finally finish the volumetric particle shader so i can show you some new stuff wink ).
Posted By: VeT

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 06/16/08 07:51

also, if you can, please, add refraction shader for glas - effects
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 06/19/08 22:45

Quote:
also, if you can, please, add refraction shader for glas - effects


I will have a look into it smile
Posted By: mpdeveloper_B

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 06/25/08 01:51

so how is the "naruto" style shader going?
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 06/25/08 14:36

I haven't touched the naruto-style shader in a while. I'm still making changes to the "framework" so it's easier to use. Additionally exams are comming up and i also have to write some tests to apply to a new university as a media designer/game designer. So there isn't much time at the moment.

However i already have an idea on how to "flatten" the model so it looks more cartoonish. Now the question is if i can fit all the code in a ps 2.0 shader. laugh
So all in all, i haven't forgotten about it. smile It's just that i didn't had much time during the last week and won't have much during next week. Holydays are just 3 weeks away though, so i will finally have the time to do all the stuff i wanted to do a long time ago smile


While i'm at it: I got quite a load of e-mails over the last weeks in which i'm asked to implement new stuff, do new shaders or just got feedback. I just want to say thanks for all the mails you guys sent me and will try to implement as much as i can in the next release! Keep them' mails coming! wink
Posted By: mpdeveloper_B

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 06/25/08 16:03

cool, BoH, it would be a plus if you could also get that shader to work with A6, all your other object based ones do. That's the shader i'm looking for in this project laugh . I'd have to say great work on your shaders, i just wish the s_metal.fx supported dynamic lights :P .
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 06/25/08 18:46

I think it'll work with A6 once finished as it's not a post processing effect.

Quote:
i just wish the s_metal.fx supported dynamic lights :P .


heh yeah laugh The object-shaders included in the current version support only one dynamic light, or only the sun, or nothing laugh
But now you mention it i totally forgot about fixing these so they support dynamic lights and the sun. I'll add that to my to-do list so i won't forget it a second time smile Thanks for pointing it out ^^

Posted By: mpdeveloper_B

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 06/26/08 01:40

Cool. Sorry if I sounded a bit demanding laugh it's just that I'd love to add that "naruto" shader to a game we're (MangaPage) working on right now, granted, that may not happen but anyway. laugh
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 06/26/08 15:35

Hehe, no problem smile After all it does say "- add more shaders (let me know what you want)" in the manual. I'm more than happy about all the suggestions and feedback you guys give me. It kinda shows me that there are some users here that do like shade-c and are interisted in new versions smile

So keep the demands coming laugh
Posted By: mpdeveloper_B

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 06/26/08 16:02

well think about it, it's more or less the biggest shader project, and considering that games need shaders to survive in the next-gen market, it'll definately be popular. One last request for the naruto shader, could you add support for dynamic lights? By the way thanks, continue your great work laugh
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 06/27/08 15:11

The shader currently reacts to one dynamic light and is lit by 5 additional dynamic lights in a 2nd pass. I think that should be sufficent for the moment smile
Posted By: mpdeveloper_B

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 06/27/08 15:40

actually that's great laugh
Posted By: BoH_Havoc

car-/metal- & toonshader - 06/27/08 22:33

Played around a bit with toonshading.
But first for something completely non toon shading i build along the way:

no shader


carpaint-/metalshader



Now for the toon stuff
I had a look at the naruto game again and tried to come as close to it as possible. I think this could be it:



And the same thing with rim lighting for those mechas out there smile



(I DID NOT CREATE THOSE MODELS! They were taken from 3dxtras and turbosquid)

So what do you think mpdeveloper_B, is this it? I guess with the right art you could create the same style as shown in the naruto game smile

[edit] hmmm...i just thought of adding some kind of normalmapping to the toonshader to get a little extra detail without loosing the toon look...let's see how this turns out... laugh
Posted By: mpdeveloper_B

Re: car-/metal- & toonshader - 06/27/08 23:27

Wow! It looks great, just a couple of questions:

- does it use a toon map like most toon shaders do, so the shine could be modified?
- what shader model does it support?
- how is the framerate in fullscreen?
- is it possible to modify how thick the outline is?

Overall you've just about got it. As a matter of fact, the mech shader is so good i'd think about a patch for PreVa laugh

if you make the normal-mapping i'd make it optional, a second version if you will. It looks like you got the 2d pass perfect though, it definitely has potential laugh . Both the shaders look great, there's just 1 issue. The black shadow around some parts is one, but if it uses a toon map this could be changed.

Overall they look great, and look better than most toon shaders, i just think that if you could do that one thing, it'd be perfect.
Posted By: Quad

Re: car-/metal- & toonshader - 06/28/08 09:12

carpain/metal looks good.

it looks a little like tf2(i guess becaus of the shape of the model).

and btw, how is tf2 shader going?
Posted By: Slin

Re: car-/metal- & toonshader - 06/28/08 09:17

The shader on the car looks awsome, what does it look like on a model with less polygons?
The toonshaders are nice as well but I am not too much a fan of that cartoon look :P But anyways if the artwork fits every style can look good wink
Posted By: Machinery_Frank

Re: car-/metal- & toonshader - 06/28/08 09:40

The rim-lighting looks very good (similar like AO lighting). If you combine the rim-lighting with good textures then it can create great visuals.

The cartoon shader is perfect and could fit well to some nice kids games.

The car looks like it has serious rendering problems in some areas.

Posted By: mpdeveloper_B

Re: car-/metal- & toonshader - 07/09/08 20:13

how are things with shade-c going? you haven't posted an update in a while...
Posted By: BoH_Havoc

Re: car-/metal- & toonshader - 07/10/08 01:31

Well, the way things are going right now i think i will be able to finally release the next version of shade-c around the end of august. I'm currently making some additional changes to the "framework" and am playing around with some new shaders i got my hands on. Also while working on an oceanshader i accidentially stumbled over a possible solution to get the dynamic gamma correction for hdr working. Please don't ask how an oceanshader relates to dynamic gamma control, it really just was a lucky accident wink Now if i get more accidents like this i might be able to release the next version even sooner laugh
Posted By: mpdeveloper_B

Re: car-/metal- & toonshader - 07/10/08 15:03

:P ok then, it sounds like it's going well. You never answered my questions though laugh
Posted By: BoH_Havoc

Re: car-/metal- & toonshader - 07/10/08 21:19

Meh, sorry about that whistle

Quote:

- does it use a toon map like most toon shaders do, so the shine could be modified?


Nope, at the moment you just change a value in the shader. A lookupmap is a good idea though, as it's way more flexible. I'll change the shader accordingly.

Quote:
- what shader model does it support?


It's vs/ps 2.0 at the moment. I think this can be changed to vs 1.0 and ps 1.4 as the shader isn't very complex. I just start all my shader in vs/ps 2.0 as they are more convenient to write this way.

Quote:
- how is the framerate in fullscreen?


Depends on the model/scenecomplexity. It's definately not a frameratekiller smile

Quote:
- is it possible to modify how thick the outline is?


Yes, this can be easily changed in the shader.
Posted By: BoH_Havoc

shade-c : lite-c shader project (HDR,DoF,etc) - 07/17/08 23:49

Just thought i would post my to-do list for the next release:

- ocean shader (refraction+reflection depending on view angle and water depth, vertex noise waves, foam depending on water depth and waves, sun reflection, real time water depth calculation) - 90% (i might post a demo in a few days, it's really nice to look at smile )

- create ps 1.4 and ps 3.0 versions of the watershader - 0%

- dynamic cloud shader (clouds generated by perlin noise, normalmapping for depth and additional detail) - 25%

- various toon shaders (add lookup map, port to ps 1.4 if possible) - 75%

- volumetric particles - 85%

- fix diffuse lighting error on carshader - 0%

- optimize framework - 60%

- adjust some values of/rewrite the bloom shader - 0%

- adjust some values of/rewrite the depth of field shader - 0%

- add support for multiple dynamic lights to all object shaders - 75%


I think that's about everything there's left to do for the next release.

Please note that the next version of shade-c might not be compatible with former versions. While rewriting the code some parts have changed. I'll try my best to make it compatible with the old version so you don't have to rewrite your scripts, but i can't guarantee it. I'm really sorry about that, but some things just had to be changed as they were unefficient or just plain stupid wink
Posted By: Matt_Coles

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/17/08 23:53

sounds great, especially looking forward to seeing your new water shader smile
Posted By: mpdeveloper_B

Re: car-/metal- & toonshader - 07/18/08 17:03

Originally Posted By: BoH_Havoc
Nope, at the moment you just change a value in the shader. A lookupmap is a good idea though, as it's way more flexible. I'll change the shader accordingly.

Cool, it would be more flexible.

Originally Posted By: BoH_Havoc
It's vs/ps 2.0 at the moment. I think this can be changed to vs 1.0 and ps 1.4 as the shader isn't very complex. I just start all my shader in vs/ps 2.0 as they are more convenient to write this way.


You say it supports dynamic lights as well? If so then 2.0 is just fine.

Originally Posted By: BoH_Havoc
Depends on the model/scenecomplexity. It's definately not a frameratekiller smile


That's always nice to hear smile

Originally Posted By: BoH_Havoc
Yes, this can be easily changed in the shader.


I figured as much, it wouldn't be a good toon shader without that ability smile

I just have three last questions:

What is it that causes the black areas on the model? Not the outline, the black shading.

Is this because of the shading?

If so would it be easily modified through a toon map?

BoH, you've done a great job and it's nice to hear what's going on with shade-c. Looking forward to your object shaders smile

edit: Would you mind if I added shade-c to our For Developers section on itbgames.com?
Posted By: BoH_Havoc

Re: car-/metal- & toonshader - 07/19/08 13:52

Quote:

What is it that causes the black areas on the model? Not the outline, the black shading.

Is this because of the shading?

If so would it be easily modified through a toon map?


I don't know exactly what you mean but i guess you are talking about the self shadowing/diffuse ligthing? If so, then this can be changed through the lookupmap. Maybe post a screenshot and mark the part your are talking about? smile

Quote:
edit: Would you mind if I added shade-c to our For Developers section on itbgames.com?


Hell no! That would be very nice of you actually smile
Posted By: mpdeveloper_B

Re: car-/metal- & toonshader - 07/19/08 15:15

Originally Posted By: BoH_Havoc
I don't know exactly what you mean but i guess you are talking about the self shadowing/diffuse ligthing? If so, then this can be changed through the lookupmap. Maybe post a screenshot and mark the part your are talking about? smile


Here's what I mean:


Originally Posted By: BoH_Havoc
Hell no! That would be very nice of you actually smile


k, I'll add it soon laugh
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/21/08 00:36

Thanks for the picture. I'll see if i can fix this problem smile

"Small" update: I got dyamic exposure control working! Now if the user looks at bright areas, the overall brightness will decrease. If the user looks at dark areas, the overall brightness will increase. I still have to tweak some values, but all in all it's working ... and it's fun to play around with laugh
Posted By: Espér

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/26/08 13:06

if i add (f.e.) the cartoon shader to my hero model, he is only shown black...
Same with hdrV_Blur, metal, skin, ..etc...

Any idea whats wrong?
Posted By: croman

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/26/08 14:33

what shader version do you have? are you sure that you have done everything okay with applying shaders to your models?
Posted By: Espér

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/26/08 15:53

i´ve copied the shadername.fx to my game folder
and in the hero´s action i added the my.materia = materialname;

the material is created with this tut:
http://www.coniserver.net/wiki/index.php/How_To_Apply_Shaders
(german version)
Posted By: croman

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/26/08 16:53

what shader model your graphics card has?

can i see that part of the code if it's not a problem?
Posted By: Espér

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/26/08 17:04

where to find out my shader_model type???

Click to reveal.. ("Shadecode")

Code:
MATERIAL* heldenshader_1 =
{
	effect = "s_hdrVBlur.fx";
}



and the calling in the hero action:


Click to reveal.. ("Part of hero action")

Code:
action heldenaktion()
{
	my.material = heldenshader_1;
	my.flags = VISIBLE | PASSABLE | SHADOW;
	helden_ent = my;
	helden_ent.x = helden_pos_weite;
	shooter_held();
[...]


Posted By: croman

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/26/08 17:32

try with this...i'm not sure if this will work but try it...

Code:
MATERIAL* heldenshader_1 =
{
   flags = TANGENTS;
   effect = "s_hdrVBlur.fx";
}



what graphics card do you have exactly?
Posted By: Espér

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/26/08 18:01

flag unknown TANGENTS

Think that´s not a code of Lite-C
Posted By: croman

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/26/08 18:04

sorry it's not TANGENTS but TANGENT laugh. and i assure you that lite-c supports it
Posted By: Espér

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/26/08 18:15

Problem still exists..
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/27/08 23:41

Using s_hdrVBlur.fx for an entity is senseless, as this is a screen-spaced shader and not an object based shader. Also this shader uses TargetMap as a texture and not entSkin.

You could try s_hemisphere.fx or s_velvety.fx with a model of yours. If these show up black as well, then you can be relatively sure that your card does not support ps 2.0
Posted By: Espér

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/27/08 23:54

It´s not that shader alone..
With every shader the model is just black.. doen´t matter wich i choose

Only with scetch shader, the model is white... But not with outlines oder scetchlines..just white..

i tried every shader within the folder..

I´ve a GeForce 9800GTX ( Shader Model 3 ).. I think that includes nearly everything needed..
Posted By: BoH_Havoc

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/28/08 18:14

Alright i think i know what your problem is:
In the current version most (if not all) object shaders need a precalculated matrix (most likely this won't be the case in the next version, we'll see)

So what you have to do is this:
Add this function to your script
Code:
void worldInvTrans(){
	mat_inverse(mtl.matrix,matWorld);
	mat_transpose(mtl.matrix,mtl.matrix);
}


and in your material definition you do this:
Code:
MATERIAL* myMaterial =
{	
	event = worldInvTrans;
	flags = ENABLE_RENDER;
	effect = "myShader.fx";
}


That should be it.
Posted By: Espér

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/28/08 19:35

nope.. the model is still black...
Posted By: Arcaine

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/31/08 10:20

Originally Posted By: JJJohan
Agh, it doesn't work for me <img src="/ubbthreads/images/graemlins/frown.gif" alt="" />.

I'm running gamestudio pro a7.

When I try to run my game it says:

Code:
Error in 'MAIN' line 13: 'var' undeclared identifier

&lt; var s_rtScale = 256; //render-target size&gt;

&lt;include ^s_shadeC.c&gt;;&gt;
MAIN.WDL 1:2 (): Script error s_shadeC.c


All I did was include the s_shadec.c file and call s_initshaders


First of all ...this error is a bit stupid^^

just type #inlcude "s_shadeC.c" instead of <...>

now ...I have a problem tooI created a new little lvl....with a ground plate, 2 buildings and sun and used it as lite-c script...then i included the s_shadeC.c in my script and used the main() example 1 from the shade-c manual and the only effect i get is...every object is dark...
now i tried the second example with all the finetuning for the HDR and i changed NOTHING....and the following error occures after compiling in the game:
-----------------------------------------------------------
Malfunction W1550
Error in effect:
s_mtl_ppe1(1):error X3000:syntax error:unexpected end of file

>_showRT<
-----------------------------------------------------------

can sb help me ? >.<
i don't know what to do ^^
Posted By: Espér

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/31/08 20:32

Ok.. my problem still exists..
But it´s not just your shaders..

If i want to use the "planet shader + athmosphere", the model is lack too...

My VIdeo Card has Shader Model 3.0

NVidia GeForce 7300 SE


But with my newer computer it won´t work too..
But he has NVidia GeForce 9800 GTX ( SM 4.0 )



Ps.:
I use Lite-C.. but i don´t think that´s a problem..
Posted By: VecG

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 07/31/08 20:56

s_shadeC. No blur Skybox. What? There is a method or not?
Posted By: Espér

Re: shade-c : lite-c shader project (HDR,DoF,etc) - 08/02/08 22:17

what???
Posted By: BoH_Havoc

shade-c : dynamic exposure control in action :) - 08/19/08 14:30

I realized i haven't posted much in the last days, so here's a video showing you the new dynamic exposure control in action. I think this finally is HDR-R but i'm not exactly sure so i'm calling it fake HDR-R wink
Anyway i think it looks awesome in motion



To the ppl having problems: Please wait until the next release of shade-c. There's much that has been changed and it wouldn't really be worth to use the old version as you would have to rewrite some things in your script.
Posted By: mpdeveloper_B

Re: shade-c : dynamic exposure control in action :) - 08/19/08 15:55

wow BoH, nice job. And yes I think you could call that HDR rendering, very very nice job.

So how is this project going?

Btw I think I'll wait until you've finished the new version with updated rendering before I add it to our Developers section, but overall nice work.
Posted By: Samb

Re: shade-c : dynamic exposure control in action :) - 08/19/08 16:40

quick question havoc:
did you changed something at the DOF shader?
because it seems to need work for ati cards:

ATI Radeon X800GTO²
http://www.bysamb.de/priv/hammerman2.jpg (hdr is on, thats why its brighter, also its a bit older version)

GeForce 8800:
http://www.bysamb.de/priv/hammerman-tjm.jpg

when I start the engine it says: s_mtl_dofVBlur - effect unsupported by hardware

besides that: awesome work! I love it! :]
Posted By: Shadow969

Re: shade-c : dynamic exposure control in action :) - 08/19/08 19:25

looks neat! have you thought about implementing softshadows? smile
Posted By: BoH_Havoc

Re: shade-c : dynamic exposure control in action :) - 08/21/08 17:52

mpdeveloper_B: It's coming along nicely, i might actually be able to keep the end of august "deadline" wink

Samb: Thanks for the info! I didn't know about this. Could you try opening s_dofVBlur.fx and changing the technique from ps_2_0 to ps_2_a or ps_2_b and see if it works ?

Shadow969: No if haven't thought about implementing soft shadows. I once implemented a variance shadow mapping shader (only spotlight/parallel light, no omni) in A6 and am still traumatised from it laugh I will definately get to shadowmapping when i have enough knowledge about optimizing it so it runs at a decent framerate. I'm currently working on an other method of adding dyanmic shadows to the scene however. If this works out it would support 32 lights all casting shadows at a very high framerate. I'm still trying things out, however, and i don't know if it's possible at all.
Also Chris is working on his Reality Render Plugin which should do a great job once finished smile


Thanks for your commets smile
Posted By: Samb

Re: shade-c : dynamic exposure control in action :) - 08/21/08 19:21

hah! found the error smile
the technique was on 3.0
Pixelshader = compile ps_3_0 main_PS();

changing it to Pixelshader = compile ps_2_0 main_PS(); and it works like a charme and looks like the nvidia screenshot! :]

oh, and I got an request for a shader laugh

lava shader!


non-realtime maya lava shader:
http://www.9jcg.com/comm_pages/blog_content-art-94.htm
Posted By: mpdeveloper_B

Re: shade-c : dynamic exposure control in action :) - 08/22/08 17:28

i'm pretty sure that can be duplicated with a lava texture and hdr running, and if the texture is seamless you could even move it and/or animate it...
Posted By: BoH_Havoc

Re: shade-c : dynamic exposure control in action :) - 08/26/08 17:08

I think a nice combination of parallax mapping, perlin noise and bloom could do the job, although a simple lavatexture would work, too wink
I'll add it to my list of shaders.
And thanks for "fixing" the dof shader smile
Posted By: Quad

Re: shade-c : dynamic exposure control in action :) - 08/26/08 17:44

wow boh this is awesomw (taliking about hdr video, just saw it.)
Posted By: BoH_Havoc

Re: shade-c : dynamic exposure control in action :) - 08/27/08 23:28

Quadraxas: Thanks, glad you like it smile

I just realized i haven't even started on creating a demo level for the new version. Does anybody have some spare models for me? Basically i want to create a little scene on an island which is surrounded by the ocean (=> oceanshader) and has a small cave or building with some metallic sci-fi stuff and organic things (=> *secret* ... heh, you guys will like that i think. Especially those of you who want to create their own shaders without knowledge of hlsl smile ). The cave/building should be rather dark and the outside should be bright to show of the new dynamic exposure control when leaving the cave/building. I don't need fancy stuff, just some models to show of the new features. Any help is appreciated! smile

I also have to update the manual and add a little tutorial for the complete newbies...meh that will take some time.

Release at the end of august...this will be hard, but i'll try to keep my deadline smile
Posted By: VeT

Re: shade-c : dynamic exposure control in action :) - 08/27/08 23:49

good luck, you still have 4 days laugh
Posted By: Angelus1818

Re: shade-c : dynamic exposure control in action :) - 08/29/08 14:10

Hey BoH_Havoc,

I got your email, And well there is something rather sad you should know........

I just had to reformat and install my OS on my main computer! It was getting blue screens every 5 mins. So I toattly forgot to back up all my Art work!!! :GASP:

So I see you want some textures for an island and you want some sci-fi stuff? That sounds cool! I'll do my best to make some textures or models for you in the next four days. If I can't make them myself that fast i'll find some freeware ones you can use for sure. But can you bee more descriptive of what you need exactly? I need a little more to go on...Thanks and looking forward to helping you out!

See ya!!!
Posted By: Quad

Re: shade-c : dynamic exposure control in action :) - 08/29/08 15:29

@angelus1818:

try recuva. if you used the fast format option while formatting it may recover some files. It saves me alot of time after formatting cuz i generally forget to backup someting that is needed.

http://www.recuva.com/

use deep scan option. wink

sorry for being off topic.

p.s: it's free.
Posted By: mpdeveloper_B

Re: shade-c : dynamic exposure control in action :) - 08/29/08 18:13

sorry I can't help with the models or anything. I have one question though, how are the two toon shaders going?
Posted By: BoH_Havoc

Re: shade-c : dynamic exposure control in action :) - 08/31/08 18:07

Well, well, i definately won't make it till the deadline. Sorry blush

To make up for it, here's a shot of the ocean shader:



Foam and waterdepth are created on the fly. Vertex Noise is applied to the waterplane to get some real 3d waves (Looks really relaxing in motion smile )

mpdeveloper_B: Don't worry, the toon shaders will make it into the next release smile
Posted By: Shadow969

Re: shade-c : dynamic exposure control in action :) - 08/31/08 18:23

indeed relaxing smile
Posted By: Angelus1818

Re: shade-c : dynamic exposure control in action :) - 09/01/08 06:17

BoH_Havoc,

You really wanted to do an island huh? Well I can tell it's going to be worth it. What are some EXACT model/textures you need? Please be spacific!!! Or I won't know what to make or find for you!!!!! Just curios why didn't you go with the valley? It sooooo amazing. I think it would have worked fine, but hey it's nor my project! Anyway I'll be more than happy to implemnet your logo in every game I use it in. np.

Cyas!!!!
Posted By: BoH_Havoc

Re: shade-c : dynamic exposure control in action :) - 09/02/08 15:08

Object-Shader showroom is more or less finished smile



Currently I get ~140fps with activated bloom, depth of field and water.

The Shader you see on the models is actually one base shader which can be adjusted to your needs. Here's the current features:

Code:
// UNCOMMENT/COMMENT TO ACTIVATE/DEACTIVATE

//Use Diffuse Lighting
#define DIFFLIGHT

//Use Shadowmap
//#define SHADOWMAPPING

//Use Specular Lighting
#define SPECLIGHT

//Use Environment Mapping
#define ENVMAPPING

//Use Velvety Effect
#define VELVETY

//Use Normalmapping
#define NORMALMAPPING

//Use Luminance Mapping
#define LUMMAPPING

//Use Team Color
#define TCOLOR

//Above Effects will react to sunlight (only needed if you have dynamic lights in your level)
//#define DOSUN

//Diffuse Lighting will react to 5 additional dynamic lights including the sun
//#define DYNLIGHTS

//Use PixelShader 2.a | set this if you get an errormessage ("code uses too many many arithmetic instruction slots")
#define PS2A


Well, I'm getting there smile (Still haven't started working on the manual, though)
Posted By: Quad

Re: shade-c : dynamic exposure control in action :) - 09/02/08 20:12

looks really nice wink but i guess it doenst go well with aa right?
Posted By: BoH_Havoc

Re: shade-c : dynamic exposure control in action :) - 09/02/08 20:49

I haven't tested activating anti aliasing yet. (Actually i never activated it since i have gamestudio for some reason ^^)

If you are talking about the small white artifacts you can see on the screen: They are caused by overlapping uv maps and have nothing to do with the shader.
Posted By: Angelus1818

Re: shade-c : dynamic exposure control in action :) - 09/02/08 22:21

Wow That looks amazing!!!!! I'm sad that you didn't say any models or textures you wanted though....I would've been glad to help. Ohh well. Maybe i'll be able to contribute to a future version. It looks great though. I see why you wanted to do it now. I am really looking forward to this coming out!!!! I will use it in every GS game i make! Good luck with the manual though! I know I can't help with that!
Posted By: VeT

Re: shade-c : dynamic exposure control in action :) - 09/02/08 23:37

looks really good smile
Posted By: mpdeveloper_B

Re: shade-c : dynamic exposure control in action :) - 09/03/08 00:02

The test is pretty impressive, good job BoH.
Posted By: BoH_Havoc

Re: shade-c : volumetric particles - 09/14/08 22:57

finishing up the code...



same thing, other alphamap for the clouds models


Wooooo! It's volumetric particles baby! (sorry, couldn't resist laugh )

Each "particle" can have it's own noise/fractal cubemap for detail and a colormap. You could even animate the whole thing as everything is based on models. For those interisted, this is a similar method as used in crysis (remember that a-bomb?).

Don't know when I will release the next version, but it won't be long now ( meh ... i think your getting tired of that statement wink )


Posted By: frazzle

Re: shade-c : volumetric particles - 09/15/08 07:10

Looks really nice, the volume appears even to be physically plausible smile smile

Cheers

Frazzle
Posted By: Poison

Re: shade-c : volumetric particles - 09/15/08 12:44

Greate Work looks quit impressive...
I really like it smile
Posted By: zSteam

Re: shade-c : volumetric particles - 09/17/08 18:21

wooow its very very awesome... when do you release your next version?
Posted By: William

Re: shade-c : volumetric particles - 09/17/08 22:38

The new HDR video is awesome, an sort of hypnotic. whistle
Posted By: BoH_Havoc

Re: shade-c : volumetric particles - 09/21/08 13:36

Thanks guys smile

I'm working on another project besides shade-c for which i have to write shaders and other stuff, so things are taking longer than expected. However I'm quite confident that I will be able to release v.0.9 this week. The demolevel is nearly finished and the manual is coming along nicely, too.

I told this to you guys before, but here i go again: THANKS for all the feedback and suggestions you send me by mail/pm! It really shows me that there are quite a lot of users that want shade-c (NOW! wink ) and that the work i'm doing isn't for nothing smile Big thanks!

cheers
Posted By: BoH_Havoc

Re: shade-c : volumetric particles - 09/22/08 23:37

Last picture before release:
Played around with volumetric particles some more and came up with a nice "solar-storm"-effect. The whole thing is animated, looks as if sand is waving above everything.

Welcome to Mars! cool




See you soon at the "Shade-C v.0.9" Thread wink
Posted By: Quad

Re: shade-c : volumetric particles - 09/23/08 09:06

you rock smile
Posted By: bstudio

Re: shade-c : volumetric particles - 09/23/08 09:19

Dude, you make the engine look good. Maybe you should team up with dexsoft and create a demo with some high quality models (although what you have now looks awesome too)
Posted By: Poison

Re: shade-c : volumetric particles - 09/23/08 12:21

I can´t see the pictures frown
Posted By: broozar

Re: shade-c : volumetric particles - 09/23/08 14:06

imageshack's img220 server seems to be down
Posted By: zSteam

Re: shade-c : volumetric particles - 09/23/08 19:47

I uploaded it to my own ftp


© 2024 lite-C Forums