Lioric
14-04-2006 02:15:29
The "Using Render Monkey Shaders" is added to the Artist Center
This tutorial will cover the process needed to use shaders created in external shader editors and how to add your own shaders to the available shader lists
Additionaly the specular bump mapping shader from RenderMonkey examples is covered, including default parameter mapping and binormal calculation
The direct link:
Using Render Monkey shaders
The part 2 of this tutorial will cover the reflective specular bump mapping example
Woohoo, hope it was worth the wait
... Thanks and just in time for me to tart up the first level of our game.
Really appreciate the effort.
Chris
16-04-2006 22:56:38
Thanks
Love the options through rendermonkey, made my day alot better.
Though I do have a few questions. This example uses normal map for the bump and specular effects, when Im used to, because of Max, have both maps different (higher point on the model does not always mean it is as reflective and such), any ideas how I can do the bump and spec map the old-fashioned way? Hints what should I change or where should I exactly look?
Also, second question. By 'fine tune' what did you exactly mean? Where can I lessen the specularity for example? Tried reducing values in the exported scene files but the specularity was very powerful no matter what I changed, so Im probably missing some option.
Lioric
17-04-2006 17:04:09
Add a new texture sampler in the pixel shader (and add the textureUnit in the pass) that contains the specualr map, then in the shader sample its value and add as the specular component
By "fine tune" it means open the shader parameter editor (in the pass material) for the pixel shader and edit its values, the specular power parameter its called "specular_power" and the specular factor is called "Ks"
When you are using shaders, the fixed function parameters are overriden, so changing the specular color for example, in the pass material will not affect the display, you should change the color in the shader parameter
Chris
17-04-2006 18:26:51
Thanks, thats a great help
Sneer
07-04-2008 22:23:23
Add a new texture sampler in the pixel shader (and add the textureUnit in the pass) that contains the specualr map, then in the shader sample its value and add as the specular component
Is there any shader programm flying around using:
- texture (alpha for transparent)
- normalmap (alpha for specularmap)
tbh, I'm more up for making graphics, then playing around with any codes.
The tutorial is helpfull..but I still dont get a simple slot for a specularmap working. So I will probably never get a specularmap in the normalmapalpha working.
Any help is appreciated
EDIT: transparent parts in a texture is no problem..just getting the alphachannel in the normalmap working as specular map!)
Lioric
08-04-2008 03:20:16
How is that not working in your shader?
You get the alpha component of the normal map sampler (the texture) and use this value as the specular power in your light calculation
Im not sure if the sample uses specular light but if not you can add it using the specular light formula:
specular = objectSpecColor * lightSpecColor * pow((normal dot halfVector), specularPower)
Where objectSpecColor is the object surface specular color
lightSpecColor is the light specular color
normal is the vertex normal
halfVector is the midway vector between: the vector from the vertex to the light source and the vector from the vertex to the camera position
specularPower is the alpha value from the texture
Im sure there are several shader samples available on the net that implements this, if you prefer post here and i will convert it as soon as i get some free time
Sneer
08-04-2008 14:00:15
Oh, the specular effect is working, but like Chris said..the result isn't that perfect by using the normalmapinformation to create specular highlights.
I guess there are loads of shaders in the web..just need to find the places.
@Lioric: I opened the ATI tool for the 1st time, yesterday. Even if its pretty basic stuff..it looks light a nightmare to me atm
I appreciate your help, i'll let you know, if i find any shaders and got stuck anywhere.
your probably using 3dsmax, in which case it might be worth checking out the ShaderFX demo. Should be able to have enough nodes to do the simple shaders your talking about.
If you get Ofusion Pro, you can export Ogre shaders directly from 3dsmax, and what your trying to do shouldn't take more than a few seconds to create in shaderFX.
Sneer
09-04-2008 21:30:28
your probably using 3dsmax, in which case it might be worth checking out the ShaderFX demo. Should be able to have enough nodes to do the simple shaders your talking about.
Yes, im working with 3dsmax7 and it would be great to save the created shader out of 3dsmax, but on the shaderFX homepage they left a note:
Demo version shaders are limited to 8 nodes and cannot save.
I just need this fileformat for a free game, its an hobbyproject and none of the members earn any profit for the game. So I'm not really up for paying money to get some simple shading working. And i think RenderMonkey will do the same job for me...just in a ugly cody way
(i got to learn more about ogre, before i would buy software for it...)
I was busy in the last days..but i will continue to search for a finished shader..if there's no shared stuff on the web, then i'll look into RenderMonkey at the weekend.
edit: sorry for my rubbish english..im from germany.
Lioric
09-04-2008 22:33:27
There seems to be some good shaders from "bloodandirongame" site, including a metal shader that uses specular maps (and probably normal maps), they can be downloaded from its web site,
I have not used them, but the shaders are made for and can be used with the Ogre engine
Sneer
13-04-2008 22:35:07
Thanks for the tip.
I'm using ofusionCE so I'm not sure if they will work properly, but any examples will help!
I installed RenderMonkey aswell, does the ogre-exporter really needs an installation of Loki and Boost, or is there a way around it?
I didn't have much luck at all with the rendermonkey ogre exporter. It only exported the most simple shaders correctly. Bump mapping shaders didn't export. If you know enough about shader coding to edit the source you might have some luck with using it as a starting point though.
Sneer
14-04-2008 20:13:05
no coding for me...
Up to now, the only thing that works fine is the bumpmap tutorial of this header and even that doesn't work in a multi/sub object materialslot.
All the other tutorials at ofusion work fine in 3dsmax, but not in ogre.
I'm getting a bit clueless now
hmm, I havent had any problems so far. If the shader works in ofusion viewport it works in an ogre app too.
One thing I had a problem with was .cg shaders. I was used to using HLSL which is D3D only and works out of the box with no extra plugins. So one of our coders removed all the CG dll's which DX9 didn't need.
When we converted the shaders to CG they wouldn't render. Was because we had no cg.dll and no Plugin_CgProgramManager.dll registered in our ogre plugins.cfg
With those installed properly, Ogre spits out a proper debug errors in your ogre log file if there are problems with your shaders.
PS. If you have a shader that works in the ofusion viewport but not in your ogre app, I'll be happy to test in in my OSM world editor.