Advanced game related topics
DarkDragon
Addict
Posts: 2228 Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:
Post
by DarkDragon » Fri Apr 10, 2009 7:05 am
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 ...
bye,
Daniel
Blobby
User
Posts: 17 Joined: Tue Mar 03, 2009 2:30 pm
Post
by Blobby » Fri Apr 10, 2009 11:43 am
oops
and thanks!
I should've known you would've done something as you made that cool water demo too
Blobby
User
Posts: 17 Joined: Tue Mar 03, 2009 2:30 pm
Post
by Blobby » Fri Apr 10, 2009 11:46 am
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.
DarkDragon
Addict
Posts: 2228 Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:
Post
by DarkDragon » Sat Apr 11, 2009 9:56 am
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
bye,
Daniel
Falko
Enthusiast
Posts: 269 Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:
Post
by Falko » Sat Apr 11, 2009 6:49 pm
wow DD, this is a very good sample.
www.falko-pure.de
Win8 Pro 64-Bit & Mediacenter, PB_5.1B7, GFA-WinDOS, Powerbasic9.05-Windows, NSBasic/CE, NSBasic/Desktop, NSBasic4APP, EmergenceBasic
Blobby
User
Posts: 17 Joined: Tue Mar 03, 2009 2:30 pm
Post
by Blobby » Sun Apr 12, 2009 2:13 pm
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.
IdeasVacuum
Always Here
Posts: 6425 Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:
Post
by IdeasVacuum » Thu Dec 31, 2009 3:21 am
Hello Daniel
Normalmapping.pb crashes PB4.40(x86) during compilation. Any idea why?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
IdeasVacuum
Always Here
Posts: 6425 Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:
Post
by IdeasVacuum » Thu Dec 31, 2009 3:30 am
...Ah, it's because Engine3D.dll is in the Project Folder, so not a problem!
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Lexicon
User
Posts: 98 Joined: Mon Jul 22, 2013 6:16 am
Contact:
Post
by Lexicon » Mon Mar 31, 2014 3:04 pm
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?
PureBasic 5.11 | WinXP | 2GB RAM | GForce GT240
Samuel
Enthusiast
Posts: 755 Joined: Sun Jul 29, 2012 10:33 pm
Location: United States
Post
by Samuel » Mon Mar 31, 2014 6:48 pm
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))
Lexicon
User
Posts: 98 Joined: Mon Jul 22, 2013 6:16 am
Contact:
Post
by Lexicon » Mon Mar 31, 2014 7:09 pm
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.
PureBasic 5.11 | WinXP | 2GB RAM | GForce GT240
Samuel
Enthusiast
Posts: 755 Joined: Sun Jul 29, 2012 10:33 pm
Location: United States
Post
by Samuel » Mon Mar 31, 2014 7:19 pm
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.
Lexicon
User
Posts: 98 Joined: Mon Jul 22, 2013 6:16 am
Contact:
Post
by Lexicon » Mon Mar 31, 2014 7:28 pm
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.
PureBasic 5.11 | WinXP | 2GB RAM | GForce GT240