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 Product Chat / Setting up Shaders(Effects) in FPSC

Author
Message
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 9th Apr 2010 02:45
So I've hit a snag with my Elder Media. I want to start adding normal maps to enhance the way the segments and entities look, but for the dang life of me I can't figure out how to set it up in FPSC.

I have a custom shader named bumpspec.fx in the effectsbank folder. I place the path to it in a segments effects line, and I add the normal map in with the segment fps file.

Now no matter what I name it, or what I do(I've been trial-and-erroring all day!) either the segment model is completely black or is invisible.

So here are my questions:
1) how do I setup the .fps file?
2) where do I place the normal map file and how do I tell FPSC to use it for a segment?
3) does the normal map have to be dds format, or can FPSC auto-convert like it does the normal textures?


Thanks for your help.


Kravenwolf
15
Years of Service
User Offline
Joined: 14th Apr 2009
Location: Silent Hill
Posted: 9th Apr 2010 03:18 Edited at: 9th Apr 2010 03:22
Normal maps don't work on segments in FPS Creator.

EDIT: Bond1 has come up with a solution for the problem, and has managed to get some shader maps to work on segments (I know his specular shader can be applied to segments). Check out his Metro Theater Model Pack thread.

Kravenwolf

bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 9th Apr 2010 03:34 Edited at: 9th Apr 2010 03:35
Normal mapping with lightmapping for segments will either be in the next FPSC update, or in a future model pack from me. I haven't decided how to roll it out yet. I'm knee deep working on lip-syncing characters at the moment. There will also be an optional parallax offset component.


For now, you can do specular mapping on segments if you have the Metro Theater model pack as Kravenwolf said.

----------------------------------------
"bond1 - You see this name, you think dirty."
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 9th Apr 2010 04:00 Edited at: 9th Apr 2010 04:05
Aye, buy your pack. I have my own specular shader, and normal map shader, just wanting to know how to use them in FPSC. I'd don't need anything but information on integrating them.

Alright, let me ask this in general, since I can't get a straight answer.

How can I add any shader to any type of object? I just need to know how to tell FPSC to use a shader and what image file to use with the object I want the shader to effect.

In DBP I can just set the effect to an object with a single command, and it uses the specified image that I've already applied to the object ahead of time. Wish it was that simple in FPSC.

Honestly it's surprising there isn't more documentation on this. Considering it was built with DBP, you'd think it would be a simple command line you add to your object's fp file. Oh well, hopefully will figure this out.


bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 9th Apr 2010 06:36 Edited at: 9th Apr 2010 06:55
Sorry Josh, I wasn't being coy. I just meant the easiest way to set up nice looking segment shaders without going into tons of technical detail would be to get my pack to use as a template, since the default segment shaders included with FPSC leave something to be desired...

Your shader most likely won't work with FPSC. This is because FPSC is a game engine that has it's own lighting system that passes specific information to the shader system in order to work. Using just any old shader will make the item stick out like a sore thumb.

Here is your documentation on shaders for FPSC:

The first texture loaded by FPSC is the lightmap, it is auto-generated by FPSC. So the first sampler in your shader code is reserved for this texture. The following four textures are the object textures, and you will need to set up samplers for each one in the shader. In order they are:

1. mytexture_D
2. mytexture_N
3. mytexture_I
4. mytexture_S


Now, for normal mapping, things get tricky for segments. FPSC does not pass TANGENT and BINORMAL vectors for segments that use the lightmapper. This means you must calculate these vectors on the fly within the shader code - which is exactly what my new segment shader does.

There are a few other shader variables to keep in mind. "Surfcolor" is a shader variable that samples the lightmap color the entity is on. This keeps your object's lighting integrated with it's environment, so they don't stick out at full brightness on a pitch black area of the lightmap. "Ambicolor" is another variable that passes the current ambient color to the shader. Again, this forces your model to respect the overall ambient lighting in FPSC. "LightSource" is a third variable passed to the shader system. This pulls the DIRECTION of the nearest light in FPSC, so your model is shaded correctly depending on where you place your lights. These three variables need to be figured into your final lighting eguation in the shader code.

Hope this helps. I think most FPSC users don't have the patience to delve this deep into HLSL coding. Which is why it's just easier to use my model pack's shaders that have all this pre-setup and ready to use.

----------------------------------------
"bond1 - You see this name, you think dirty."
Kravenwolf
15
Years of Service
User Offline
Joined: 14th Apr 2009
Location: Silent Hill
Posted: 9th Apr 2010 06:53
@bond1, is there any chance you would be willing to sell your new shaders now via email/PayPal? I have your shaders from the Metro Theater Pack, and am using them in my current project, and I've been eagerly awaiting your new normal map shader to finish things up ever since you announced it several weeks ago. No telling when we'll see the new update. I'd be willing to purchase your new shaders now, regardless if they're released with the new update or not.

Kravenwolf

Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 9th Apr 2010 07:47
Thanks for the bits of info u give use about shaders bond1. Do u have some good shaders tutorials, from around the net? Thanks bond1.

JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 9th Apr 2010 10:24 Edited at: 9th Apr 2010 10:28
bond1:
Thanks, that makes sense. It's not that I don't want your shaders, but that I'd like to have my own in order to sell my models. I would think redistributing your shaders with my own media would be a breach in your user agreement.

Scrapped my shaders, won't work, delving into developing my own.

Thanks for the info.

Sorry if I sounded harsh earlier, wasn't' my intention. We should chat up sometime, always enlightening to talk to a fellow 3d artist. Honestly I can't understand these "programmers" sometimes.


Soviet176
14
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 10th Apr 2010 01:23
Quote: "Honestly I can't understand these "programmers" sometimes. "


System.out.println("");

"I haz no sig :o"
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 10th Apr 2010 02:59 Edited at: 10th Apr 2010 03:02
Quote: "Honestly I can't understand these "programmers" sometimes."



Quote: "Do u have some good shaders tutorials, from around the net?"


I've spent the past two years teaching myself HLSL, and I have ZERO programming experience. The initial learning curve was hard to get over, and I almost gave up several times. But I stuck at it, and I'm SO glad I did, because I really think it's taken my 3D skills to the next level.

These are the resources I learned from:

Ben Cloward's HLSL training DVD's : Great for learning the basics, aimed at artists with no programming experience.

The CG Tutorial : Covers every basic rendering technique used in games today.

Shader X book series : Covers lots of boutique topics. This is where I found out how to create tangent vectors on the fly that makes normal mapping possible for segments! Great series of books.

Real time rendering : The bible of real-time graphics. Lots of white paper type articles.

----------------------------------------
"bond1 - You see this name, you think dirty."
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 11th Apr 2010 01:56 Edited at: 11th Apr 2010 01:57
Quote: "@bond1, is there any chance you would be willing to sell your new shaders now via email/PayPal? "


Sorry, I didn't mean to ignore this question. I'm not purposely holding this shader back like some evil mad scientist. It will likely need to be tweaked a bit more with all the changes going on with 1.17. There will be two versions, a ps2.0 version, and a higher quality ps3.0 version with parallax offset.

The ps3.0 version actually uses less pixel shader instructions so is a bit more efficient while looking better because of optimizations available on shader model 3 hardware. Nvidia users will want to use this version. The sm2.0 version still looks pretty good though, and is the version shown in the newsletter video on the X10 segment.

----------------------------------------
"bond1 - You see this name, you think dirty."
SOLO DESIGN
15
Years of Service
User Offline
Joined: 30th Jul 2008
Location:
Posted: 23rd Apr 2010 13:33
Hi,
When can we expect to be able to normal map segments?

Thanks
DarkAngelOblivion TM
14
Years of Service
User Offline
Joined: 7th Oct 2009
Location: Down under mate
Posted: 23rd Apr 2010 17:19
esactlywat is goin on with 1.17? could someone fill me in on the "big" changes (sory for off topic)

Tomorrow never comes until it is too late...
Nomad Soul
Moderator
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 23rd Apr 2010 18:51
You need to follow the FPSC migration thread for that.

Login to post a reply

Server time is: 2024-05-17 09:09:10
Your offset time is: 2024-05-17 09:09:10