Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Models and Media / How do I Make Shaders for FPS Creator?

Author
Message
Haven Studios
16
Years of Service
User Offline
Joined: 17th Jun 2008
Location: My Empire of a Utopia
Posted: 13th Dec 2008 00:08
Any help?

Haven Studios

Add me on Xbox Live PPL :3
bond1
19
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 13th Dec 2008 05:37 Edited at: 13th Dec 2008 05:44
Best thing to do first is to buy the Dark Shader software from TGC. This will give you a nice editor and preview window. Since it's based on Dark Basic like FPSC, you can program your shaders in this environment without having to worry about compatibility with FPSC.

You'll need some background in 3D math, and an understanding of the graphics pipeline. I recommend these books, these helped me when learning how to write shaders, I bought these from Amazon:

1. 3D Math Primer for Graphics and Game Development
2. The CG Tutorial - can also be read online for free at NVidia's website.
3. Real-Time Rendering 3rd Edition - nice hardcover book that covers really cutting edge techniques from games like Crysis, etc.
4. Shaders for Game Programmer's and Artists

Some DVD tutorials that are very good too, these can be bought at CG Academy:

1. HLSL Shader Creation Fundamentals
2. HLSL Shader Creation - Light and Shading Models

----------------------------------------
"bond1 - You see this name, you think dirty."
Avenging Eagle
19
Years of Service
User Offline
Joined: 2nd Oct 2005
Location: UK
Posted: 13th Dec 2008 10:16
I don't understand why someone hasn't just written a few shaders that actually work in FPSC and made a small fortune selling them here...

I'd certainly buy!

AE

bond1
19
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 13th Dec 2008 15:26 Edited at: 13th Dec 2008 15:30
Well, I made a true texture controlled normal-diffuse-specular shader. In addition, it even has an ingenious global illumination component that I'm especially proud of, I haven't seen the technique documented ANYWHERE, that will still show normal mapping detail even in 100% ambient lighting. And thirdly, it has an animated glow controlled by the alpha channel.

It was included with the wizard staff and demon sceptre weapon, and it could easily be adapted to other items with a little effort.

----------------------------------------
"bond1 - You see this name, you think dirty."
bond1
19
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 13th Dec 2008 15:35 Edited at: 13th Dec 2008 15:35
As far as making a "small fortune" selling a shader pack here - pfft, I doubt it, I'd never even recoup the cost of the books, not worth it!

----------------------------------------
"bond1 - You see this name, you think dirty."
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 13th Dec 2008 18:05
Hey Bond, would your shader work well on dynamic entities, liklke crates?

bond1
19
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 14th Dec 2008 16:48 Edited at: 14th Dec 2008 16:59
Quote: "Any help?"


I took the time to write a thoughtful response, including 6 references to what I feel are the best HLSL learing resources available. A simple thanks would have been nice.



Quote: "Hey Bond, would your shader work well on dynamic entities, liklke crates?
"


Yes, but you will have to modify the vertex shader portion of the fx file, the pixel shader portion will work as is. You'll need to remove the GPU skinning portion of the vertex shader. You'll probably want to remove the animated glow from the pixel shader too, and substitute some generic self-illumination instead (you'll see I've commented this line out).

Of the references I listed, two are the most important for starting out. The first DVD I mentioned does a great job of explaining the structure of an HLSL file. I've wathced this DVD 3 times to ingrain it in my memory.

Then get the book 3D Math Primer for Graphics and Game Development. You'll need this to get a good understanding of the math involved. The great thing about the book is that it gives the geometric interpretation of the equations. The actual math isn't important because it is automatically calculated in the code. What IS important is the geometric implications. For example, when you see a calcuation of a dot product between two vectors in a shader, you'll know that it is probably calculating some type of diffuse lighting equation. Hope this helps.

EDIT: You'll need to modify the texture portion too. Guns use the D/N/R suffixes. Other entities use the D/N/I/S suffixes.

----------------------------------------
"bond1 - You see this name, you think dirty."
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 14th Dec 2008 16:53
Quote: "Yes, but you will have to modify the vertex shader portion of the fx file, the pixel shader portion will work as is. You'll need to remove the GPU skinning portion of the vertex shader. You'll probably want to remove the animated glow from the pixel shader too, and substitute some generic self-illumination instead (you'll see I've commented this line out). "


Lol, I guess I should read up on that stuff. Because all I've done with shaders so far is tweak values and such....

bond1
19
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 14th Dec 2008 17:02 Edited at: 14th Dec 2008 17:04
Quote: "Because all I've done with shaders so far is tweak values and such"


That IS the best way to start out though. You definitely don't want to start from scratch if you don't know the underlying structure, and all those books I referenced say the same thing - start with an fx file that is CLOSE to the effect you want, and start modifying it. At least until you are comfortable making your own.

----------------------------------------
"bond1 - You see this name, you think dirty."

Login to post a reply

Server time is: 2025-06-12 10:59:43
Your offset time is: 2025-06-12 10:59:43