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.

DarkBASIC Professional Discussion / The Ultimate Shader Thread.

Author
Message
Ninja Matt
19
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Lincolnshire, UK
Posted: 17th Aug 2004 10:33
@Tartopom:
In my normal shader - no, sorry, you can't add more lights. You see, the lighting is done in the shader itself, not with the standard DB lights, and I've built my shader to only use a single point light. Although, since you've asked, and since it would probably be a much-used shader, I'll probably update it soon. If I do it correctly, it shouldn't be too hard to get four or five lights out of it and, if I'm lucky, coloured lights!

@Try:
Again, my normal mapping shader is the most basic one that I could throw together, so you don't actually get any control over the height of the bumps. Still, something like that would usually be pre-calculated on the texture itself, so you don't have to use any instructions changing the value in the shader. You only get eight instructions to begin with, remember!

Although, for a quick hack, you can change the dp3_sat r0, t1_bx2, t2_bx2 line to dp3_sat r0, t1_bias, t2_bias, which should effectively halve the effect of the bumps.

@Everybody:
And, once again, I've got another shader for everybody. This is another shader I'm going to be using in my game, but I'll probably enhance it before I do, so you might see another version sooner or later. I'm also quite chuffed that I managed to convert it over to PS 1.1, since it uses texture dependent reads and they're pretty messed up in the older versions!

Anyway, what we have a simple metallic shader that utilises normal maps to get a nice 3D effect. It's not such a far cry from the hologram shader, actually, as it reads the shininess from a 1D lookup table that is made so a shallow eye angle causes the metal to shine brighter. Usually, an effect like this would probably be done with a cubic environment map instead of a 1D map, but this method is faster and saves a lot of memory. Not to mention that it was easier to program, too! It still looks nifty, and that's what matters, right?





http://mysite.wanadoo-members.co.uk/wisemonkeys/darkbasic/Metal11.zip

Hope you like it, there'll be another one soon!
Ilya
20
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 17th Aug 2004 11:50 Edited at: 18th Aug 2004 03:26
Question about the fx in the NVIDIA fx composer:
Can I use them in my apps?
I couldn't find anything on the fx composer site but I didn't check the whole thing.

[EDIT] the fx in "Question about the fx" means the .fx exmaple files.

-Ilya
Tartopom
19
Years of Service
User Offline
Joined: 27th Jun 2004
Location:
Posted: 17th Aug 2004 23:27 Edited at: 17th Aug 2004 23:29
@Ninja Matt

Ok, Thanks for reply.

Just like to know how it's done in games like doom3....
Try
19
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 18th Aug 2004 00:30
@ Ninja Matt

your normal mapping shader maybe simple but it is effective.

i changed dp3_sat r3, bx2, r2_bx2 to dp3_sat r3, r1_bias, r2_bias in you NormalMapping10.Fx and it worked (nice!). but i like the first one much more, just it needs more bump!

so, it's possible to have a bump height in asm shaders, i'm wondering if it is! But how?!!!

could you use a variable in your shader that makes the bump height changes possible? (just a suggestion, because it would be Very useful)

thanks.
Ninja Matt
19
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Lincolnshire, UK
Posted: 18th Aug 2004 05:46 Edited at: 18th Aug 2004 06:00
@Ilya
Yes, it is possible to use most of FX Composer's .fx files. There's quite a lot about converting them in the earlier posts of this thread, but it mostly boils down to changing the ResourceName fields into name and then plugging in certain constants that aren't automatically supported by DarkBasic. If you head over to the first page of this thread, Neopyte explains how to convert them far better than I ever could!

@Tartopom:
Doom 3 is quite a large step-up from my level of shaders! Granted, the underlying mathematics is similar, but Doom 3 will, no doubt, be implementing several powerful optimisation techniques that lets the designers get the effects they want without loading the system with excessive data. Still, I'll see what I can do with the next version!

@Try:
Ah, you wanted the bumps to be bigger, not smaller!

Again, as I said before, this would usually be done on the texture itself, to save instructions in the shader. If you want to enhance the bumps, the best thing to do is split the normal texture into it's individual channels and then apply a contrast enhancing filter or a gamma curve to increase the depth of the bumps. You'll probably accidentally change the normals so they aren't unit-length anymore but, providing they're nearly unit-length, you shouldn't notice any problems.

Edit:
Taking a quite look at the normal map shader, something has struck me - the bumps ARE actually quite subtle. I didn't quite realise because the textures I used were changed from hi-res 512x512 down to low-res 128x128 to save space in the .zip file, just before I uploaded the lot to my webspace. If you use a higher resolution texture, Try, you'll get much better results!
Try
19
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 18th Aug 2004 06:45
@Ninja Matt

thank you Ninja Matt, i'll Try. maybe i could do it my self

keep on the good work...

GOOD LUCK
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 18th Aug 2004 07:03 Edited at: 18th Aug 2004 07:08
lol...i was all excited about using shaders in DBPro then i realised i have a geforce 4

but at least i have a couple of shaders from you...

"We make the worst games in the universe."
Catalyst
20
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 18th Aug 2004 08:02
@Ninja Matt
I've been a bit busy with work so I didn't have a chance to play with your normal map shader until recently. I used the PS 1.4 version, very nice! Also, hats off to you on getting it working in PS 1.1. I haven't tested it yet, but that will be nice for compatibility.

How would you go about getting multiple lights in there? Would it work to just add another light into the .FX file? Also make it have different specularity and colour from the light would be nice. I've seen stuff about shaders combining normal mapping with cubic ambient occulsion maps, I don't know if they were refferring to getting them working in just one shader. But the result of that should be quite nice, though I don't know if that will get the specularity right. Either way, my game is running at very high FPS right now which means I have lots of room to throw in more shaders and still have it run smoothly. If you have any tips for getting ambient occulsion working, let me know.

Also, I look forward to testing out that hologram shader, looks quite nice!
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 18th Aug 2004 22:07
i downloaded your zip file then opened the source, made sure i had the right file name...

but i got a "effect does not exist at line 25" error

"We make the worst games in the universe."
Catalyst
20
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 19th Aug 2004 01:14
Which ZIP file did you get?

I've tried all of Ninja Matt's shaders, they worked. If you get that error, you might not have hardware support for them. What's your video card?
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 19th Aug 2004 08:42
geforce 4 mx 420...

and i got the last one he posted..

"We make the worst games in the universe."
Catalyst
20
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 19th Aug 2004 14:06
GeForce 4 MX....that's the problem. Using that card for shaders, you'll get about as much support as an eskimo leader in the Sahara. It's just not going to be supported, that card doesn't even support PS 1.1. Check the first page of this thread, it lists what shader versions are supported by each card.
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 23rd Aug 2004 00:11
Ninja matt: I try your hologram shader with a geforce4 ti4800 and i get a black screen. Once I got a flash of a blue torus, then nothing.

Code I used



Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 23rd Aug 2004 12:22
I tried the hologram shader on my Radeon 9800 and it worked quite impressively.

Ninja Matt
19
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Lincolnshire, UK
Posted: 27th Aug 2004 12:28 Edited at: 27th Aug 2004 12:34
Yeah, the Hologram shader works fine on ATI cards - we had a little 'discussion' about it in another thread. All's fine now, and I'll spend a couple of extra moments to make sure my shaders work on all cards now!

Speaking of shaders, I've finally got another one for you! There was a bit of interest in this one, so I'm sure that more than a few of you will find it useful:



http://mysite.wanadoo-members.co.uk/wisemonkeys/darkbasic/NormalMap20.zip

Simply put, it's an updated normal map shader. More advanced than the first one I made, this one allows you to specify two lights, colour them, and set their falloff rate, which is how quickly the light decays to darkness at a distance. Also thrown in is a dash of alpha-controlled specular lighting - although it occupies two passes on it's own! For those without the hardware to handle it, or who aren't shading a reflective object, there's a second technique included in the file that omits the specular lighting. Download and have a look at the sample program to see!

I haven't included the .fx code in the post this time, so you'll have grab the .zip file to get at it. This is because, unlike the other shaders I've made, this one needs quite a lot of input from the user - you can't just throw it onto an object and expect it to work! Still, the extra effort is worth it, because it makes for some very nifty lighting!

Also, for those interested, I'm planning to write and release a few shader tutorials for the community. I'm going to concentrate on the process of writing the shader itself, so that you'll soon learn enough to be able to write your own simple shaders, even if you don't quite know how all the technical stuff is working. It'll probably be released alongside a few of my more 'special' shaders, and you should see it in a couple of weeks time. For now though, look forward to Neo's next tutorial!
Catalyst
20
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 27th Aug 2004 13:21
There you go, once again proving why Ninjas are so great. Look forward to seeing your tutorials too, though by then I'll have finally had a chance to do some studies on my own. Still, excellent work, keep it up!
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 30th Aug 2004 06:01 Edited at: 30th Aug 2004 06:02
just my luck...two years ago i buy the best looking card(within my budget) for $60 than it turns out it's the one card without shader support

BTW shouldn't this be a sticky?

"We make the worst games in the universe."
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 6th Sep 2004 21:19
bumpage for a useful thread

Once you start down the Dark Path, forever will it dominate your destiny...
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 6th Sep 2004 21:28 Edited at: 6th Sep 2004 21:41
Out of interest, why didn't you include the .dbpro file

and also, how do you scale (tile) the texture? I have a great example but I'd like the texture tiled.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Philip
20
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 6th Sep 2004 22:10
This is the thread that just will not die. Its the undead thread.

It scares me.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Sep 2004 22:10
Can't wait to try that shader out honourable Ninja, been choking for something like this for ages.


Van-B


Muhahahahaha.
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 6th Sep 2004 23:45
Quote: "BTW shouldn't this be a sticky? "


Shall I sticky it? I don't see any reason why not since VanB's bones thread was stickied.

(hehe I am quick off the mark!)

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Sep 2004 23:56
It was stickied, but then it got unstuck, it's full of info though, and cool shaders - so it should be nailed to the top of the forum.

*Van-B eggs-on David to use his newly aquired mod abilities*


Van-B


Muhahahahaha.
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 7th Sep 2004 00:04
Quote: "*Van-B eggs-on David to use his newly aquired mod abilities*"


There you are

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 7th Sep 2004 19:02
Thanks David T.

@Everyone

Well, I've been swamped with work lately so I haven't really had much oppurtunity to work on my tuts or post shaders. I plan on getting some spare time to work on that sort of stuff soon, but only time will tell if I'll get a chance.
Ninja Matt
19
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Lincolnshire, UK
Posted: 8th Sep 2004 23:53 Edited at: 8th Sep 2004 23:56
Wheee! Back to sticky-status!

@David T:
Why not include a .dbpro file? Well, I've heard that there's often problems with it when you change version, and you've got to make a new project file before you game works. Since I'm still on 5.2, I thought it might cause some trouble for everyone else, who've probably upgraded to 5.5 or 5.6 by now!

The texture on the normal map shader is based on the models UV coordinates, so any texture tiling you've got on the model should transfer over to the shader. Unless, of course, I'm messed up somewhere, and the texture is clamped. If that's the case, try using the update I've posted below.

Or, do you want to tile just the normal map? Doing that would probably require modifiying the shader itself, to either accept two sets of UV coordinates, or to alter the normal maps texture coordinates itself. Both are fairly easy changes, and I'd be happy to make you a shader like that if you let me know exactly what you need!

@Everybody:
Well, call me persistent, or just unoriginal, but I've got yet another version of normal map shader for you! The only functional changes are that it can now read up to eight lights, as controlled by the technique you select, and that the shader has been split into two seperate files - one for normal mapping, the other for normal mapping with specular lighting. The reason for this change is that, as more lights are added, so are more passes, which ends up making the .fx files absolutely huge! Click here to grab them:

http://mysite.wanadoo-members.co.uk/wisemonkeys/darkbasic/NormalMap21.zip

There are three techniques in each file: Lights2, Lights4 and Lights8, which differs from the older version which only has the two techniques Normal and NormalSpecular. Apart from this, the effect should plug comfortably into the sample program I made.

Speaking of passes, that's a little problem area that you'll have to be aware of: using all eight lights can seriously slow down you game, as standard lighting will require four passes, while specular lighting will take up a whopping twelve passes! I'd recommend that you optimise your scene to run on four lights instead of eight (remember that shader lighting is defined seperately from the standard lights), which would halve the amount of passes needed. Failing that, you could always modify the shader yourself to accomodate exactly the amount of lights you need - just delete some passes from the Lights8 technique to make your own five or six light technique.

Sorry for all the confusion with the new versions and everything, but it's pretty hard to make a shader to accomodate everybody's differing needs! I'll get it nailed eventually, I hope!
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 9th Sep 2004 01:10
Quote: "@David T:
Why not include a .dbpro file? Well, I've heard that there's often problems with it when you change version, and you've got to make a new project file before you game works. Since I'm still on 5.2, I thought it might cause some trouble for everyone else, who've probably upgraded to 5.5 or 5.6 by now!"


Oh, its always worked for me, I just couldn't understand it Especially when loading media, it's required otherwise you get errors.

And it works with 5.5

Quote: "The texture on the normal map shader is based on the models UV coordinates, so any texture tiling you've got on the model should transfer over to the shader. Unless, of course, I'm messed up somewhere, and the texture is clamped. If that's the case, try using the update I've posted below."


I just need the object texture tiling for a wall (and normals along with it) - I'll have a go

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 14th Sep 2004 04:29
Hey hey Zeal here im back. Got my new comp built (AMD 3200+, Gig of Corsair PC3200, ATI Radeon 9800Pro). Man did this thread ever inspire me to get back into programming!

Thanks again to ninjamat for that terrain shader! Looks great on my new card. Did you ever figure out how to fade the effect out? Again I only want to apply the shader to the chunks near the camera, then fade the effect out into the distance (that way distant chunks dont need any shader, theyll just use the base color map). BTW I ran into a lot of trouble with my realtime lightmaps... I think i might just do good ol vertex lighting, so ill need the shader to support lights now.

And that normal map shader! My god! Nice work! How did you learn assembly anyway? Id really like to take a closer look at it. Got any good internet resources for it?

All you need is zeal
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 14th Sep 2004 04:31
Akk i cant post cause im a newbie again! Help me mod please! im really Zeal, long time member. I think my old email was like jrwieland@adelphia.net or something. Can you please help me get my old account back?

My current email is jeffwieland@adelphia.net you can contact me there.

Thanks in advance!

All you need is zeal
Zeal
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 15th Sep 2004 02:48 Edited at: 15th Sep 2004 02:49
Wohooo remembered the email I used to create Zeal (a old account from when I was down in Florida). Im back baby!

Hey why did this thread get unstickied? As a matter of fact I cant find it anywhere unless I search for it! Am I blind?

BTW Ninja did I hear you say you dont know how to set multiple uv coords for different texture layers? Its very easy with the 'hidden' commands (they only work in 5.2 and below though). Check out this link...

http://forum.thegamecreators.com/?m=forum_view&t=24700&b=1

*edit there she is. Still say it should be re stickied.

All you need is zeal
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 15th Sep 2004 03:48
It was sticked, but absolutely nothing happened. As part of the ongoing purge to cut down on stickied I unstickied it.

As it hadn't been posted in for so long, it had dropped far down in the listings

I'm willing to sticky again if it gets teh regular traffic. There's no point otherwise.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 15th Sep 2004 05:47
There'll be something larger about all of this soon, so let the thread just die along with the bad posts included.


Ninja Matt
19
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Lincolnshire, UK
Posted: 15th Sep 2004 22:33
@Raven:
Quote: "along with the bad posts included."

You mean like your earlier 'contributions'?

@Zeal:
Nice to see you again Zeal - I'd wondered where you'd gone!

I do kinda know how to use extra UV layers, both in DB and in shaders, but I've never actually used them before, so I'd probably mess things up the first couple of times! Your other thread is very useful too, with the vertex modifying. Although, I've been purposely avoiding those hidden commands because I'm meant to be upgrading to 5.5 or 5.6 soon. Still, there's plenty of time to change my mind.

Yes, I have figured out why I couldn't get the fade effect to work - it's all down to the eye position. I can't for the life of me get DB to automatically set a constant to represent the camera position with the ViewIT matrix, but I thought at the time that it was working, and that I'd made a mistake somewhere else. If you're still after the fading effect, I can put it in for the next version along with some vertex lighting.

Unfortunately, there aren't all that many resources for programming ASM (there's not too many for HLSL either, though), and I got most of my experience messing around with pre-made shaders in RenderMonkey and the nVidia Effects Browser, which are mostly all in ASM. However, the one good tutorial that I have managed to find is a fantastic introduction to shader programming - http://www.shaderx.com/direct3d.net/tutorials/shader/shader1.html

Sorry I haven't posted anything new recently, but I'm a bit busy at the moment - I'm going back to University in about a week and I've finally pulled my finger out and returned to working on my game. There's still a ocean shader on the way, so I'll have something else sooner or later!
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 15th Sep 2004 22:40
No matt, i ment exactly what i said.
This thread is a pure mess right now, and a proper replacement is on the way.


Zeal
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 16th Sep 2004 12:52
"If you're still after the fading effect, I can put it in for the next version along with some vertex lighting."

Yes yes still very much after it! Vertex lighting would be great too (me and the lightmaps didnt get along).

Ive been doing a lot of reading on the web and im thinking of just picking up HLSL instead of ASM. Seems to be more tutorials for it and I really like nvidias fx composser (wish there were more tutorial projects/files for that). I also hear a book called "The CG Tutorial" is the place to start if you want to learn HLSL/CG, so im going to try and order that asap. Ill check out that link you posted too.

Cant wait to see your ocean shader too! Id settle for a simple 'water' effect for ponds/streams. A nice ripple effect when you walk in it would be nice too.

All you need is zeal
Try
19
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 17th Sep 2004 07:07
Hello Guys.

in this code, i made the light to follow the camera as it moves in the space



but if you walk around the space, you will see that the light is not working
as it should be

because when you move the camera to see that how the light affects the cubes
you will see that the cube sides are not correctly affected by the light
i mean some times one side most be dark but it's bight and sometimes it should be
bright but it's dark

`````````````````````
please turn arround the objects, go far, near, etc. go to the last and the first cube
you see?!!!
`````````````````````

it seems that the light only affects the first cube (which you see in the first)
so if you turn arround the first cube, everything is OK
but when you try the others!!! everything is wrong

maybe it's the POSITION OBJECT that makes thing wrong
just turn line form "position object i,(i*200)-200,10,0" to
"position object i,(i*200)-200,10,200" or any number and see that everything goes wrong again
even for the first cube

or maybe it's about the 'World' or 'Local' coords in the shader!!!

maybe even it's because of the eyepos thing

any idea?

am i doing somthing wrong or it's BUG?!!!

Thanks
Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 21st Sep 2004 23:17
'contributions' LOL

hey, just wanna THANK you again Matt for the generous sharing of the knowledge, and of your work...

... you are now officially in my will

--Mike
Final Epsilon
20
Years of Service
User Offline
Joined: 26th Jan 2004
Location: CA, USA
Posted: 1st Oct 2004 07:55
lol. same here.
Vlasov Alexey
19
Years of Service
User Offline
Joined: 2nd Oct 2004
Location: Russia
Posted: 2nd Oct 2004 23:24
This shader taked from MAX. Please help me whit adapte to darkbasic(include, please, darkbasic code for update shader parameters(UV scroling speed and UV scaling)real time). Thanks for lot.
p.s. This shader maked for cool magic effects.



Life is beast. Beast must die
Vlasov Alexey
19
Years of Service
User Offline
Joined: 2nd Oct 2004
Location: Russia
Posted: 2nd Oct 2004 23:29
This shader taked from MAX. Please help me whit adapte to darkbasic(include, please, darkbasic code for update shader parameters(UV scroling speed and UV scaling)real time). Thanks for lot.
p.s. This shader maked for cool magic effects.



Life is beast. Beast must die
Final Epsilon
20
Years of Service
User Offline
Joined: 26th Jan 2004
Location: CA, USA
Posted: 8th Oct 2004 06:54
dont die. <sobs>
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 15th Oct 2004 18:16
@Catalyst

"Okay you shady folk here, how about this one: Rendermonkey. It spits out .FX files, but I think I remember hearing tale that they are not regular .FX files and they don't work in DBP. Is this true, or is there some clever way of getting them to work?"

The previous 1.0 version of RenderMonkey wouldn't properly output .FX files. I'm not sure how well RM 1.5 will do because everytime I try to load a shader it crashs or freezes my comp(!). I think it is a safe bet though that they will need a little modifying to get them working in DBPro. Post the output for whatever shader you need here and I'll see what I can do to fix it.

@Everyone

Sorry for not really updating this thread a lot. I've been rather busy lately and this other tutorial that I'm writting is taking up a lot of time. So far if you were to paste all of the shader tuts that I've written so far end to end you wouldn't even reach the size of the current tutorial that I'm working on. And I'm not even close to being finished either!

Anyway, after some thinking, I've decided to cut the part that was giving me problems in part 3 of my FX tutorial. All though I really wanted to write it, the limitations of the tech that I'm dealing with aren't going to allow me to finish it. Instead, I've decided to replace it with something equally as usefull.

However, I will need some help.

What I need is a piece of terrain with a texture and a light map. Now the terrain has to be able to be loaded into DBPro normally. The first texture coordinate channel of the terrain needs to contain the coords for the texture map while the second tex-coord channel needs to contain the coords for the lightmap. So tex-coord channel 0 = regular texture and tex-coord channel 1 = lightmap.

If someone could post a download link for the above two items I'll be able to begin work on my part 3 tutorial. Thanks in advance for any help you can offer me.
Catalyst
20
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 16th Oct 2004 01:34 Edited at: 16th Oct 2004 01:37
Motion Blur was probably the first one I had my eyes on.



Get that one working an I'm naming my first born after you. Well...maybe not quite. But it's the thought that counts. And you know, if someone had way too much time on their hands and felt like working on some of the other ones in there, that would be great too. Maybe it's just me, but I think that pretty much all the effects in Render Monkey are really well done and could be useful at some point.

Glad to see you're still working on this thread Neophyte, I look forward to you next tutorial.



EDIT: I just realized that I was also using version 1 of Render Monkey...must have missed the 1.5 release. I'll grab it and see if it gives anything different.
Catalyst
20
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 16th Oct 2004 01:46
Okay, here's the output of the motion blur .FX file from Render Monkey 1.5

ALPHA ZERO PRODUCTIONS
20
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Mom ! I forgot where we live !
Posted: 16th Oct 2004 02:30
u guys are luckey u all have good graphix cards


ALPHA ZERO PRODUCTIONS INFECTION
NEW WEBSITE ONLINE
Nicholas Thompson
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 16th Oct 2004 02:56
Without trying it - do I need to have RenderMonkey (whatever that is) installed to use these fx?

Catalyst
20
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 16th Oct 2004 04:42
If they work properly, then no. As far as I know, Render Monkey doesn't export them properly. I've yet to see anything out of Render Monkey work in DBP. But, with some modification, they'll work in anything. The modification is the tricky part though, so if you want to see them quickly, then Render Monkey is the way to go.

It doesn't seem like you're familiar with Render Monkey either. It's a free program, grab it from the ATI website. You don't need an ATI card to use it either.
Nicholas Thompson
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 16th Oct 2004 07:27
Dont matter - I have an ATI 9800XT

I'll look into it.. So it makes .FX things?

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 18th Oct 2004 11:05
Hello everybody,

@Ninja Matt[/i] (or anyone that can help us )

I cannot add transparency to a shader. I took "Metal11.fx" file that you provided in your metal shader.

I added the render states at the beginning of the shader:

CULLMODE = CCW;
ALPHABLENDENABLE = TRUE;
ZWRITEENABLE = TRUE;
SRCBLEND = SRCALPHA;
DESTBLEND = INVSRCALPHA;

Here is the full code,


But the object still looks solid. I know this maybe an easy question (and I hope so )
How can we make our shader affected objects to become transparent?

Thanks in advance. By the way, this is a link to another useful tutorial about shaders, don't miss it http://www.gamedev.net/columns/hardcore/dxshader3/default.asp
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 19th Oct 2004 06:41
I forgot to say that the shader I would like to become transparent is a pixel shader.

Maybe I have to provide a texture with an alpha channel?

Login to post a reply

Server time is: 2024-05-07 08:03:07
Your offset time is: 2024-05-07 08:03:07