irrCg v0.8 (Initial) - CgFX (Texture States, MultiPass etc.)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki

Postby Nadro » Sat Sep 08, 2007 2:53 pm

I released version 0.3 :) All features are in ReadMe.txt I update first post with link to current version.
NBK Game Studio - Official Site:
http://www.nbkgamestudio.pl/
Nadro
 
Posts: 1000
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Postby koller202 » Sat Sep 08, 2007 5:28 pm

this cg can use file export form rendermonkey ?

thank you
________
MEDICAL MARIJUANA PATIENT
Last edited by koller202 on Thu Feb 17, 2011 1:16 am, edited 1 time in total.
koller202
 
Posts: 143
Joined: Tue May 08, 2007 4:53 am
Location: Thailand

Postby Nadro » Sat Sep 08, 2007 6:43 pm

Sure :) Cg = HLSL, so You can use HLSL shaders from RenderMonkey as Cg:)
NBK Game Studio - Official Site:
http://www.nbkgamestudio.pl/
Nadro
 
Posts: 1000
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Postby FuzzYspo0N » Mon Sep 10, 2007 8:34 am

Bah,

i know it might be really frustrating but i cant get stuff off of rapidshare?

pls host somehwere else :)

if you need some whre let me know
User avatar
FuzzYspo0N
 
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa

Postby Nadro » Mon Sep 10, 2007 3:00 pm

I send v0.3 on sendspace:) I've done access for all Matrix and for Transformation it:) I release all as v0.4 but now I write port for Linux and after it, I release 0.4:) (1-3 days)
NBK Game Studio - Official Site:
http://www.nbkgamestudio.pl/
Nadro
 
Posts: 1000
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Postby FuzzYspo0N » Tue Sep 11, 2007 6:46 am

ok , no problem ;)

i would need a link tho,

If you are interested in hosting a webpage/download page private message me ok?
User avatar
FuzzYspo0N
 
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa

Postby benny53 » Wed Sep 12, 2007 12:58 am

thought I'd say (since the readme says that vista wasn't tested) that they all work great with Windows Vista Home Premium 32 bit edition. So you can say that that has been tested. I get around 500 fps. Which is wierd,cuz I have an 8800gts,but I don't think its my hardware(I think vista is eating my ram,but I'm not sure). So yeah,it works on vista 32 bit.
benny53
 
Posts: 131
Joined: Fri May 26, 2006 10:21 pm
Location: Ohio

Postby Nadro » Wed Sep 12, 2007 1:12 pm

Thanks for test:) Yes probably this is Vista problem. How FPS You have got if You not visible vertex in this demo? (draw polys: 0) If around 500 this is no hardware problem, but software:) I add Vista 32-bit support for checked:)
NBK Game Studio - Official Site:
http://www.nbkgamestudio.pl/
Nadro
 
Posts: 1000
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Postby Nadro » Mon Sep 24, 2007 6:16 pm

I've done version 0.4 of CG Binding. In this version eg. You Can Access for 5 Matrices. This is next release only for Windows (In last time I have some problem with my dev environment in my Fedora 7, so I can't make version for Linnux in this release). In this demo I add example about Normal Mapping. Now You have lighting like DOOM 3 in Yours Irrlicht Application, now it is possible:) (I show effect on DOOM 3 model - IMP, effect look identically like DOOM 3, but is free). Of course I update first post for download info;)
NBK Game Studio - Official Site:
http://www.nbkgamestudio.pl/
Nadro
 
Posts: 1000
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Postby sio2 » Mon Sep 24, 2007 7:11 pm

Nadro wrote:I show effect on DOOM 3 model - IMP, effect look identically like DOOM 3, but is free). Of course I update first post for download info;)


That's a coincidence - I did something like that 8 months ago. The "new" Irrlicht animation system started shortly after so I didn't do any more work on the MD5 loader. The original demo is still available on my website.
sio2
Competition winner
 
Posts: 1002
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Postby Nadro » Mon Sep 24, 2007 8:07 pm

This topic is about CG and this is mainly theme, but binding without good examples?:) Of cource You made similar effect ~8 months ago, but without visible specular and I not tell, than my demo is first with Normall Mapping, but this is first full properly Normal Mapping example in CG for Irrlicht with CG support:), and hmm Your demo is only for DirectX or OpenGL? I not remember, but MD5 loader is very good:) Thats fact shaders and effect are similar. I'm don't know who is first developer this shader, but this is not me:)

PS. Meybe You planning release source code of Yours loader?:)
NBK Game Studio - Official Site:
http://www.nbkgamestudio.pl/
Nadro
 
Posts: 1000
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Postby christianclavet » Sat Oct 13, 2007 8:11 pm

Thanks Nadro.

This is just the thing I needed for my next project!

Your normal mapping example is just what I was for!

From the example, you have some dynamic lighting from the shader? The model seem to be lit from the font.

I'll try to get rendermonkey and try it. But the base code from your example for NormalMapping is what I need.
:)
Thanks!
User avatar
christianclavet
 
Posts: 1383
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA

Postby jingquan » Sun Oct 14, 2007 5:17 am

Hello,

I tried getting the normalmap code to work in Rendermonkey by directly copying the .cg code to it, but some error showed up (with my shallow understanding of hlsl I don't know how to fix :( ). Is cg the same same as hlsl or do I have to change something to get it to work with Irrlicht or Rendermonkey?

Thanks
jingquan
 
Posts: 222
Joined: Sun Aug 20, 2006 4:10 am

Postby Virion » Sun Oct 14, 2007 5:24 am

Great, it looks so sweet. :D
User avatar
Virion
 
Posts: 2102
Joined: Mon Dec 18, 2006 5:04 am
Location: Malaysia

Postby jingquan » Sun Oct 14, 2007 6:06 am

Some small changes, and now it compiles fine in both irrlicht and rendermonkey, but nothing showed up.

Can anyone spot any mistake in the code(hlsl)?

vertex shader:

Code: Select all
   float4 lightPosition; // Object Space
   float3 eyePosition;  // Object space
   float4x4 WorldViewProj;

void vsmain(float4 Position: POSITION,
   float3 Normal: NORMAL,
   float2 Uv: TEXCOORD0,
   float3 Tangent: TEXCOORD1,
   float3 Binormal: TEXCOORD2,

   out float4 oPosition: POSITION,
   out float2 oUv: TEXCOORD0,
   out float3 oLightDir: TEXCOORD1, // Tangent Space
   out float3 oEyeDir: TEXCOORD2, // Tangent Space
   out float3 oHalfAngle: TEXCOORD3 // Tangent Space

)

   oPosition = mul(WorldViewProj, Position);

   oUv = Uv;
   float3 LightDir = normalize(lightPosition.xyz -  (Position * lightPosition.w));
   float3 EyeDir = eyePosition - Position.xyz;
   
   float3x3 TBN = float3x3(Tangent, Binormal, Normal);
   
   // Transformacja do Tangent Space
   LightDir = normalize(mul(TBN, LightDir));
   EyeDir = normalize(mul(TBN, EyeDir));

   oLightDir = LightDir;
   oEyeDir = EyeDir;
   oHalfAngle = normalize(EyeDir + LightDir);
}


I really appreciate it.

pixel shader:
Code: Select all
   float3 LightDiffuse;
   sampler2D DecalMap: register(s0);
   sampler2D NormalMap: register(s1);
   sampler2D SpecularMap: register(s2);
   /* Parallax Mapping
   uniform sampler2D HeightMap,*/
   
   

void psmain(float2 Uv: TEXCOORD0,
   float3 LightDir : TEXCOORD1,
   float3 EyeDir : TEXCOORD2,
   float3 HalfAngle : TEXCOORD3,



   out float4 oColor : COLOR)
{
   float2 TexCoord;

   /* Parallax Mapping
   float Height = tex2D (HeightMap, Uv).r;
   Height = Height * 0.04 - 0.02;
   float3 Eye = normalize (EyeDir);
   TexCoord = (Height * Eye.xy) + Uv;
   */
   // else
   TexCoord = Uv;

   float3 Normal = 2.0 * tex2D (NormalMap, TexCoord).rgb - 1.0;
   Normal = normalize (Normal);

   // Œwiat³o rozproszenia
   float3 Diffuse = max (dot (LightDir, Normal), 0.0) * LightDiffuse;
   float3 DecalColor = tex2D (DecalMap, TexCoord).rgb;

   float3 SpecularColor = tex2D(SpecularMap, TexCoord).rgb;

   float Specular = max (dot (HalfAngle, Normal), 0.0);
   Specular = pow (Specular, 8.0);

   oColor = float4 (DecalColor * Diffuse + Specular * SpecularColor, 1.0);
}
jingquan
 
Posts: 222
Joined: Sun Aug 20, 2006 4:10 am

PreviousNext

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 1 guest