Shiny surface reflection - how to achieve this

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.

Shiny surface reflection - how to achieve this

Postby robmar » Fri Mar 23, 2012 5:42 pm

Anyone know how to achieve a really glossy shiny surface on meshes, just in one color, with the standard lighting? I can get matt type shinnines, but I can´t seem to achieve really glossy surfaces.
robmar
 
Posts: 565
Joined: Sun Aug 14, 2011 11:30 pm

Re: Shiny surface reflection - how to achieve this

Postby Mel » Fri Mar 23, 2012 5:55 pm

Increase the "shininess" atribute of the materials. It can go beyond 1. Though, it is a per vertex highlight, so, it is best that your meshes are highly tesellated.
http://santiagong.daportfolio.com/
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
User avatar
Mel
Competition winner
 
Posts: 1783
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Shiny surface reflection - how to achieve this

Postby robmar » Fri Mar 23, 2012 6:01 pm

Yes, did that, but its always a rather dull shinnines...
robmar
 
Posts: 565
Joined: Sun Aug 14, 2011 11:30 pm

Re: Shiny surface reflection - how to achieve this

Postby mongoose7 » Sat Mar 24, 2012 4:31 am

Shininess is just a specular effect. If you want, say, a wet look, you will need to combine an environment map, I should think.
mongoose7
 
Posts: 514
Joined: Wed Apr 06, 2011 12:13 pm

Re: Shiny surface reflection - how to achieve this

Postby robmar » Sat Mar 24, 2012 10:25 am

Yes, I tried that, and the reflections help, blending the env. map with a pure color, but then you have to add objects around the scene to get the required reflections.

I was wondering if there was a way to simulate this, like by using EMT_REFLECTION_2_LAYER

With EMT_REFLECTION_2_LAYER and the "reflection texture" from Irrlichts media folder, its looks good until its used with a sphere, which then distorts the reflection layer, sort of pinching-up the areas at the poles, which doesn´t look natural.
robmar
 
Posts: 565
Joined: Sun Aug 14, 2011 11:30 pm

Re: Shiny surface reflection - how to achieve this

Postby ACE247 » Sat Mar 24, 2012 10:57 am

The sphere's pinching at the poles is due to its bad uv mapping.
But honestly, Shaders were invented to do the shiny effects, because other methods just really can't do it.
H8L6L5M4G3H5M7N8S7N9O1R8J1P5M7N9O4P2Q5R6T7U4M3N8X6S5T8W (If you want the secret, why not 'TRY' decrypting it? )
This Door's lock doesn't need a key, the Lock is the key to open the Lock and you don't know how to turn the key...
Link: My Blog :)
User avatar
ACE247
 
Posts: 695
Joined: Tue Mar 16, 2010 12:31 am
Location: Namibia

Re: Shiny surface reflection - how to achieve this

Postby robmar » Sat Mar 24, 2012 12:22 pm

Yes but I think the best way is to use the quick method, with a good texture. Otherwise the env. map method requires suitable objects to reflect off, which may be unwanted in the scene.

Do you know if there a source of good textures for reflections on the web?
robmar
 
Posts: 565
Joined: Sun Aug 14, 2011 11:30 pm

Re: Shiny surface reflection - how to achieve this

Postby robmar » Sat Mar 24, 2012 1:44 pm

I´ve just discovered that sphere mapping isn´t working in d3d mode with my software, by switching to opengl, the spheremap works.

Looks like a bug, as it only produces the correct sphere mapping under opengl

cpp Code: Select all
 
   // Use sphere map to simulate env. mapping
   ITexture* pT = pDriver->getTexture( (LPCSTR)szFile );
   if ( pT )
      pMeshSceneNode->setMaterialTexture( 0, pT );
   pMeshSceneNode->setMaterialType( video::EMT_SPHERE_MAP );
   
robmar
 
Posts: 565
Joined: Sun Aug 14, 2011 11:30 pm


Return to Beginners Help

Who is online

Users browsing this forum: No registered users and 1 guest