Hardware Skinning for Irrlicht 1.7
-
- Posts: 194
- Joined: Thu Mar 18, 2010 3:31 am
- Contact:
Am I the only one getting shader compilation errors here?
I'm compiling with eclipse using MinGW GCC. Does that make any difference?
If it does, we'll tar and feather you for writing platform dependent code for a cross platform engine.
Here's the relevant source code if it helps.
Scene = what would normally be 'smgr'
and irrlicht = what would normally be 'device'
I'm using christianclavet's latest version.
Loaded mesh: dwarf.x
Joint Num: 46, current limit is 55 joints.
GLSL shader failed to compile
ERROR: 0:17: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:17: 'assign' : cannot convert from 'int' to 'uniform float'
ERROR: 0:18: '-' : wrong operand types no operation '-' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:18: '[]' : integer expression required
ERROR: 0:20: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:20: 'assign' : cannot convert from 'int' to 'uniform float'
ERROR: 0:21: '>' : wrong operand types no operation '>' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:22: '-' : wrong operand types no operation '-' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:22: '[]' : integer expression required
ERROR: 0:24: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:24: 'assign' : cannot convert from 'int' to 'uniform float'
ERROR: 0:25: '>' : wrong operand types no operation '>' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:26: '-' : wrong operand types no operation '-' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:26: '[]' : integer expression required
ERROR: 0:28: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:28: 'assign' : cannot convert from 'int' to 'uniform float'
ERROR: 0:29: '>' : wrong operand types no operation '>' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:30: '-' : wrong operand types no operation '-' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:30: '[]' : integer expression required
ERROR: 0:32: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:34: 'constructor' : constructing matrix from matrix (reserved)
ERROR: 0:34: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:40: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:41: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:42: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:43: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 26 compilation errors. No code generated.
I'm compiling with eclipse using MinGW GCC. Does that make any difference?
If it does, we'll tar and feather you for writing platform dependent code for a cross platform engine.
Here's the relevant source code if it helps.
Scene = what would normally be 'smgr'
and irrlicht = what would normally be 'device'
Code: Select all
IAnimatedMeshSceneNode* dwarf = Scene->addAnimatedMeshSceneNode(Scene->getMesh("dwarf.x"));
dwarf->setScale(vector3df(1,1,1));
dwarf->setMaterialFlag(EMF_LIGHTING, true);
HWSkinCB::getInstance()->setupNode(irrlicht,dwarf,30);
I'm using christianclavet's latest version.
LazerBlade
When your mind is racing, make sure it's not racing in a circle.
3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
When your mind is racing, make sure it's not racing in a circle.
3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
-
- Posts: 194
- Joined: Thu Mar 18, 2010 3:31 am
- Contact:
Aw snap!
I just found that when I run the demo and select to use OGL rendering, I get the same errors unless I disable HW skinning. The payload BTW, is that all the meshes appear dark. Probably because they're unlit.
Here's the full output of the demo:
I just found that when I run the demo and select to use OGL rendering, I get the same errors unless I disable HW skinning. The payload BTW, is that all the meshes appear dark. Probably because they're unlit.
Here's the full output of the demo:
Dx or Ogl?
1.Dx
2.Ogl
2
Activate the hardware skinning?
1.Yes
2.No
3.Disable skinning
1
Enable Lighting?
1.Yes
2.No
1
Joint Num: 46, current limit is 55 joints.
Irrlicht Engine version 1.7.2
Microsoft Windows XP Professional Service Pack 3 (Build 2600)
Using renderer: OpenGL 2.0.5077
MOBILITY RADEON X300 x86/SSE2: ATI Technologies Inc.
OpenGL driver version is 1.2 or better.
GLSL version: 1.1
Loaded texture: E:/lazerbladegames/Irrlicht/hwSkin/24. Hardware Skinning/axe.jpg
Loaded texture: E:/lazerbladegames/Irrlicht/hwSkin/24. Hardware Skinning/dwarf.jpg
Could not open file of texture: dwarf2.jpg
Loaded mesh: dwarf.x
GLSL shader failed to compile
ERROR: 0:17: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:17: 'assign' : cannot convert from 'int' to 'uniform float'
ERROR: 0:18: '-' : wrong operand types no operation '-' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:18: '[]' : integer expression required
ERROR: 0:20: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:20: 'assign' : cannot convert from 'int' to 'uniform float'
ERROR: 0:21: '>' : wrong operand types no operation '>' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:22: '-' : wrong operand types no operation '-' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:22: '[]' : integer expression required
ERROR: 0:24: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:24: 'assign' : cannot convert from 'int' to 'uniform float'
ERROR: 0:25: '>' : wrong operand types no operation '>' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:26: '-' : wrong operand types no operation '-' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:26: '[]' : integer expression required
ERROR: 0:28: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:28: 'assign' : cannot convert from 'int' to 'uniform float'
ERROR: 0:29: '>' : wrong operand types no operation '>' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:30: '-' : wrong operand types no operation '-' exists that takes a left-hand operand of type 'uniform float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:30: '[]' : integer expression required
ERROR: 0:32: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:34: 'constructor' : constructing matrix from matrix (reserved)
ERROR: 0:34: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:40: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:41: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:42: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 0:43: 'assign' : l-value required "gl_LightSource" (can't modify a uniform)
ERROR: 26 compilation errors. No code generated.
Resizing window (640 480)
LazerBlade
When your mind is racing, make sure it's not racing in a circle.
3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
When your mind is racing, make sure it's not racing in a circle.
3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Hi Lazerblade!
I think the OpenGL shader crashed. I've been testing this only on Windows Vista so far.
Found out what causing this (most probable cause)
Checked your output:
Humm the shader for openGL seem to require OpenGL 4.0! I've tried to run it on a openGL 3.3 (Radeon EAH 4350) on XP and it crashed too.
Is there someone that know more about shader that could rewrite the shader for a lesser version of OpenGL?
Since you are on XP, have tried the DX shaders? The DX shaders seem to work well on XP. (Tried with Radeons 4300 and 4600)
I think the OpenGL shader crashed. I've been testing this only on Windows Vista so far.
The shader is mostly unmodified from BlindSide and should work on any platform that support OpenGL & DirectXGLSL shader failed to compile
Found out what causing this (most probable cause)
Checked your output:
Not sure the shader can work on this release of GLSL. Mine report release 4.0 here. Do you have all the updated drivers for your X300? Look like it's running on the barebones opengl windows driver.GLSL version: 1.1
Humm the shader for openGL seem to require OpenGL 4.0! I've tried to run it on a openGL 3.3 (Radeon EAH 4350) on XP and it crashed too.
Is there someone that know more about shader that could rewrite the shader for a lesser version of OpenGL?
Since you are on XP, have tried the DX shaders? The DX shaders seem to work well on XP. (Tried with Radeons 4300 and 4600)
-
- Posts: 194
- Joined: Thu Mar 18, 2010 3:31 am
- Contact:
The DX shader works great.
I think I have the latest drivers, I do have an older card though.
Thx!
I think I have the latest drivers, I do have an older card though.
Thx!
LazerBlade
When your mind is racing, make sure it's not racing in a circle.
3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
When your mind is racing, make sure it's not racing in a circle.
3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
-
- Posts: 126
- Joined: Wed Sep 29, 2010 8:23 pm
Re: Hardware Skinning for Irrlicht 1.7
Hiho everybody,
I just wantet to ask if there are some updates or news about Hardwareskinning in Irrlicht.
I tried the code posted by christianclavet and it works on an ATI card (with some modifications in the glsl file because of the #define variables) but now I tried it on my Nvidia GT640 with no success.
The Models just dont appear if I enable HWSkinning.
And there aren't any compile errors.
Here is a part of the Terminal output:
My System:
Ubuntu 12.10 x64
nvidia gt640
driver: Nvidia 304.48
OpenGL 4.2
What can I do to solve this problem?
Best regards
Ritti
I just wantet to ask if there are some updates or news about Hardwareskinning in Irrlicht.
I tried the code posted by christianclavet and it works on an ATI card (with some modifications in the glsl file because of the #define variables) but now I tried it on my Nvidia GT640 with no success.
The Models just dont appear if I enable HWSkinning.
And there aren't any compile errors.
Here is a part of the Terminal output:
Code: Select all
getting name: : end
CXFileReader: reading animation
CXFileReader: reading animation key
CXFileReader: reading animation key
getting name: : hit
Time to load ascii X file: 93ms
Loaded mesh: dwarf.x
Joint Num: 46, current limit is 55 joints.
Ubuntu 12.10 x64
nvidia gt640
driver: Nvidia 304.48
OpenGL 4.2
What can I do to solve this problem?
Best regards
Ritti
Re: Hardware Skinning for Irrlicht 1.7
hi, I add the HardwareSkinCallback.ccp and HardwareSkinCallback.h in my project, and then I use my Dondo function as follows:
DLL_EXPORT void* DLL_APIENTRY HardwareSkin(const char* FileName)
{
IAnimatedMeshSceneNode* mesh1 = SceneManager->addAnimatedMeshSceneNode(SceneManager->getMesh(FileName));
ISkinnedMesh* mesh = (ISkinnedMesh*)mesh1->getMesh();
mesh->setHardwareSkinning(true);
HWSkinCB::getInstance()->setupNode(device,mesh1,17);
return (void *)mesh;
}
I fail to see the 3d model, this maybe bad my code? I copy the main example.
greetings.
DLL_EXPORT void* DLL_APIENTRY HardwareSkin(const char* FileName)
{
IAnimatedMeshSceneNode* mesh1 = SceneManager->addAnimatedMeshSceneNode(SceneManager->getMesh(FileName));
ISkinnedMesh* mesh = (ISkinnedMesh*)mesh1->getMesh();
mesh->setHardwareSkinning(true);
HWSkinCB::getInstance()->setupNode(device,mesh1,17);
return (void *)mesh;
}
I fail to see the 3d model, this maybe bad my code? I copy the main example.
greetings.
Re: Hardware Skinning for Irrlicht 1.7
ok, ok, this is for anyone that the same thing happens to me or Ritti, the shader opengl does not work only works in DX9.
A greeting.
A greeting.
Re: Hardware Skinning for Irrlicht 1.7
For hardware skinning the best idea is to use shader-pipeline branch (OGL 2D rendering in broken, but it'll be fixed soon). With FVF support you can prepare custom vertex attributes.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Hardware Skinning for Irrlicht 1.7
Hi Nandro, although I know that here should not be the issue, but since you mention your shader-pipeline branch, I have several questions,
The version of that branch will irrlicht 2.0 support DirectX 11?
and if so approximate date for publication as a download?
otherwise it would be nice to explicaras how the skin with that branch hardware.
Greetings.
The version of that branch will irrlicht 2.0 support DirectX 11?
and if so approximate date for publication as a download?
otherwise it would be nice to explicaras how the skin with that branch hardware.
Greetings.
Re: Hardware Skinning for Irrlicht 1.7
Yes, this branch will be part of Irrlicht v2.0 (in v2.0 we'll oficially most of support current drivers + OGL ES drivers from ogl-es branch (those drivers will be available in v1.9) and 2 new drivers - DX11 and OGL3.x Core Profile).
Currently we don't know when v2.0 will be available. Check changes in shader-pipeline branch.
I don't have any samples on hdd, but you can check how to FVF system works in Irrlicht sources/examples (I also explained it on this forum in FVF topic some time ago). You can put vertex data like an indices and weights via attributes (GLSL) and semetics (HLSL).
BTW. I already fixed 2D renderer in OGL. All examples works fine now.
Currently we don't know when v2.0 will be available. Check changes in shader-pipeline branch.
I don't have any samples on hdd, but you can check how to FVF system works in Irrlicht sources/examples (I also explained it on this forum in FVF topic some time ago). You can put vertex data like an indices and weights via attributes (GLSL) and semetics (HLSL).
BTW. I already fixed 2D renderer in OGL. All examples works fine now.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Hardware Skinning for Irrlicht 1.7
Nadro thank you very much, I'm very close to both the trunk (which is now in its 1.9), both the branch-shader pipeline, I'll be waiting for the big news of its release