Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Nuke on September 17, 2006, 03:10:24 pm

Title: getting ready for shaders (fx composer?)
Post by: Nuke on September 17, 2006, 03:10:24 pm
i just downloaded this thing from nvidia called fx composer, which is supposed to be a shader programming tool. i was curious if this thing creates shaders in the proper format/version that are planned to be implemented, or if its some nvidia only thing. essentially i want to get used to writing shaders before they get implemented. im wondering if this tool is any good for what were gonna be doing. also if this wont work, is there something similar that will?
Title: Re: getting ready for shaders (fx composer?)
Post by: taylor on September 17, 2006, 05:57:07 pm
You need something that can output GLSL compatibile shaders.  FX Composer is for HLSL, which is Windows/Direct3D only, so it won't be of any use for shaders used by FSO.  I'm not aware of a similar tool for GLSL, but I wouldn't be at all surprised if there is one.  Hopefully someone else will post a link.
Title: Re: getting ready for shaders (fx composer?)
Post by: Mehrpack on September 17, 2006, 11:40:18 pm
hi,
i search a bit in the web.

i believe i found something: the OpenGL shader desinger. the source code is release for windows and linux, and the use is for free.
but now to the problem: the site is down, i doesnt know if its only temporaly or for all the time, but i doesnt hope so.

here is the link: http://www.typhoonlabs.com/.

and i found another interesing link-list in a forum:

http://www.beyondvirtual.com/smf/index.php?PHPSESSID=125a62a71aa147563efd22a44ca128fd&topic=498.0

maybe there some helpful.

Mehrpack
Title: Re: getting ready for shaders (fx composer?)
Post by: WMCoolmon on September 18, 2006, 12:33:27 am
Bobb is also planning on making extensive use of the scripting system, so something akin to an in-game designer ala GMod may be entirely possible.

Would it be entirely too blatant if I *COUGH COUGH* GMOD *COUGH COUGH*'d?

Also, Google FTW (except in cases of evil monopoly):
http://www.ati.com/developer/ashli.html
http://www.ati.com/developer/rendermonkey/

RenderMonkey does seem to work on my humble GF6600GT, so it does seem to be card independent (though you may be out of luck on Intel integrated graphics). Note that when I tried to toy around with the render window itself, moving it or enlarging it, I suddenly entered the days of pervasive texture dithering. This sort of thing is fixable by bumping your desktop resolution up a notch, to 32-bit color.
Title: Re: getting ready for shaders (fx composer?)
Post by: Nuke on September 18, 2006, 04:12:55 pm
so long as it doesnt hate nvidia cards il give it a try. it definately has a cooler name :D
Title: Re: getting ready for shaders (fx composer?)
Post by: Flipside on September 18, 2006, 05:01:53 pm
Hmmm.. The Rendermonkey artists workspace view looks not too dissimilar to stuff I've used in the past. Good time to start playing I guess ;)
Title: Re: getting ready for shaders (fx composer?)
Post by: Nuke on September 18, 2006, 06:47:15 pm
hey, i made the sf  succubuus furry :D

http://img119.imageshack.us/my.php?image=fuzzysuckpr9.jpg
Title: Re: getting ready for shaders (fx composer?)
Post by: Ghost on September 20, 2006, 08:43:51 pm
Is there anything for nVidia cards? I really wish dad had stuck with ATi on this new computer, but eh, what can you do. I just want something that resembles Bloom or HDR, which makes the current subspace effect a billion times better.
Title: Re: getting ready for shaders (fx composer?)
Post by: Flipside on September 20, 2006, 10:01:51 pm
Heh, created a quick beam effect via tweaking...

http://www.aqsx85.dsl.pipex.com/Beam.rfx

Title: Re: getting ready for shaders (fx composer?)
Post by: Taristin on September 21, 2006, 12:41:49 am
(though you may be out of luck on Intel integrated graphics)

Which is always the case anyway. Intel integrated doesnt even have HTL support.
Title: Re: getting ready for shaders (fx composer?)
Post by: Nuke on September 21, 2006, 12:16:39 pm
shader beams will rock. our effects will finally get a major revamp once theese things are in.
Title: Re: getting ready for shaders (fx composer?)
Post by: Flipside on September 21, 2006, 12:51:28 pm
The best bet would be to write a texture script that adjust Glow Strength (in the case of the quick one I did) as the beam kicks in, so it starts at 0, builds up to about .8, and then drops back to 0 afterwards, that would look pretty awesome ;)
Title: Re: getting ready for shaders (fx composer?)
Post by: DaBrain on September 21, 2006, 04:23:13 pm
Your link is dead...

I don't get RenderMonkey. :( For some reason I got the feeling you can't just learn writing shader without learnin OpenGL...
Title: Re: getting ready for shaders (fx composer?)
Post by: Flipside on September 21, 2006, 04:35:48 pm
Well, at the moment, all I'm doing is modifying the demo effects that came with it, to be honest, they cover most types of shader you'd need.

Did you mean my link was down DaBrain? It seems to work ok for me.
Title: Re: getting ready for shaders (fx composer?)
Post by: DaBrain on September 21, 2006, 04:36:54 pm
http://www.aqsx85.dsl.pipex.com/Beam.rfx -> The page cannot be found
Title: Re: getting ready for shaders (fx composer?)
Post by: Flipside on September 21, 2006, 04:48:06 pm
Yup, looks like the FTP is playing up again, I can get at it when I sign on with CuteFTP, but not from a direct link :(
Title: Re: getting ready for shaders (fx composer?)
Post by: DaBrain on September 21, 2006, 06:06:19 pm
A screenhot would be enough. ;)
Title: Re: getting ready for shaders (fx composer?)
Post by: Herra Tohtori on September 21, 2006, 06:18:52 pm
Is there anything for nVidia cards? I really wish dad had stuck with ATi on this new computer, but eh, what can you do. I just want something that resembles Bloom or HDR, which makes the current subspace effect a billion times better.


-Let your screen dust somewhat. Analog Bloom guaranteed.

-wear dusty glasses and turn off all unnecessary lights in the room. Best results you get if your glasses are uniformly dirty - mainly with dust; fingerprints and other grease marks just annoy, but dust actually creates a nice effect.

I'm only half joking here, actually. It sometimes looks rather much like bloom

But aside from these... ways... I don't think you will have any luck with NVidia "smartshaders".
Title: Re: getting ready for shaders (fx composer?)
Post by: Flipside on September 21, 2006, 06:49:20 pm
(http://www.aqsx85.dsl.pipex.com/Beamfx.jpg)

Not sure if this'll work, if not, I'll chuck it on Imageshack or something...

That's actually a still, since the effect is procedurally animated, giving it a more 'plasma' effect.

Edit : Odd, it'll hotlink pictures, but wont transfer other sorts of files....:wtf:
Title: Re: getting ready for shaders (fx composer?)
Post by: Scooby_Doo on September 21, 2006, 07:13:05 pm
After seeing all the work needed to make normal maps, I'm not sure I want normal maps  :shaking:
Title: Re: getting ready for shaders (fx composer?)
Post by: Flipside on September 21, 2006, 07:19:53 pm
LOL They aren't as terrible as they look. Oddly enough, sometimes, the more simplistic and 'clean' you make them, the better they look ;)
Title: Re: getting ready for shaders (fx composer?)
Post by: Scooby_Doo on September 21, 2006, 07:53:15 pm
But don't you need a high poly version that will used to derived the normal map from? I don't want to cut the ships up and do individual panels or worse yet... rivets  :shaking:
Title: Re: getting ready for shaders (fx composer?)
Post by: Shade on September 21, 2006, 08:13:09 pm
Dug around a bit, and there's a nice tutorial on normal maps to be found Here (http://www.highend3d.com/3dsmax/tutorials/materials_and_texturing/118.html). As you'll see, using a high-poly model as base is one option, if you want to go for the super-special-uber-realistic look (I imagine the BSG team might find this useful considering the ridiculous detail on their top of the line Galactica model). But you can also just convert a standard greyscale bump map if all you want is to add some extra detail here and there.

Hell, one can probably even combine the two to get something that looks even more detailed than the original super-detailed model, if one feels so inclined :)
Title: Re: getting ready for shaders (fx composer?)
Post by: Flipside on September 21, 2006, 09:12:12 pm
Yup, bumpmap conversion is usually the preferred method unless you are a Masochist, I've tried creating normals using a, something like, 2 million polygon model once, and the program crashed, when I did finally find the problem (1 inverted polygon) it still took nearly 3 disk-churning hours to generate something that looked almost no different to a normal map made with heightmaps.
Just remember to turn anti-aliasing on when doing panel seams, It helps get rid of the 'Grand Canyon' effect sometimes ;)
Title: Re: getting ready for shaders (fx composer?)
Post by: Nuke on September 21, 2006, 09:44:33 pm
i tried generating a normal map for the sf succubus, it was a disasterouse failure. sence i didnt feel like making an uber-high-res succubus, i just applied meshsmooth to the origial. but it only seems to work on areas of the smoothed succubus that potruded from the bounds of the original mesh. theese areas looked higly curved, but there were alot of jaged edges from where the smmoothed mesh curved into the main mesh. come to think of it, normal mapping would look really cool on vasudan fighters, give the bioplating a more scaled look. you could also make planet models look perfectly round. you could also add some serious detail to asteroid models.

ire we gonna use 3 channel normal maps? or some other setup. i noticed some of the dds formats were 2 channeled (uv only). i just want to make sure i make normal maps in the right format for what freespace is gonna use.

oh ive been using melody (nvidia) for generating normal maps from a super-hi-poly model. the program isnt very stable, is there something better i should be using?
 
it seems im a masochist :D
Title: Re: getting ready for shaders (fx composer?)
Post by: Flipside on September 21, 2006, 10:00:25 pm
LOL A Masochist Destructionist.... That's very nearly Zen ;)

Well, the one in Lightwave is probably just as unreliable, it's difficult to set up and freezes solid on occasion, only you have to leave it for about 90 minutes before you find out either way, so I'd say stick with the one that simply crashes at the start :D
Title: Re: getting ready for shaders (fx composer?)
Post by: Scooby_Doo on September 21, 2006, 10:13:54 pm
I've read that site before and no luck.  I ran those the DDS converter but it just produces a blue only normal map.
Title: Re: getting ready for shaders (fx composer?)
Post by: Flipside on September 21, 2006, 10:25:20 pm
Hmmm... I had that happen to me once as well, it's something to do with the settings, I'll take a look tomorrow and see what I can find :)
Title: Re: getting ready for shaders (fx composer?)
Post by: Scooby_Doo on September 21, 2006, 10:44:15 pm
Problem found and fixed. I was using the normal mapping in the save as DDS plugin, not the filter->nvidia tool->normal...

Still it comes out bad... the creaves are pushed out and the panels push in (i.e. the opposite). This is probably cause of my uv mapping scheme.  I don't think I'll be bothering with normal mapping anyways, takes too long to render on this old piece of junk LOL
Title: Re: getting ready for shaders (fx composer?)
Post by: Flipside on September 21, 2006, 10:47:27 pm
LOL Just desaturate your colour maps and convert them if you have to, any normal map is better than none ;)
Title: Re: getting ready for shaders (fx composer?)
Post by: Shade on September 21, 2006, 10:53:07 pm
If it comes out exactly opposite of how you wanted it, you could always try inverting the colours and see if it works.
Title: Re: getting ready for shaders (fx composer?)
Post by: Nuke on September 21, 2006, 11:42:13 pm
i was going over the newest version of the nvidia dds plugin for photoshop and noticed a few cool new things theres a new dxt5_nm format (compressed but designed specifically for xyz normal maps) that ive not seen before. it seems the best format tu use, as its compressed (and hopefully lossless). it also seems we can now fade out the alpha of transparancy, which makes the handeling of cockpits better (as you can fade out the glass with distance, and turn of the cockpit using that detail box gizmo thingie). theres a checkbox to allow non power of 2 dxts, anyone know if freespace can use them? finally we got alpha zero border, which will help clean up things like skybox corners. you now have 3 settings of compression quality. alot of cool stuff, its why its good to update your dev tools from time to time.
Title: Re: getting ready for shaders (fx composer?)
Post by: Flipside on September 21, 2006, 11:54:33 pm
Hmmmm.....Thanks for that, I could seriously use one or two of those features :D

/me goes to update his Nvidia tools...
Title: Re: getting ready for shaders (fx composer?)
Post by: Scooby_Doo on September 22, 2006, 12:09:50 am
Bleh... either inverted or regular the mesh is completely torn apart.

I'll stick with bumpmapping for now..
(http://img.photobucket.com/albums/v356/Shodan_AI/larsbumped.jpg)
Title: Re: getting ready for shaders (fx composer?)
Post by: taylor on September 22, 2006, 02:16:06 am
theres a checkbox to allow non power of 2 dxts, anyone know if freespace can use them?
Nope, it won't.  Non-power-of-2 DXTs were crashing for many people so I made it a requirement.
Title: Re: getting ready for shaders (fx composer?)
Post by: DaBrain on September 22, 2006, 04:14:31 am
Did I ever post this picture?

(http://img223.imageshack.us/img223/8247/pernormalverggv2.jpg)

 :D
Title: Re: getting ready for shaders (fx composer?)
Post by: Shade on September 22, 2006, 04:30:40 am
*is speechless*
Title: Re: getting ready for shaders (fx composer?)
Post by: taylor on September 22, 2006, 04:37:07 am
That's the primary model/maps that I'm using to test the new code with btw.  :D
Title: Re: getting ready for shaders (fx composer?)
Post by: Scooby_Doo on September 22, 2006, 04:52:57 am
Is that normal mapping or bumpmapping Debrain?
Title: Re: getting ready for shaders (fx composer?)
Post by: DaBrain on September 22, 2006, 05:03:50 am
Normal mapping in MAX.

It was simple, just took my last PSD of the high-res map I made, took the 'lines' layer, added some stuff and used the Nvidia Normal Map Converter on it (height map -> normal map).

(http://img69.imageshack.us/img69/297/fighter2t03abumpzl8.jpg)
Title: Re: getting ready for shaders (fx composer?)
Post by: Colonol Dekker on September 22, 2006, 05:29:46 am
Bumperiffic, Now do the Aeolus :nod:
Title: Re: getting ready for shaders (fx composer?)
Post by: Nuke on September 22, 2006, 02:29:10 pm
thats pretty cool.

how are normal maps encoded? im assuming blue is your depth channel, which would make red and green your x and y channels. how are theese cnhannels signed (theres gotta be a middel, 0 right)? are the normals relative to the face normal?
Title: Re: getting ready for shaders (fx composer?)
Post by: DaBrain on September 22, 2006, 03:03:22 pm
Well, the blue channel isn't 100% like the height map. It's more a view of the difference between high and deep parts. So you don't know how much deep it actually has. You can only see a border line.

The other channels are for light from the top to the bottom and from left to right.
Title: Re: getting ready for shaders (fx composer?)
Post by: Scooby_Doo on September 22, 2006, 03:56:39 pm
Isn't blue perpendicular to the poly normal?
Title: Re: getting ready for shaders (fx composer?)
Post by: Bobboau on September 22, 2006, 04:46:36 pm
parallel to the normal perpendicular to the poly.
Title: Re: getting ready for shaders (fx composer?)
Post by: Scooby_Doo on September 22, 2006, 05:29:47 pm
Ya your right... my bad.
Title: Re: getting ready for shaders (fx composer?)
Post by: Nuke on September 22, 2006, 06:03:07 pm
that clears that question up for me :D
Title: Re: getting ready for shaders (fx composer?)
Post by: Taristin on September 23, 2006, 01:54:39 am
The potmarking on the pers is cool, but the plating lines look attrocious.
Should probably point out I realize its a test... >..>;;
Title: Re: getting ready for shaders (fx composer?)
Post by: DaBrain on September 23, 2006, 03:47:31 pm
I was thinking... can we get specular bloom from this? Cause I really liked that in X3. I can clearly imagine how this would look in FS2. ;)
Title: Re: getting ready for shaders (fx composer?)
Post by: Nuke on September 24, 2006, 01:35:02 am
i just noticed ts7 has a built in normal map shader. this really saves me lots of time, as i was trying to figure out how to actually view models with normal maps.