Author Topic: Custom Material Not Showing Correctly *SOLVED*  (Read 1362 times)

Offline solitaryshade

  • Curious Wanderer
  • *
  • Posts: 25
  • Floof-O-Meter: 1
  • Beware of the sky serpent!
    • View Profile
Custom Material Not Showing Correctly *SOLVED*
« on: June 03, 2014, 05:35:21 am »
Basically, I made a mesh in Blender, and managed to successfully get it into the game with little to no problem at all, with the mesh and collision working fine and everything.

Only one problem:


I didn't have as much luck as I did with the actual material file. See, I wanted it to appear reflective, yet transparent like water, except much more translucent as pictured above.

Unfortunately...


It comes out like this.
To be honest, I didn't expect it to have a reflective look, because whenever whenever I used the default WaterReflectMat on ANY object in Object Maker, it comes out invisible or only reflective on one side (is that normal?).
But, I did expect transparency to work, but...it doesn't.

So, what did I do wrong?

Also, here's the material file in case you need it:

material Reflect

{
    
   receive_shadows on

    
   technique
    
   {
        
      pass Reflect
        
      {
            
      ambient 0.10545461824798963 0.3154689981026877 0.42555353259365347 0.40689653158187866
            
      diffuse 0.1509189508992277 0.45147619920188475 0.6090211482200196 0.40689653158187866
            
      specular 0.4172413945198059 0.4172413945198059 0.4172413945198059 0.40689653158187866 12.5
            
      emissive 0.0 0.0 0.0 0.40689653158187866

            
      alpha_to_coverage off
            
      colour_write on
            
      cull_hardware clockwise
            
      depth_check on
            
      depth_func less_equal
            
      depth_write on
            
      illumination_stage
            
      light_clip_planes off
            
      light_scissor off
            
      lighting on
            
      normalise_normals off
            
      polygon_mode solid
            
      scene_blend one zero
            
      scene_blend_op add
            
      shading gouraud
            
      transparent_sorting on

        
      }
    
   }

}
« Last Edit: June 03, 2014, 08:25:12 pm by shade »

Offline Bawfle

  • Courage is not the absence of fear but rather the judgement that something is more important than fear.
  • Elder Grey Pelt
  • ****
  • Posts: 3,147
  • Country: gb
  • Floof-O-Meter: 344
  • The Zambisi Pride
    • View Profile
Re: Custom Material Not Showing Correctly
« Reply #1 on: June 03, 2014, 12:23:25 pm »
Maybe you could use the coding from the water material file from the FeralHeart folder, thigh might work possibly? I'm not too good with custom meshes, but I'll be glad to help~


Pixel Doll Commissioned and Coloured by RingoKioko
Inactive // Retired // Gone

Offline solitaryshade

  • Curious Wanderer
  • *
  • Posts: 25
  • Floof-O-Meter: 1
  • Beware of the sky serpent!
    • View Profile
Re: Custom Material Not Showing Correctly
« Reply #2 on: June 03, 2014, 06:52:35 pm »
Only changing scene_blend's attribute to "alpha_blend" made it transparent, but the transparency doesn't show the same way as it does in Blender.

Example:

« Last Edit: June 03, 2014, 06:55:24 pm by shade »

Offline solitaryshade

  • Curious Wanderer
  • *
  • Posts: 25
  • Floof-O-Meter: 1
  • Beware of the sky serpent!
    • View Profile
Re: Custom Material Not Showing Correctly
« Reply #3 on: June 03, 2014, 06:53:52 pm »
Whelp. I found the solution - which was to UV map the entire object and just do the old-fashioned way of using textures instead of procedural materials from blender, since OGRE apparently does this a lot with Blender-fashioned materials. Just as I feared.

I'm going to have so much fun doing that to a 120-cell mesh. Yippee.

Nonetheless, thanks for the help though.
« Last Edit: June 03, 2014, 08:24:47 pm by shade »