It is currently Tue Oct 22, 2019 8:04 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Fri Apr 10, 2009 7:05 am 
Offline
Addict
Addict
User avatar

Joined: Mon Jun 02, 2003 9:16 am
Posts: 2092
Location: Germany
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. :wink: 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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 10, 2009 11:43 am 
Offline
User
User

Joined: Tue Mar 03, 2009 2:30 pm
Posts: 17
djes wrote:
Blobby wrote:
There's no examples on the forum at all.

:cry: http://www.purebasic.fr/english/viewtop ... ht=shaders


oops :oops:


and thanks!

I should've known you would've done something as you made that cool water demo too :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 10, 2009 11:46 am 
Offline
User
User

Joined: Tue Mar 03, 2009 2:30 pm
Posts: 17
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. ;)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Apr 11, 2009 9:56 am 
Offline
Addict
Addict
User avatar

Joined: Mon Jun 02, 2003 9:16 am
Posts: 2092
Location: Germany
Update

Image

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Apr 11, 2009 6:49 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Oct 04, 2003 12:57 pm
Posts: 269
Location: Germany
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Apr 12, 2009 2:13 pm 
Offline
User
User

Joined: Tue Mar 03, 2009 2:30 pm
Posts: 17
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Normal maps in Ogre?
PostPosted: Thu Dec 31, 2009 3:21 am 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5835
Location: Wales, UK
Hello Daniel

Normalmapping.pb crashes PB4.40(x86) during compilation. Any idea why?

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: Normal maps in Ogre?
PostPosted: Thu Dec 31, 2009 3:30 am 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5835
Location: Wales, UK
...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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Normal maps in Ogre?
PostPosted: Mon Mar 31, 2014 3:04 pm 
Offline
User
User
User avatar

Joined: Mon Jul 22, 2013 6:16 am
Posts: 98
Nice work!

But...
Code:
    ;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


Top
 Profile  
Reply with quote  
 Post subject: Re: Normal maps in Ogre?
PostPosted: Mon Mar 31, 2014 6:48 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 29, 2012 10:33 pm
Posts: 735
Location: United States
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:
    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))


Top
 Profile  
Reply with quote  
 Post subject: Re: Normal maps in Ogre?
PostPosted: Mon Mar 31, 2014 7:09 pm 
Offline
User
User
User avatar

Joined: Mon Jul 22, 2013 6:16 am
Posts: 98
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:
    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. :wink:
But I saw this text on the OGRE wiki: http://www.ogre3d.org/tikiwiki/tiki-ind ... umpMapping

Quote:
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. 8)

_________________
PureBasic 5.11 | WinXP | 2GB RAM | GForce GT240


Top
 Profile  
Reply with quote  
 Post subject: Re: Normal maps in Ogre?
PostPosted: Mon Mar 31, 2014 7:19 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 29, 2012 10:33 pm
Posts: 735
Location: United States
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Normal maps in Ogre?
PostPosted: Mon Mar 31, 2014 7:28 pm 
Offline
User
User
User avatar

Joined: Mon Jul 22, 2013 6:16 am
Posts: 98
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye