About Store Forum Documentation Contact



Post Reply 
materials (Bump mapping) and IOPath
Author Message
jordicat Offline
Member

Post: #1
materials (Bump mapping) and IOPath
Hello artists,
now I have 2 things to comment:

1-I tried to make a material by hand code, not by the the material editor, because I want more control, but the textures are made in material editor.
mat.reset(); // setup defaults
mat.diffuse =Images("../Mtrl/subjecte.gfx" );
mat.normal =Images("../Mtrl/Subjecte.n.gfx");
mat.specular=0.65 ; // set specular
mat.bump =0.0; // set bump value
mat.rough =0.8; // set roughness
mat.validate(); // validate changes
a diffuse texture with bumpmapping. All is ok, but where there is not light the bumpmapping disapears.
   
I believe this issue not happens in material editor. What is the reason?. I want to see bumpmapping effect also in the part of sphere where there is not light.

2-I want to add severals paths (to load easily resources), not only one. How to to this?
IOPath(path1); IOPath(path2); IOPath(path...)

Thanks!
11-28-2009 10:31 PM
Find all posts by this user Quote this message in a reply
Kevin Offline
Member

Post: #2
RE: materials (Bump mapping) and IOPath
(11-28-2009 10:31 PM)jordicat Wrote:  I believe this issue not happens in material editor. What is the reason?. I want to see bumpmapping effect also in the part of sphere where there is not light.

Afaik Bumpmaps (==Normalmap) change the normals of the object at the positions specified in the bumpmap, so it only affects the lighting calculation (if there is no light, you won't see any effect).
However, you can use the parallax effect, which isn't only affected by light.
11-28-2009 10:43 PM
Find all posts by this user Quote this message in a reply
jordicat Offline
Member

Post: #3
RE: materials (Bump mapping) and IOPath
Kevin, how I can use the parallax effect?
If I use D.bumpMode(BUMP_PARALLAX/BUMP_RELIEF) the effect I see is the same of D.bumpMode(BUMP_NORMAL).

Thanks.
11-28-2009 11:09 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: materials (Bump mapping) and IOPath
1-this is normal, because normal mapping affects only lighting, when there is no light (in shadow) the normal map won't do any difference

but you can do a "hack" to improve ambient lighting, draw a fullscreen image based light with no shadows
if(Renderer()==RM_LIGHT)LightDir(Cam.matrix.z,Vec(0.1)).add(false);

Quote:2-I want to add severals paths (to load easily resources), not only one. How to to this?
IOPath(path1); IOPath(path2); IOPath(path...)
only one additional path is supported (this won't be changed)

Quote:If I use D.bumpMode(BUMP_PARALLAX/BUMP_RELIEF) the effect I see is the same of D.bumpMode(BUMP_NORMAL).
you've set material.bump=0 so you won't see parallax effect (for this also bump map is required, not only normal map)
11-28-2009 11:11 PM
Find all posts by this user Quote this message in a reply
Post Reply