I have to say getting up to speed on Ogre has not been the joy I hoped it would be. Two weeks later I'm still trying to understand what should be very simple things in a production pathway but are very unintuitive.
For example, shaders.
All I'd like to do is export a shader from rendermonkey. So I downloaded RenderMonkey and downloaded the shader exporter from http://www.ogre3d.org/wiki/index.php/SoC2006_RmExporter
ok, now what? I've tried installing several times and get nothing showing up in the export window.
Really, and i direct this at ATI, what gives? Why is it so hard to just have a plug in folder, and be able to read those plug ins once they are installed?
And what is everyone else's production pathway?
thanks
Rmexporter for rendermonkey
-
- Orc Shaman
- Posts: 707
- Joined: Sun Apr 02, 2006 7:51 pm
- Location: Sacramento, CA
- x 1
I found the rendermonkey exporter limited, rendermonkey doesn't allow you to load regular .FX shaders and you really need to be able to be able to program in order to use it. Plus the whole process is quite lengthy and convoluted.
I use Ofusion Pro for creating 3D assets for ogre. The pro version now has a ShaderFX bridge that enables you to create shaders and export them straight to Ogre without having any understanding of the underlying code.
So far thats worked best for me.
I use Ofusion Pro for creating 3D assets for ogre. The pro version now has a ShaderFX bridge that enables you to create shaders and export them straight to Ogre without having any understanding of the underlying code.
So far thats worked best for me.
-
- Gnoblar
- Posts: 18
- Joined: Thu Feb 21, 2008 12:14 am
-
- Orc Shaman
- Posts: 707
- Joined: Sun Apr 02, 2006 7:51 pm
- Location: Sacramento, CA
- x 1
-
- Goblin
- Posts: 274
- Joined: Wed Feb 09, 2005 5:09 pm
- Location: catskill escarpment, new york, usa
- x 3
Re: Rmexporter for rendermonkey
an old topic, I know, but rendermonkey is the only free app that can export to ogre without much hand coding. if anyone knows of some easier way to get shaders into ogre without learning to code cg/hlsl/glsl with a free app or exporter, let me know.
the problem is, that when I load the exported .material and dependencies into an ogre using application (i used to use blink3d, but now is use openspace), i cannot transform an object. what i mean is that if i have an object loaded into openspace, if I try to move it, the bounding box for the object moves, but the object does not.
in one case, i used a variation of the rendermonkey stone shader and linked it to a .mesh to use for a terrain. it imports just fine into openspace, but if i try to move it at all, the object, as stated above, does not move, only the bounding box. with the terrain mesh, i gave it physics properties (openspace uses newton), and when i leave the mesh at 0,0,0, the collision mesh matches the rendered object. but if i try to move the mesh or scale it, the collision mesh moves and scales, but the rendered object does not.
perhaps it is something in the .material, .program, and .source files that i can tweak so that the .material can be moved and transformed along with the object it's attached to?
thanks for your $.02.
-h
the problem is, that when I load the exported .material and dependencies into an ogre using application (i used to use blink3d, but now is use openspace), i cannot transform an object. what i mean is that if i have an object loaded into openspace, if I try to move it, the bounding box for the object moves, but the object does not.
in one case, i used a variation of the rendermonkey stone shader and linked it to a .mesh to use for a terrain. it imports just fine into openspace, but if i try to move it at all, the object, as stated above, does not move, only the bounding box. with the terrain mesh, i gave it physics properties (openspace uses newton), and when i leave the mesh at 0,0,0, the collision mesh matches the rendered object. but if i try to move the mesh or scale it, the collision mesh moves and scales, but the rendered object does not.
perhaps it is something in the .material, .program, and .source files that i can tweak so that the .material can be moved and transformed along with the object it's attached to?
thanks for your $.02.
-h
-
- Goblin
- Posts: 274
- Joined: Wed Feb 09, 2005 5:09 pm
- Location: catskill escarpment, new york, usa
- x 3
Re: Rmexporter for rendermonkey
the ogre exporter for rendermonkey exports .program and .material files....i took the contents of the .program files, and put them in the .material file. and i simplified the names of the files.
here is the vertex shader, "crystalvertexshader.hlsl":
here is the pixel shader, "crystalpixelshader.hlsl"
and here is the .material file:
perhaps one of of the matrix delcarations/functions/ i know not which is in object space as opposed to world space? I'm clueless but feel i can figure this out like the gorilla at the zoo who uses a simple machine to can obtain bananas from the button with the bananas picture on it.
-h
here is the vertex shader, "crystalvertexshader.hlsl":
Code: Select all
float4x4 view_proj_matrix: register(c0);
float4 view_position: register(c4);
struct VS_OUTPUT {
float4 Pos: POSITION;
float3 normal: TEXCOORD0;
float3 viewVec: TEXCOORD1;
};
VS_OUTPUT main(float4 Pos: POSITION, float3 normal: NORMAL){
VS_OUTPUT Out;
// Tiny little model .. give it some size
Pos.xyz *= 10;
Out.Pos = mul(view_proj_matrix, Pos);
Out.normal = normal;
Out.viewVec = view_position - Pos;
return Out;
}
Code: Select all
float rainbowiness: register(c0);
sampler Environment: register(s1);
sampler Rainbow: register(s0);
float4 main(float3 normal: TEXCOORD0, float3 viewVec: TEXCOORD1) : COLOR {
normal = normalize(normal);
float v = dot(normalize(viewVec), normal);
// Map a rainbowish color
float3 rainbow = tex1D(Rainbow, v);
// Find the reflection
float3 reflVec = reflect(-viewVec, normal);
float3 refl = texCUBE(Environment, reflVec);
float3 color = lerp(refl, rainbow, rainbowiness * v);
return float4(color, 1 - v);
}
Code: Select all
//DirectX 9.0 HLSL Vertex Shader vs_1_1
vertex_program glassvertexprogram
{
source crystalvertexshader.hlsl
target vs_1_1
entry_point main
}
//DirectX 9.0 HLSL Pixel Shader ps_2_0
fragment_program glasspixelprogram
{
source crystalpixelshader.hlsl
target ps_2_0
entry_point main
}
//Effect: SimpleGlass
material mat05
{
technique
{
//Rendering Pass: Background (pass index: #0 )
pass
{
//State: D3DRS_ZWRITEENABLE, Value : FALSE
depth_write off
//State: D3DRS_CULLMODE, Value : D3DCULL_NONE
cull_hardware none
//DirectX 9.0 HLSL Pixel Shader ps_1_1
fragment_program_ref glasspixelprogram
{
}
//DirectX 9.0 HLSL Vertex Shader vs_1_1
vertex_program_ref glassvertexprogram
{
//Shader Constant: view_position
param_indexed_auto 4 camera_position_object_space
//Shader Constant: view_proj_matrix
param_indexed_auto 0 viewproj_matrix
}
}
//Rendering Pass: Crystal (pass index: #1 )
pass
{
//State: D3DRS_ZWRITEENABLE, Value : TRUE
depth_write on
//State: D3DRS_CULLMODE, Value : D3DCULL_CCW
cull_hardware anticlockwise
//State: D3DRS_SRCBLEND, Value : D3DBLEND_SRCALPHA
//State: D3DRS_DESTBLEND, Value : D3DBLEND_INVSRCALPHA
scene_blend src_alpha one_minus_src_alpha
//DirectX 9.0 HLSL Pixel Shader ps_2_0
fragment_program_ref Effect_Workspace.Glass_Effect_Group.SimpleGlass.Crystal.Pixel_Shader
{
//Shader Constant: rainbowiness
param_indexed 0 float4 0.500000 0.0 0.0 0.0
}
//DirectX 9.0 HLSL Vertex Shader vs_1_1
vertex_program_ref Effect_Workspace.Glass_Effect_Group.SimpleGlass.Crystal.Vertex_Shader
{
//Shader Constant: view_position
param_indexed_auto 4 camera_position_object_space
//Shader Constant: view_proj_matrix
param_indexed_auto 0 viewproj_matrix
}
//Texture Stage 0
//Rainbow: "..MediaTexturesRainbow.tga"
//State: D3DSAMP_ADDRESSU, Value : D3DTADDRESS_CLAMP
//State: D3DSAMP_ADDRESSV, Value : D3DTADDRESS_CLAMP
//State: D3DSAMP_MAGFILTER, Value : D3DTEXF_LINEAR
//State: D3DSAMP_MINFILTER, Value : D3DTEXF_LINEAR
//State: D3DSAMP_MIPFILTER, Value : D3DTEXF_LINEAR
texture_unit
{
texture simpleglass/Rainbow.tga 2d
tex_address_mode clamp
filtering linear linear linear
}
//Texture Stage 1
//Mars Environment: "..MediaTexturesMars.dds"
//State: D3DSAMP_ADDRESSU, Value : D3DTADDRESS_CLAMP
//State: D3DSAMP_ADDRESSV, Value : D3DTADDRESS_CLAMP
//State: D3DSAMP_MAGFILTER, Value : D3DTEXF_LINEAR
//State: D3DSAMP_MINFILTER, Value : D3DTEXF_LINEAR
//State: D3DSAMP_MIPFILTER, Value : D3DTEXF_LINEAR
texture_unit
{
texture simpleglass/Mars.dds cubic
tex_address_mode clamp
filtering linear linear linear
}
}
}
}
-h
-
- Goblin
- Posts: 274
- Joined: Wed Feb 09, 2005 5:09 pm
- Location: catskill escarpment, new york, usa
- x 3
Re: Rmexporter for rendermonkey
respectfully bumping....if there are just a few lines of code to change in the .material file and program declarations at the top of that file, I promise to post one dozen exported rendermonkey shaders to the wiki.
i promise!
-h
i promise!
-h
-
- Goblin
- Posts: 274
- Joined: Wed Feb 09, 2005 5:09 pm
- Location: catskill escarpment, new york, usa
- x 3
Re: Rmexporter for rendermonkey
respectfully bumping...there are maybe two dozen great shaders from rm that i could post to the wiki, but the directx output bug is beyond my meagre shaderknowledge.
-h
-h
-
- Goblin
- Posts: 274
- Joined: Wed Feb 09, 2005 5:09 pm
- Location: catskill escarpment, new york, usa
- x 3
Re: Rmexporter for rendermonkey
bumping, respectfully
-
- Goblin
- Posts: 274
- Joined: Wed Feb 09, 2005 5:09 pm
- Location: catskill escarpment, new york, usa
- x 3
Re: Rmexporter for rendermonkey
respectfully bumping
-
- Goblin
- Posts: 274
- Joined: Wed Feb 09, 2005 5:09 pm
- Location: catskill escarpment, new york, usa
- x 3
Re: Rmexporter for rendermonkey
respectfully bumping....if i can get these rendermonkey exports to work they all go to the wiki i promise! fur, metal, glass, plastic, bubbles. it would be a great help to the ogre community as not many of those shaders are on the wiki.