Pandassaurus Posted May 3, 2014 Posted May 3, 2014 Hi, My texture is not working for techne. When i draw on a certain spot, it adds a texture somewhere where it's not supposed to be. I know it's a lot to go through, but i would really appreciate it if you did. Model Class: // Date: 5/2/2014 9:47:48 PM // Template version 1.1 // Java generated by Techne // Keep in mind that you still need to fill in some blanks // - ZeuX package com.pandassaurus.breakingbad.item.armor.gasMask; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelGasMask extends ModelBiped { //fields ModelRenderer maskrim; ModelRenderer maskrim1; ModelRenderer maskrim2; ModelRenderer mid; ModelRenderer visor; ModelRenderer rightbig; ModelRenderer leftsmall; ModelRenderer rightsmall; ModelRenderer leftbig; ModelRenderer maskrim3; ModelRenderer strap; ModelRenderer strap1; ModelRenderer strap2; ModelRenderer strap3; ModelRenderer strap4; ModelRenderer strap5; ModelRenderer strap6; public ModelGasMask(float f) { super(f); textureWidth = 64; textureHeight = 64; maskrim = new ModelRenderer(this, 0, 0); maskrim.addBox(-4F, -8F, -4F, 1, 8, 1); maskrim.setRotationPoint(0F, 0F, -1F); maskrim.setTextureSize(64, 64); maskrim.mirror = true; setRotation(maskrim, 0F, 0F, 0F); maskrim1 = new ModelRenderer(this, 0, 10); maskrim1.addBox(3F, -8F, -4F, 1, 8, 1); maskrim1.setRotationPoint(0F, 0F, -1F); maskrim1.setTextureSize(64, 64); maskrim1.mirror = true; setRotation(maskrim1, 0F, 0F, 0F); maskrim2 = new ModelRenderer(this, 0, 23); maskrim2.addBox(-4F, -8F, -4F, 8, 1, 1); maskrim2.setRotationPoint(0F, 0F, -1F); maskrim2.setTextureSize(64, 64); maskrim2.mirror = true; setRotation(maskrim2, 0F, 0F, 0F); mid = new ModelRenderer(this, 40, 26); mid.addBox(-1F, 0F, -1F, 2, 2, 3); mid.setRotationPoint(0F, -1F, -6F); mid.setTextureSize(64, 64); mid.mirror = true; setRotation(mid, -1.301251F, 0F, 0F); visor = new ModelRenderer(this, 35, 32); visor.addBox(-4F, -8F, -5F, 6, 6, 1); visor.setRotationPoint(1F, 1F, -1F); visor.setTextureSize(64, 64); visor.mirror = true; setRotation(visor, 0F, 0F, 0F); rightbig = new ModelRenderer(this, 44, 10); rightbig.addBox(-1F, -1F, -1F, 3, 3, 2); rightbig.setRotationPoint(-4F, -1F, -7.5F); rightbig.setTextureSize(64, 64); rightbig.mirror = true; setRotation(rightbig, 0.5205006F, 0.5204921F, 0F); leftsmall = new ModelRenderer(this, 31, 0); leftsmall.addBox(-1F, -1F, -1F, 2, 2, 2); leftsmall.setRotationPoint(3F, -1F, -7F); leftsmall.setTextureSize(64, 64); leftsmall.mirror = true; setRotation(leftsmall, 0.5204921F, -0.5204921F, 0F); rightsmall = new ModelRenderer(this, 46, 0); rightsmall.addBox(-1F, -1F, -1F, 2, 2, 2); rightsmall.setRotationPoint(-3F, -1F, -7F); rightsmall.setTextureSize(64, 64); rightsmall.mirror = true; setRotation(rightsmall, 0.5204921F, 0.5205006F, 0F); leftbig = new ModelRenderer(this, 33, 12); leftbig.addBox(-1F, -1F, -1F, 3, 3, 2); leftbig.setRotationPoint(3.2F, -1F, -8.25F); leftbig.setTextureSize(64, 64); leftbig.mirror = true; setRotation(leftbig, 0.5204921F, -0.5204921F, 0F); maskrim3 = new ModelRenderer(this, 0, 27); maskrim3.addBox(-4F, -8F, -5F, 8, 1, 3); maskrim3.setRotationPoint(0F, 7F, -2F); maskrim3.setTextureSize(64, 64); maskrim3.mirror = true; setRotation(maskrim3, 0F, 0F, 0F); strap = new ModelRenderer(this, 0, 36); strap.addBox(-2F, -8F, -4F, 1, 0, 9); strap.setRotationPoint(0F, -0.1F, -1F); strap.setTextureSize(64, 64); strap.mirror = true; setRotation(strap, 0F, 0F, 0F); strap1 = new ModelRenderer(this, 0, 36); strap1.addBox(1F, -8F, -4F, 1, 0, 9); strap1.setRotationPoint(0F, -0.1F, -1F); strap1.setTextureSize(64, 64); strap1.mirror = true; setRotation(strap1, 0F, 0F, 0F); strap2 = new ModelRenderer(this, 26, 36); strap2.addBox(1F, -8.1F, -4F, 1, 6, 0); strap2.setRotationPoint(0F, 0F, 8F); strap2.setTextureSize(64, 64); strap2.mirror = true; setRotation(strap2, 0F, 0F, 0F); strap3 = new ModelRenderer(this, 26, 36); strap3.addBox(1F, -8.1F, -4F, 1, 6, 0); strap3.setRotationPoint(-3F, 0F, 8F); strap3.setTextureSize(64, 64); strap3.mirror = true; setRotation(strap3, 0F, 0F, 0F); strap4 = new ModelRenderer(this, 0, 54); strap4.addBox(1F, -8F, -4F, 0, 1, 9); strap4.setRotationPoint(-5.1F, 5F, -1F); strap4.setTextureSize(64, 64); strap4.mirror = true; setRotation(strap4, 0F, 0F, 0F); strap5 = new ModelRenderer(this, 0, 54); strap5.addBox(3.1F, -8F, -4F, 0, 1, 9); strap5.setRotationPoint(1F, 5F, -1F); strap5.setTextureSize(64, 64); strap5.mirror = true; setRotation(strap5, 0F, 0F, 0F); strap6 = new ModelRenderer(this, 0, 32); strap6.addBox(1F, -8F, -3F, 8, 1, 0); strap6.setRotationPoint(-5F, 5F, 7.1F); strap6.setTextureSize(64, 64); strap6.mirror = true; setRotation(strap6, 0F, 0F, 0F); this.bipedHead.addChild(maskrim); this.bipedHead.addChild(strap); this.bipedHead.addChild(maskrim1); this.bipedHead.addChild(maskrim2); this.bipedHead.addChild(maskrim3); this.bipedHead.addChild(strap); this.bipedHead.addChild(strap1); this.bipedHead.addChild(strap2); this.bipedHead.addChild(strap3); this.bipedHead.addChild(strap4); this.bipedHead.addChild(strap5); this.bipedHead.addChild(strap6); this.bipedHead.addChild(visor); this.bipedHead.addChild(leftsmall); this.bipedHead.addChild(rightsmall); this.bipedHead.addChild(rightbig); this.bipedHead.addChild(leftbig); this.bipedHead.addChild(mid); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } } The rightbig and leftbig are the textures circled below: https://31.media.tumblr.com/370d0dcb1279b7ffcc2314855a30d60a/tumblr_n4zlc1PGBF1sejvuqo3_250.png[/img] And are showing up like so whenever i give the boxes (left and right of mouth) texture: https://24.media.tumblr.com/dca7151793656e6a4604b94fcf43ee15/tumblr_n4zlc1PGBF1sejvuqo1_500.png[/img] and it's also happening for other textures,too: https://24.media.tumblr.com/c055a85691023b5a9221c02d2960fe9d/tumblr_n4zlc1PGBF1sejvuqo2_250.png[/img] I'm not sure why that's happening, and i would appreciate it if you help me thanks, -Pandassaurus Quote
Bugzoo Posted May 3, 2014 Posted May 3, 2014 Your problem may not be in your model class, we need your other classes, like your render class and stuff Quote
Pandassaurus Posted May 3, 2014 Author Posted May 3, 2014 Hi this is armor, and i haven't been using render classes. i just add all of them as childs of the head: this.bipedHead.addChild(maskrim); and render them public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); } in the model class. thanks for the help, -Pandassaurus Quote
jabelar Posted May 3, 2014 Posted May 3, 2014 The problem is that your texture file needs to have a 2:1 ratio. It looks like yours is square. So it needs to be 64x32 or 128x64, etc. It cannot be 128x128 or similar because it will get scaled in the one direction and that will "squash" the pixels and leave transparent areas. You need to (a) size your PNG to be 2:1 and (b) specify the texture size correctly in your model with the setTextureSize() method. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
Pandassaurus Posted May 3, 2014 Author Posted May 3, 2014 Hi, I dont think that's it. Ive been using square textures for all of my techne creations with no problem. Also, the texture sizes are defined here: textureWidth = 64; textureHeight = 64; so ya, i don't think thats it. Thanks, -Pandassaurus Quote
Pandassaurus Posted May 7, 2014 Author Posted May 7, 2014 Also, does anyone know a better alternative to techne? thanks, -Pandassaurus Quote
Alix_The_Alicorn Posted May 7, 2014 Posted May 7, 2014 Use the AdvancedModelLoader if you don't want to use techne. video on making a model: only one vid in the series, but it should be good enough for getting started. Quote
Pandassaurus Posted May 9, 2014 Author Posted May 9, 2014 Thanks, anyway, are there any other ideas for my problem? thanks, -Pandassaurus Quote
dude22072 Posted May 10, 2014 Posted May 10, 2014 Thanks, anyway, are there any other ideas for my problem? thanks, -Pandassaurus Techne has an option to load the texture file. You should load it in Techne and adjust the offsets to the correct spot. Quote Legend of Zelda Mod[updated September 20th to 3.1.1] Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0] Fancy Cheeses[updated May 8th to 0.5.0]
Recommended Posts
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.