Jump to content

Model Lighting


kitsushadow

Recommended Posts

Happy New Years,

 

GOlfDCr.png

 

I have this block and no matter what I do. I can't get the lightning to normalize across all the faces. Id would also be happy if it shaded downwards across all the faces. But my preference is for uniform lighting from all sides.

 

There is a whole slew of things I tried thats commented out in the code.

 

 

public void renderBlock(TileEntitySmallBarrel tl, World world, int x, int y,int z, Block block) {

Tessellator tessellator = Tessellator.instance;

 

//float f = block.getLightOpacity(world, x, y, z);

////int l = world.getLightBrightnessForSkyBlocks(x, y, z, 0);

//int l1 = l % 65536;

//int l2 = l / 65536;

//tessellator.setColorOpaque_F(f, f, f);

//tessellator.setNormal(0.0F, 1.0F, 0.0F);

//OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,(float) l1, (float) l2);

//int brightness = Blocks.stone.getMixedBrightnessForBlock(world, x, y, z);

//int lightValue = block.getMixedBrightnessForBlock(world, x, y, z);

////tessellator.setBrightness(brightness);

//tessellator.setColorOpaque_F(0.8F, 0.8F, 0.8F);

 

GL11.glPushMatrix();

float scale = 0.28F;

GL11.glScalef(scale, scale, scale);

GL11.glTranslatef(1.6F,0.05F,1.6F);

GL11.glRotatef(31F, 0.0F, 1.0F, 0.0F);

this.model.render();

GL11.glPopMatrix();

}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.