Gamestudio Links
Zorro Links
Newest Posts
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 9,630 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 1 of 3 1 2 3
Studio Max 6 FX Shader to Game Studio? #33196
09/15/04 00:36
09/15/04 00:36
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Recently I purchased a copy of Studio Max 6 and have been looking at all its new features and extra functionality. One thing of interest was its FX DX9 shader system, basically lets you load up a FX shader and look at it. Useful for developing shaders....

So the obvious question is.... How do you cross the syntex from Max FX to GS fx...bcz they are obviously different.....

I am sure this is somewhat of a Noo8 question so be gentle.....


The Art of Conversation is dead : Discuss
Re: Studio Max 6 FX Shader to Game Studio? [Re: indiGLOW] #33197
09/21/04 16:52
09/21/04 16:52
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
So.. maybe not such a noob question afterall.

I will have to set some research time asside and look into the matter...


The Art of Conversation is dead : Discuss
Re: Studio Max 6 FX Shader to Game Studio? [Re: indiGLOW] #33198
09/21/04 18:02
09/21/04 18:02
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
well, if i had 3dstudiomax i would have had a look at this at least, but maybe you can show an examplecode with a shot and one could think about it even without having this prog

Re: Studio Max 6 FX Shader to Game Studio? [Re: ello] #33199
09/21/04 19:45
09/21/04 19:45
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Sure - Im doing this now, will upload and post within the hour
Thanks Ello


The Art of Conversation is dead : Discuss
Re: Studio Max 6 FX Shader to Game Studio? [Re: indiGLOW] #33200
09/21/04 20:34
09/21/04 20:34
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Take a look here for some examples and screen shots.
3D Max FX


The Art of Conversation is dead : Discuss
Re: Studio Max 6 FX Shader to Game Studio? [Re: indiGLOW] #33201
09/21/04 20:58
09/21/04 20:58
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
seems to be really simple to ajust. but i am at work now. dunno if someone is faster then i am at home, but i will show you what to do then

Re: Studio Max 6 FX Shader to Game Studio? [Re: ello] #33202
09/21/04 21:03
09/21/04 21:03
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Fantastic Ello, many thanks.


The Art of Conversation is dead : Discuss
Re: Studio Max 6 FX Shader to Game Studio? [Re: indiGLOW] #33203
09/22/04 03:22
09/22/04 03:22
Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
Drew Offline
Serious User
Drew  Offline
Serious User

Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
yes, great work!! Im so hoping you can get working examples...

Is there a way to write a sort of tutorial for converting? I realize that its not that easy, but maybe there are common phrases that need to replaced?
thanks

REQUEST- Depth of field and glow(bloom) shaders, PLEASE!!!


Drew Medina
Game Developer (Artist)
Personal & professional website
Deviant Art
My Blogspot
Re: Studio Max 6 FX Shader to Game Studio? [Re: Drew] #33204
09/22/04 03:32
09/22/04 03:32
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Well as I understand it, the Max 6 FX system is limited, however my Studio Max dealer ( Freehand - Quick Plug ) informs me that Studio Max 7 will take this much further. If ello, (or anyone else for that matter), can point our how to translate these Max FX files to GS fx files it will mean that we can develop some pretty good .fx shaders, pretty fast.

Note: Bcz we only just purchased Max 6 we get a free upgrade to Max 7, so I am keen to get a head start on this.


The Art of Conversation is dead : Discuss
Re: Studio Max 6 FX Shader to Game Studio? [Re: indiGLOW] #33205
09/22/04 03:39
09/22/04 03:39
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
thats what i got working so far.
Code:
  //ghost shader based on nvidia's cgFX sample


// un-tweakables

float4x4 matWorldView;//worldIT: WorldIT;
float4x4 matWorldViewProj;//wvp : WorldViewProj;
float4x4 matWorld;//world : World;

// tweakables


int lodBias = 0;


float fade = 1.0f;

texture mtlSkin1;

//////// techniques ////////////////////////////

technique Ghostly
{
pass p0
{
VertexShaderConstant[0] = <matWorldViewProj>;
VertexShaderConstant[4] = <matWorldView>;
VertexShaderConstant[8] = <matWorld>;

VertexShaderConstant[11] = {1.1,1.1,0.6,0.0};
VertexShaderConstant[12] = <fade>;

VertexShader =
asm
{
vs_1_1

dcl_position v0
dcl_normal v3
dcl_texcoord0 v7
dcl_texcoord1 v8


// Transform pos to screen space.
m4x4 oPos, v0, c0

// Normal to world space:
dp3 r0.x, v3, c4
dp3 r0.y, v3, c5
dp3 r0.z, v3, c6

// normalize normal
dp3 r0.w, r0, r0
rsq r0.w, r0.w
mul r0, r0, r0.w // r0 has normalized normal.

// vpos to world space.
dp4 r1.x, v0, c8
dp4 r1.y, v0, c9
dp4 r1.z, v0, c10
dp4 r1.w, v0, c11 // r1 has position in world space.

// eye vector, normalize.
add r2, c19, -r1

dp3 r2.w, r2, r2
rsq r2.w, r2.w
mul r2, r2, r2.w // r2 has normalized eye vector.

// E dot N
dp3 r0, r2, r0
mul r0, r0, r0
mul r0, r0, c12.xxxx
mul oD0, r0, r0

mov oT0, v7
};

ZEnable = true;
ZWriteEnable = true;
AlphaBlendEnable = true;

SrcBlend = One;
DestBlend = InvSrcColor;

CullMode = CCW;
Lighting = false;

Texture[0] = <mtlSkin1>;
MinFilter[0] = Linear;
MagFilter[0] = Linear;
MipFilter[0] = Linear;
MipMapLodBias[0] = <lodBias>;

MinFilter[1] = Linear;
MagFilter[1] = Linear;
MipFilter[1] = None;
MipMapLodBias[1] = <lodBias>;
AddressU[1] = Clamp;
AddressV[1] = Clamp;


ColorOp[0] = Modulate;
ColorArg1[0] = Texture;
ColorArg2[0] = Diffuse | Complement;

AlphaOp[0] = SelectArg1;
AlphaArg1[0] = Texture;
AlphaArg2[0] = Diffuse;

}

pass p1
{
VertexShaderConstant[0] = <matWorldViewProj>;
VertexShaderConstant[4] = <matWorldView>;
VertexShaderConstant[8] = <matWorld>;

VertexShaderConstant[11] = {1.1,1.1,0.6,0.0};
VertexShaderConstant[12] = {1.0,1.1,0.6,0.0};

VertexShader =
asm
{

vs_1_1

dcl_position v0
dcl_normal v3
dcl_texcoord0 v7
dcl_texcoord1 v8

// Transform pos to screen space.
m4x4 oPos, v0, c0

// Normal to world space:
dp3 r0.x, v3, c4
dp3 r0.y, v3, c5
dp3 r0.z, v3, c6

// normalize normal
dp3 r0.w, r0, r0
rsq r0.w, r0.w
mul r0, r0, r0.w // r0 has normalized normal.

// vpos to world space.
dp4 r1.x, v0, c8
dp4 r1.y, v0, c9
dp4 r1.z, v0, c10
dp4 r1.w, v0, c11 // r1 has position in world space.

// eye vector, normalize.
add r2, c19, -r1

dp3 r2.w, r2, r2
rsq r2.w, r2.w
mul r2, r2, r2.w // r2 has normalized eye vector.

// E dot N
dp3 r0, r2, r0
mul r0, r0, r0
mul r0, r0, c12.xxxx
mul oD0, r0, r0

mov oT0, v7
};

ZEnable = true;
ZWriteEnable = true;
AlphaBlendEnable = true;
CullMode = CW;
Lighting = false;

SrcBlend = One;
DestBlend = InvSrcColor;
Texture[0] = <mtlSkin1>;

MinFilter[0] = Linear;
MagFilter[0] = Linear;
MipFilter[0] = Linear;

MinFilter[1] = Linear;
MagFilter[1] = Linear;
MipFilter[1] = None;
AddressU[1] = Clamp;
AddressV[1] = Clamp;

ColorOp[0] = Modulate;
ColorArg1[0] = Texture;
ColorArg2[0] = Diffuse | Complement;

AlphaOp[0] = SelectArg1;
AlphaArg1[0] = Texture;
AlphaArg2[0] = Diffuse;
}
}


it may be what you want.

the textures need to be defined in the 3dgs way, and the matrices,vectors and other values have to be set up in a slightly different way. you can replace mtlSkin1 by entSkin1 for example to use the entities skin1
btw i found a fade falue of 3.0 much better, but this may depend on the texture.

i placed a little explanation for converting rendermonkey exported fx-files here (its in german and i am a little lazy to translate it now) but if you look at the code and the differencies, you may get am idea of what has to be done.
btw, the simple blur shader i put in the shaderforum can be used for a glow effect ( to be honest it is a derivate of the "golden shine" from rendermonkey, so i think changing some renderstates like EnableAlphaBlend=1; and BlendOp=5; and/or setting the rendertarget transparence and brightflags will do the job)

Page 1 of 3 1 2 3

Moderated by  Blink, Hummel, Superku 

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