D3 Materials

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Kalda
Posts: 47
Joined: Wed Aug 23, 2006 1:38 pm
Location: Prostejov, Czech Republic
Contact:

D3 Materials

Post by Kalda »

Hello. I need Materials like Doom3/Quake4. Have you got any ideas for this?
Dances
Posts: 454
Joined: Sat Jul 02, 2005 1:45 am
Location: Canada
Contact:

Post by Dances »

Materials? Do you mean levels? Sprites? Textures? Models? Music? Advanced shadows and lighting? Bump mapping?
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

Post by omar shaaban »

search at http://www.turbosquid.com
u will find many doom3 models 8)
spooky_paul
Posts: 16
Joined: Sun Nov 26, 2006 5:12 pm
Location: Romania

Post by spooky_paul »

i believe that he is referring to a shader with normal or parallax mapping.

you could check the nvidia shader libraryfor a hlsl one that you could integrate with irrlicht. how to do that, im not sure. i am starting with irr, just switched from another engine
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Thanks for the link Paul maybe i can integrate something ;)
Kalda
Posts: 47
Joined: Wed Aug 23, 2006 1:38 pm
Location: Prostejov, Czech Republic
Contact:

Post by Kalda »

No. In D3/Q4 are things called materials (it's same as Q3 Shader):

Code: Select all

models/characters/marine/body
{
      noSelfShadow
      unSmoothedTangents
//   materialType flesh
      
      renderbump  -size 1024 1024 -trace 0.07 -aa 2
                         models/characters/marine/body_local.tga
                         work/models/characters/marine/newbody_hi.lwo

      diffusemap   models/characters/marine/body_d.tga
      bumpmap	 addnormals(
                                models/characters/marine/body_local.tga,
                                heightmap(
                                      models/characters/marine/body_h.tga, 2 
                                )
                        )
      specularmap models/characters/marine/body_s.tga
      { 
	blend add
	map models/characters/marine/body_g.tga
      }
}
But I need only combine DiffuseMap,BumpMap,Specularmap,GlowMap,BlendFunc and HLSL shader.
How to combine it?

2) I have one animatedmesh and its scenenode and I need animate only one texture from the mesh. Is it possible?
spooky_paul
Posts: 16
Joined: Sun Nov 26, 2006 5:12 pm
Location: Romania

Post by spooky_paul »

what you have there is a engine specific material script. from what i know irrlicht does not support material scripts, therefor the only way you can access that functionality is either via the built in materials or via fragment and/or vertex shaders
Kalda
Posts: 47
Joined: Wed Aug 23, 2006 1:38 pm
Location: Prostejov, Czech Republic
Contact:

Post by Kalda »

Have you got any shader for this?
spooky_paul
Posts: 16
Joined: Sun Nov 26, 2006 5:12 pm
Location: Romania

Post by spooky_paul »

as i mentioned before you could check out the nvidia shader library for examples, but note that hlsl shaders are restricted to DirectX use and glsl ones to OpenGL
Kalda
Posts: 47
Joined: Wed Aug 23, 2006 1:38 pm
Location: Prostejov, Czech Republic
Contact:

Post by Kalda »

I tried the NVidia shaders library but it doesn't work for me...
Could you post me:
  • any ocean shader
    any doom3 like bumpmapping shader
    any shadow shader
    and source code how to integrate it into irrlicht...
Thanks...
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

That's like saying you want someone to do the entire work for you...
spooky_paul
Posts: 16
Joined: Sun Nov 26, 2006 5:12 pm
Location: Romania

Post by spooky_paul »

Dorth wrote:That's like saying you want someone to do the entire work for you...
true
Kalda wrote:I tried the NVidia shaders library but it doesn't work for me...
are you sure you did? :lol: the first one in there, relief mapping has this description:
This material shows and compares results from four popular and advanced schemes for emulating displacement mapping. They are: Relief Mapping, Parallax Mapping, Normal Mapping, and Relief Mapping with Shadows. Original File by Fabio Policarpo. (4 technique/s)
ringing any bells? :P
Kalda wrote: any doom3 like bumpmapping shader
and for dynamic shadows and how to integrate the hlsl shader, you could look into the irrlicht documentation, or wait to be helped by a more advanced irrlicht user
Kalda
Posts: 47
Joined: Wed Aug 23, 2006 1:38 pm
Location: Prostejov, Czech Republic
Contact:

Post by Kalda »

1) I want source, because when I used this shader, the mesh was fully transparent or only with diffuse texture...

2) I want shader shadows, because it's more faster then addShadowVolumeSceneNode()
boomfloom
Posts: 1
Joined: Sat Jun 09, 2007 1:44 am

Post by boomfloom »

I'm also interested in shading materials, as far as I know there's HLSL for DX and GLSL for OpenGL. However there is nVidia's cg language which something different as is available in both formats throughout nVidia's cg libraries. Technically HLSL actually is based on cg, while GLSL in an extension of OpenGL.

I haven't got any idea if cg can be implemented in Irrlicht engine as I am a n00b. In case you want to get good at shading programming then you shall read OpenGL Redbook for GLSL programming, or something available for HLSL.

If you are too lazy than me :D , then you can get dozens of HLSL shader examples over the internet. Just google it!

I have found these until now...

nVidia's cg library.
http://developer.download.nvidia.com/sh ... brary.html
where a converter from HLSL2GLSL (in case of GL preferency) might come handy.
http://sourceforge.net/projects/hlsl2glsl

...and there is an alternate option, a special effects framework by khronos group for OpenGL called GLEffect (glfx for short), I think originally support donated by nVidia (not sure for this, please correct me if I'm wrong).
http://www.khronos.org/glfx/

By the moment I haven't tried anything above, I still do a research and I'll try to find a solution this week. I am ready to mess with shading programming due to my Bachelor thesis assignment, but it might worth the trouble for myself and also the community. :D

Cheers!
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

BTW, you might notice that they offer a compiler for cg that render the language useless to implement as it would be slow and bloated in comparison. Thus just compile a version of the cg shader to whichever shader you need, may it be old or new, OpenGL or DirectX
Post Reply