|
Post by callisto2002 on Feb 19, 2008 15:51:09 GMT -5
Hi, if you want to create notes with shader effects (like the environment mapping in GZ Beta 4), this should get you started. XNA compiles the effect and all the data to initialize it into the .xnb file. Therefore, in order to add your own effect, you have to make sure that it compiles into that file together with your model. XNA compiles content through something called the content pipeline. In order to compile your effect and model into the .xnb, you create a custom pipeline stage which puts does that. To get you started with that, I included that code for the pipeline stage that I used to add the environment map: rapidshare.com/files/93239109/EnvironmentMappingEffectPipeline.rar1. Open this project within XNA 2. Create a second XNA Game project 3. In the 2nd project, under "References" (within the project explorer), choose "add reference" and add a reference to the first project (the one you opened in step 1). 3. Add your model (and textures, if it needs any) to the content folder of the 2nd project 4. Put your shader (I included a sample .fx shader with the project) into the same directory as the model. If you use a different name for the shader than I did, change the name in the code accordingly. Also add you environment map (EnvironmentMap.png) into the model directory, if you're using my sample shader. 5. In the project explorer, select the model you just added, choose properties and set the "Content Processor" to "EnvironmentMappedModelProcessor" (which is what I called the processor whose code you just downloaded). Disclaimer: I created my model processor by modifying a great example from the Microsoft XNA team. Bye, Callisto ------------------- BTW: Mods, why can't I create a new post in the "Development" section? I only have the option to create a poll
|
|
|
Post by flipsk8r1409 on Feb 19, 2008 19:27:48 GMT -5
ok but where do i put the shaders? how do i add custom ones or is this example only for the environment map? nevermind edit ok followed your instructions and it did nothing my note is exactly the same
|
|
|
Post by callisto2002 on Feb 20, 2008 3:14:09 GMT -5
flipsk8r1409I updated my tutorial slightly, have a look at step 4. I assume you're missing the texture used for environment mapping (i.e. EnvironmentMap.png?). Also, have a look at the code - I'm only adding the shader to certain parts of the model.
|
|
|
Post by fatdog on Feb 20, 2008 8:17:33 GMT -5
is it not possible to get external shaders working when i was doing my original notes i tried using shaders, the xnbs were linking to them properly but the game always gave an error when it tried to read the shader file
external textures on the other hand are working fine and its nice to be able to swap around textures without needing to recompile the notes
|
|
|
Post by callisto2002 on Feb 20, 2008 8:30:29 GMT -5
fatdogSorry, but that's not really related to what we're doing here, is it? This tutorial is about compiling your custom shaders into your custom node models, which is working fine. BTW: If you compile your shader to an .xnb and link it using the process described here, you could possibly get away with exchanging the shader's .xnb.
|
|
|
Post by fatdog on Feb 20, 2008 17:36:19 GMT -5
i thought it was on topic for the thread, sorry
|
|
|
Post by 4everfree on Feb 21, 2008 12:51:54 GMT -5
callisto2002, what apps will I need to crate the notes with custom shadders? maybe visual c++ and XNA game studio?
|
|
|
Post by callisto2002 on Feb 21, 2008 14:31:50 GMT -5
4everfreeYou need: 1. Some modelling program to create the note models 2. Microsoft XNA Game Studio to compile the note models to .xnb files.
|
|
|
Post by 4everfree on Feb 22, 2008 9:17:12 GMT -5
Thanks callisto2002.
About the programs that I need: Is a good idea use 3D Studio MAX and XNA Game studio (I think that to install XNA Game Studio I need something like visual studio...)?
|
|
|
Post by callisto2002 on Feb 22, 2008 12:58:11 GMT -5
In contrast to Visual Studio, XNA Game Studio 2.0 is completely free and can simply be downloaded from the Microsoft Website.
Furthermore, 3D Studio Max can be quite expensive. There are simpler modelling programs, like Caligari Gamespace Light, that will also do the trick - and those are free.
Bye, Callisto
|
|
|
Post by HEXEN/TRACKER22 on Feb 22, 2008 13:03:36 GMT -5
just...
Caligari Gamespace owns!
^^ great program chek out the tutorials for create models, maps, characters and export to Quake 3 UT or Quake 2 ^^
|
|
|
Post by skizot on Feb 22, 2008 14:15:08 GMT -5
callisto what options do we have via shaders?
normal maps? spec maps? glow maps?
just checking as I'm THINKING about doing some more models and would like to know my limitations before hand.
|
|
|
Post by 4everfree on Feb 22, 2008 16:33:15 GMT -5
Caligari GameSpace 211€! oh my god... I think that is cheaper buy the GeForce 6200 to play at GuitarStar xD
after all, thanks, soon I will download the XNA Game Studio 2.0 (with a 186Kb/s internet conection is not a good idea download anything at midnight xD)
|
|
r4l
Mic Tester
Posts: 1
|
Post by r4l on Feb 22, 2008 23:47:05 GMT -5
Does this mean there is a chance for someone to take off the shader requirement completely?
|
|
|
Post by callisto2002 on Feb 23, 2008 7:06:29 GMT -5
Nope. XNA is shader-based and if you card won't do, then XNA won't run on it.
|
|
|
Post by callisto2002 on Feb 23, 2008 7:07:47 GMT -5
4everfreeBut there is a free version if you don't want to do high-poly-count models.
|
|
|
Post by skizot on Feb 25, 2008 13:08:42 GMT -5
fine then... DON'T answer me
|
|
|
Post by callisto2002 on Feb 25, 2008 16:11:07 GMT -5
skizotOh - sorry! Sometimes I just don't pay enough attention. You're one of the best content producers around here, so be assured that I'd never intentionally ignore you. You can also always send me a PM. Anyway, to answer the question: Basically, you don't have any limitations regarding the shaders. If you compile the shader into the model, then you can basically do anything that you like within the shader. (Disclaimer: At least I think you can. If there's something fancy that you want to do, we can always do a test-run first) On a completely unrelated note: What happened to our model-based-meters? I managed to get the animated textures working, so if we had a good-looking pair of models, I would start including them into the game...
|
|
|
Post by skizot on Feb 25, 2008 19:26:32 GMT -5
work. LOTS of work. I'm at work right now. WORKING.
lol.... 55-60 hours a week = sux
|
|
r4l
Mic Tester
Posts: 1
|
Post by r4l on Feb 25, 2008 21:42:33 GMT -5
work. LOTS of work. I'm at work right now. WORKING. lol.... 55-60 hours a week = sux Mad moneys though.
|
|
|
Post by pedroion on Mar 4, 2008 14:14:10 GMT -5
i know it isnt the right place, but are there any notes with shaders? i wanna see some glowing, like in the real game!
|
|
|
Post by flipsk8r1409 on Mar 5, 2008 7:07:10 GMT -5
hey callisto could you upload a sample environment map image?
|
|
|
Post by crazy.neo on Mar 10, 2008 13:15:29 GMT -5
If the note only uses 1.4 shaders, does that means that it will be the new requirement?
|
|
|
Post by skizot on Mar 13, 2008 19:00:19 GMT -5
well i can get my notes ingame but i can't get ANY shaders to work.
if someone can send me a sample max file so i can see what they are doing that i'm not it'd be very helpful.
|
|
|
Post by flipsk8r1409 on Mar 13, 2008 19:20:51 GMT -5
it has nothing to do with the max file are you sure that your including an evironment map image in the project and putting everything in the same directory?
|
|
|
Post by skizot on Mar 13, 2008 19:54:36 GMT -5
yessir i am.
|
|
|
Post by iamdaddy on Aug 23, 2008 18:25:59 GMT -5
Moved to tutorials
|
|