Page 2 of 2
					
				
				Posted: Fri Apr 10, 2009 7:05 am
				by DarkDragon
				Blobby wrote:Can I ask which tool you use to generate your material files and shaders?
Notepad.
For validating GLSL shaders I use glslValidate from 3DLabs (they aren't offering it anymore).
@djes: That was the first example I've looked when I was going deeper into OGRE. 

 So there's no need to be sad.
Maybe you could write those links into your topic:
OGRE Manual - Table of contents
Automatically defined shader variables ... 
			 
			
					
				
				Posted: Fri Apr 10, 2009 11:43 am
				by Blobby
				
oops  
 
and thanks!
I should've known you would've done something as you made that cool water demo too 

 
			 
			
					
				
				Posted: Fri Apr 10, 2009 11:46 am
				by Blobby
				DarkDragon wrote:Blobby wrote:Can I ask which tool you use to generate your material files and shaders?
Notepad.
For validating GLSL shaders I use glslValidate from 3DLabs (they aren't offering it anymore).
 
I don't see the option to generate material files in Notepad!  
 
Just kidding. 

 
			 
			
					
				
				Posted: Sat Apr 11, 2009 9:56 am
				by DarkDragon
				Update
Now it works with an variable number of lights through multipass rendering.
And I've done some changes.
Same link, new luck (Clear your cache):
Download 
			 
			
					
				
				Posted: Sat Apr 11, 2009 6:49 pm
				by Falko
				wow DD, this is a very good sample.
			 
			
					
				
				Posted: Sun Apr 12, 2009 2:13 pm
				by Blobby
				Another nice example, Daniel!.
What I'm a little puzzed over is the form of the light on all your examples. It seems to have a radial quality to it in that as the object rotates you see a line of light running up the center.  
I remember once seeing a material with a similar quality in Maya, I think it's name was Blinn. I imagine it'll be good for metalic materials.
			 
			
					
				Re: Normal maps in Ogre?
				Posted: Thu Dec 31, 2009 3:21 am
				by IdeasVacuum
				Hello Daniel
Normalmapping.pb crashes PB4.40(x86) during compilation. Any idea why?
			 
			
					
				Re: Normal maps in Ogre?
				Posted: Thu Dec 31, 2009 3:30 am
				by IdeasVacuum
				...Ah, it's because Engine3D.dll is in the Project Folder, so not a problem!
			 
			
					
				Re: Normal maps in Ogre?
				Posted: Mon Mar 31, 2014 3:04 pm
				by Lexicon
				Nice work!
But...
Code: Select all
    ;LoadMesh(0, "sphere.mesh")
    
    CreateCube(0, 8)
    GetScriptMaterial(0, "Normalmap")
    
    Parse3DScripts()
    
    ; Create a cube
    CreateEntity(0, MeshID(0), MaterialID(0)) ; #PB_Material_None)
... and nothing. 

 Why?
 
			 
			
					
				Re: Normal maps in Ogre?
				Posted: Mon Mar 31, 2014 6:48 pm
				by Samuel
				I believe you need to give your mesh tangents. After you create your mesh try 
BuildMeshTangents(#Mesh).
I also think 
Parse3DScripts() needs to go after your Add3DArchives, but before you load the material script.
Code: Select all
    Add3DArchive(PathToScripts$, #PB_3DArchive_FileSystem)
    Add3DArchive(PathToTextures$, #PB_3DArchive_FileSystem)
    Parse3DScripts()
    CreateCube(0, 8)
    BuildMeshTangents(0)
    GetScriptMaterial(0, "Normalmap")
    CreateEntity(0, MeshID(0), MaterialID(0))
 
			 
			
					
				Re: Normal maps in Ogre?
				Posted: Mon Mar 31, 2014 7:09 pm
				by Lexicon
				Samuel wrote:I believe you need to give your mesh tangents. After you create your mesh try 
BuildMeshTangents(#Mesh).
I also think 
Parse3DScripts() needs to go after your Add3DArchives, but before you load the material script.
Code: Select all
    Add3DArchive(PathToScripts$, #PB_3DArchive_FileSystem)
    Add3DArchive(PathToTextures$, #PB_3DArchive_FileSystem)
    Parse3DScripts()
    CreateCube(0, 8)
    BuildMeshTangents(0)
    GetScriptMaterial(0, "Normalmap")
    CreateEntity(0, MeshID(0), MaterialID(0))
 
Thanks S! I have PB 5.11 and no have this command. 
 
But I saw this text on the OGRE wiki: 
http://www.ogre3d.org/tikiwiki/tiki-ind ... umpMapping
Important Hint: To use bumpmapping, we'll need tangent vectors for our meshes.
OGRE can do this for you ahead of time if you use the '-t' parameter to the command line tools OgreXmlConverter or OgreMeshUpgrade.
I'll try and report. 

 
			 
			
					
				Re: Normal maps in Ogre?
				Posted: Mon Mar 31, 2014 7:19 pm
				by Samuel
				In the past I've used OgreXmlConverter to add tangents to my meshes. It's pretty easy, but it can be time consuming if you have a lot of meshes to alter.
			 
			
					
				Re: Normal maps in Ogre?
				Posted: Mon Mar 31, 2014 7:28 pm
				by Lexicon
				Samuel wrote:In the past I've used OgreXmlConverter to add tangents to my meshes. It's pretty easy, but it can be time consuming if you have a lot of meshes to alter.
I believe that will be around a thousand.