[Help][NormalMapping] How to achive WITHOUT RTSS?

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
AlexeyKnyshev
Goblin
Posts: 213
Joined: Sat May 26, 2012 10:37 am
Location: Russia
x 13

[Help][NormalMapping] How to achive WITHOUT RTSS?

Post by AlexeyKnyshev »

Hi all!
I'm trying to add bump mapping (normal mapping to my material/object on scene). I've investigated that Dot3Bump sample uses RTSS for this purposes. I want to avoid using RTSS due to it's complexity and misunderstanding some principies of it.

Question: Is there way to setup normal mapping WITHOUT RTSS? I mean using only material scripts and shaders. If y, are there any examples how to do this with Ogre3d.

Thanks.

Best regards, Alexey Knyshev
Voltage Engine - boost your ogre project with realtime physics and interactive scripting!
OgreBullet & CMake - easy to use bullet physics integration.
al2950
OGRE Expert User
OGRE Expert User
Posts: 1227
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 157

Re: [Help][NormalMapping] How to achive WITHOUT RTSS?

Post by al2950 »

AlexeyKnyshev wrote: Question: Is there way to setup normal mapping WITHOUT RTSS?
In short yes! Probably best to start here; http://www.ogre3d.org/tikiwiki/tiki-ind ... ts#Shaders, and look at the sample you have already mentioned.
PhilipLB
Google Summer of Code Student
Google Summer of Code Student
Posts: 550
Joined: Thu Jun 04, 2009 5:07 pm
Location: Berlin
x 108

Re: [Help][NormalMapping] How to achive WITHOUT RTSS?

Post by PhilipLB »

The triplanar texturing shader of the Volume Component does some Normal Mapping:
https://bitbucket.org/sinbad/ogre/src/3 ... at=default
Google Summer of Code 2012 Student
Topic: "Volume Rendering with LOD aimed at terrain"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Mattan Furst


Volume GFX, accepting donations.
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: [Help][NormalMapping] How to achive WITHOUT RTSS?

Post by c6burns »

The dot3 bump sample has a lot of examples that do not use RTSS:

Code: Select all

		matNames.push_back("Examples/BumpMapping/MultiLight");
		matNames.push_back("Examples/BumpMapping/MultiLightSpecular");
		matNames.push_back("Examples/OffsetMapping/Specular");
		matNames.push_back("Examples/ShowUV");
		matNames.push_back("Examples/ShowNormals");
		matNames.push_back("Examples/ShowTangents");

#ifdef INCLUDE_RTSHADER_SYSTEM
		matNames.push_back("RTSS/NormalMapping_SinglePass");
		matNames.push_back("RTSS/NormalMapping_MultiPass");
#endif
Check out Examples/BumpMapping/MultiLight ... it's in <sdk dir>/media/materials/scripts/Examples-Advanced.material. It builds the tbn matrix in the vertex program, which is cool if you end up targetting underpowered GPUs (like mobile)
User avatar
AlexeyKnyshev
Goblin
Posts: 213
Joined: Sat May 26, 2012 10:37 am
Location: Russia
x 13

Re: [Help][NormalMapping] How to achive WITHOUT RTSS?

Post by AlexeyKnyshev »

There is an a problem. Nothing except Examples/OffsetMapping/Specular and RTSS work. I see white (blank) material with this errors (intel hd4000):

Code: Select all

WARNING: material Examples/BumpMapping/MultiLightSpecular has no supportable Techniques and will be blank. Explanation: 
Pass 1: Vertex program Examples/BumpMapVPSpecular cannot be used - not supported.

Texture: rockwall.tga: Loading 1 faces(PF_R8G8B8,256x256x1) with 5 generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
GLSL compiled: 
Vertex Program:9e9a3c3c-3c25-bbc0-2bc2-b0f4b6e8b08f_VS Fragment Program:f7c21b08-da66-1b3b-eae7-df3ea8c6fd09_FS GLSL link result : 


WARNING: material Examples/ShowUV has no supportable Techniques and will be blank. Explanation: 
Pass 0: Vertex program Ogre/BasicVertexPrograms/AmbientOneTextureWithUV cannot be used - not supported.
Pass 0: Fragment program Examples/ShowUV_p cannot be used - not supported.



WARNING: material Examples/ShowNormals has no supportable Techniques and will be blank. Explanation: 
Pass 0: Vertex program Examples/ShowNormals_v cannot be used - not supported.



WARNING: material Examples/ShowTangents has no supportable Techniques and will be blank. Explanation: 
Pass 0: Vertex program Examples/ShowTangents_v cannot be used - not supported.
Same errors on NVidia GPU
Last edited by AlexeyKnyshev on Fri May 16, 2014 10:45 am, edited 1 time in total.
Voltage Engine - boost your ogre project with realtime physics and interactive scripting!
OgreBullet & CMake - easy to use bullet physics integration.
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: [Help][NormalMapping] How to achive WITHOUT RTSS?

Post by c6burns »

I use my own shader adapted from Examples/BumpMapping/MultiLight for use with single pass, single light. I am fairly sure I have an laptop that can reproduce the issue you have with OpenGL and linux drivers. Is that your environment? I'll have to dig that laptop out this weekend to see.
User avatar
AlexeyKnyshev
Goblin
Posts: 213
Joined: Sat May 26, 2012 10:37 am
Location: Russia
x 13

Re: [Help][NormalMapping] How to achive WITHOUT RTSS?

Post by AlexeyKnyshev »

c6burns wrote:I am fairly sure I have an laptop that can reproduce the issue you have with OpenGL and linux drivers. Is that your environment?
Yes, my env is described here: http://www.ogre3d.org/forums/viewtopic.php?f=2&t=80944

So, in addition, I have no texture shadows at all. Only scentil work. But it causes dramatic CPU bottleneck when I have 800+ shadow casters.
I think, that I do something totally wrong, because my scene isn't simple, it's VERY simple for my CPU (i7-3630QM) and GPU (nv740m). I know about badn GPU drivers in linux and problems with nvidia optimus, but I play quite well Dota 2 and Serius Sam 3, which use OpenGL3 features (such as non trivial shaders) and enough complicated scenes.
Voltage Engine - boost your ogre project with realtime physics and interactive scripting!
OgreBullet & CMake - easy to use bullet physics integration.
Post Reply