View Full Version : FX
How can i create fx for xna?
i need to make an object textured trasparent (like a wire)
and glow
ajclaude
02-29-2008, 04:57 PM
You can use FXComposer2 from NVIDIA or RenderMonkey from AMD. Notepad and MSDN are also good if you already know how to program in HLSL.
i don't now how to program in HLSL
i tried fxcomposer2 but they don't work on xna
i don't know how to find tutorial about that
ajclaude
03-08-2008, 01:16 PM
You can have a look at some of the sample FX files that ship with the XNA addon. They should be under C:\Softimage\XSI_6_Mod_Tool\Addons\XNAGSE\Data\XNA _SAMPLES\FX. You can also refer to the DirectX HLSL and FX documentation in order to modify these so you can have the effect you want. Here is a useful link : http://msdn2.microsoft.com/en-us/library/bb173005(VS.85).aspx
I've attached a modified version of Phong.fx which exposes a transparency parameter (0 is opaque, 1 is transparent)
thiago
03-09-2008, 11:25 AM
Hi Alexandre,
Is there a way to easily get realtime HLSL code form Nvidia examples or other websites and use it directly in XSI in a realtime program node?
I see a bunch of interesting effects on this site http://http.download.nvidia.com/developer/SDK/Individual_Samples/samples.html#dynamic_amb_occ
This one is an ambient occlusion but there are simpler effects in the same page.
Those examples come with a .cg, .fx or files with HLSL code... I know XSI accept all these realtime vertex/pixel shaders and etc. But is there a way to easily apply one of this examples?
Thanks.
Thiago Costa
ajclaude
03-09-2008, 11:57 AM
Some of them can be used directly in XSI. However, there are particular cases where they will require minor modifications.
Case 1: XSI uses a specific vertex attribute structure. If the shader is not compatible with this structure, then it will not work correctly. The structure is described as follows:
struct XSI_AppToVertex
{
float4 position : POSITION;
float4 normal : NORMAL;
float4 color0 : COLOR0;
float4 color1 : COLOR1;
float4 texcoord0 : TEXCOORD0;
float4 texcoord1 : TEXCOORD1;
float4 texcoord2 : TEXCOORD2;
float4 texcoord3 : TEXCOORD3;
float4 texcoord4 : TEXCOORD4;
float4 texcoord5 : TEXCOORD5;
float4 texcoord6 : TEXCOORD6;
float4 texcoord7 : TEXCOORD7;
};
Case 2: The shader requires a tangent and binormal attribute on the vertex. XSI does not store binormals so they have to be computed in the shader, and the tangents are stored in COLOR0. The correct way of getting the tangent and binormal attribute in the shader is as follows: (N is the normal, T is the tangent, B is the binormal)
float3 N = IN.normal;
float3 T = (IN.color0 * 2) - 1;
float3 B = N.yzx * T.zxy;
B = (-T.yzx * N.zxy) + B;
N = mul(N, Model);
T = mul(T, Model);
B = mul(B, Model);
Also note that XSI currently does not support rendering to textures natively. It can be done as a C++ plugin, but CGFX and FX files that require rendering to textures are not supported.
Hope that explains it a bit.
thiago
03-10-2008, 12:58 AM
Hi Alexander,
I'm having success now with some of that shaders from nVidia examples. Thanks for the tips.
I think realtime shaders are VERY nice in XSI... I don't see any other software with an open interface built in like that. It's a really powerful feature.
On the other hand, I would love if Softimage could spend more time to show in deep how to make this work. It's really cool but there's no up to date examples showing how far realtme shaders can go, or how this could help artists in production with customized realtime effects....
Sounds possible to me that we can have a realtime Occlusion shader, for example.
I've seen so much crazy stuff with realtime shaders in game engines, and I don't understand how can we have all this code that access GPU and nobody is showing this feature.
The little examples we have in the netview are kinda hidden, people take forever to get to know that exists and how put it to work... Worst, some of that examples aren't even working anymore.
As much as XSI can get close to a game engine is better... and in terms of shaders it seems quite close to me, everything is in there, all the hooks. It's like is waiting for somebody to show it in practice.
So here's my message... I hope for a better documentation, more tutorials and cool examples of realtime shaders in XSI.
Thanks.
-tc
Deracus
05-16-2008, 03:42 PM
/sign :)
I think the Realtime-Shading Capabilities of XSI are amazing...too bad, that there are almost no tutorials out there on how to use and customize them.
For example...why isnīt there a tutorial, that tells how, how to make a good pipeline from FXComposer to XSI or stuff like that. FXComposer or Rendermonkey are really great tools, that make shader creation rather easy even for non programmers and there are also lotīs of examples...but itīs hard to get them over to xsi if you donīt know the basics of how Realtime shaders in XSI work and stuff like that...
dwigfor
05-19-2008, 10:38 AM
There's a lot of cool stuff posted on www.softimage.jp (http://www.softimage.jp) - including some videos demonstrating realtime shading and toon shading. Wish they had an English translation for that site, and English versions of their videos....
thiago
05-19-2008, 01:51 PM
yeah I know the ones you are talking about...
heres the direct link
http://www.softimage.jp/xsi/v4/video/flash/FX_Pack.html
http://www.softimage.jp/xsi/v4/video/flash/GPUSurfaceFX2_2.html
http://www.softimage.jp/xsi/v4/video/flash/NM_Part2_Avid.html
I would love to see more examples and tutorials exploring this cool technology.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.