Jump to content

[1.15.2] [SOLVED] Custom Armor Model


Obeeron

Recommended Posts

Hello,
I have the .java models for all armor parts but I don't understand how to insert it within my mod considering I use deferred registries.
The different models have been made with Blockbench

Edited by Obeeron
Link to comment
Share on other sites

I got the armor to render but it does not rotate with the arms/legs/head movement. It also does not change when sneaking or when sitting. However it does rotate all at once with when I turn.
Here are the 2 classes :
 

public class BronzeArmorModel extends BipedModel<LivingEntity> {
	public final ModelRenderer helmet;
	public final ModelRenderer chestplate;
	private final ModelRenderer bone2;
	private final ModelRenderer bone3;
	public final ModelRenderer leftBoot;
	private final ModelRenderer bone5;
	public final ModelRenderer rightBoot;
	private final ModelRenderer bone8;

	public BronzeArmorModel(float size) {
		super(size);
		textureWidth = 64;
		textureHeight = 64;

		helmet = new ModelRenderer(this);
		helmet.setRotationPoint(0.0F, 0.0F, 0.0F);
		helmet.setTextureOffset(0, 0).addBox(-4.0F, -8.0F, -4.0F, 8.0F, 8.0F, 8.0F, 0.51F, false);
		helmet.setTextureOffset(0, 16).addBox(-4.0F, -8.5F, -4.0F, 8.0F, 1.0F, 8.0F, 0.45F, false);

		chestplate = new ModelRenderer(this);
		chestplate.setRotationPoint(0.0F, 5.3625F, 0.0F);
		chestplate.setTextureOffset(32, 0).addBox(-4.0F, -5.3625F, -2.0F, 8.0F, 11.0F, 4.0F, 0.28F, true);
		chestplate.setTextureOffset(40, 20).addBox(-2.0F, 6.0875F, -2.0F, 4.0F, 1.0F, 4.0F, 0.29F, false);

		bone2 = new ModelRenderer(this);
		bone2.setRotationPoint(-1.5F, 4.6375F, 0.0F);
		chestplate.addChild(bone2);
		setRotationAngle(bone2, 0.0F, 0.0F, 0.2618F);
		bone2.setTextureOffset(12, 41).addBox(-2.3F, 1.55F, -2.0F, 2.0F, 1.0F, 4.0F, 0.29F, false);

		bone3 = new ModelRenderer(this);
		bone3.setRotationPoint(1.5F, 4.6375F, 0.0F);
		chestplate.addChild(bone3);
		setRotationAngle(bone3, 0.0F, 0.0F, -0.2618F);
		bone3.setTextureOffset(0, 41).addBox(0.3F, 1.55F, -2.0F, 2.0F, 1.0F, 4.0F, 0.29F, false);

		leftBoot = new ModelRenderer(this);
		leftBoot.setRotationPoint(-2.0F, 21.0F, 0.0F);
		leftBoot.setTextureOffset(28, 15).addBox(-2.0F, -2.25F, -2.0F, 4.0F, 5.0F, 4.0F, 0.26F, false);
		leftBoot.setTextureOffset(24, 41).addBox(-2.0F, -2.0F, -2.5F, 4.0F, 4.0F, 1.0F, 0.0F, false);

		bone5 = new ModelRenderer(this);
		bone5.setRotationPoint(0.0F, -1.5F, -1.5F);
		leftBoot.addChild(bone5);
		setRotationAngle(bone5, 0.1745F, 0.0F, 0.0F);
		bone5.setTextureOffset(0, 0).addBox(-1.5F, -1.5F, -1.0F, 3.0F, 2.0F, 1.0F, 0.0F, false);

		rightBoot = new ModelRenderer(this);
		rightBoot.setRotationPoint(2.0F, 21.0F, 0.0F);
		rightBoot.setTextureOffset(28, 15).addBox(-2.0F, -2.25F, -2.0F, 4.0F, 5.0F, 4.0F, 0.26F, true);
		rightBoot.setTextureOffset(24, 41).addBox(-2.0F, -2.0F, -2.5F, 4.0F, 4.0F, 1.0F, 0.0F, true);

		bone8 = new ModelRenderer(this);
		bone8.setRotationPoint(0.0F, -1.5F, -1.5F);
		rightBoot.addChild(bone8);
		setRotationAngle(bone8, 0.1745F, 0.0F, 0.0F);
		bone8.setTextureOffset(0, 0).addBox(-1.5F, -1.5F, -1.0F, 3.0F, 2.0F, 1.0F, 0.0F, true);
		
		this.bipedHead.addChild(helmet);
		this.bipedBody.addChild(chestplate);
		this.bipedLeftLeg.addChild(leftBoot);
		this.bipedRightLeg.addChild(rightBoot);
	}
	
	@Override
	public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha){
		helmet.render(matrixStack, buffer, packedLight, packedOverlay);
		chestplate.render(matrixStack, buffer, packedLight, packedOverlay);
		leftBoot.render(matrixStack, buffer, packedLight, packedOverlay);
		rightBoot.render(matrixStack, buffer, packedLight, packedOverlay);
	}

	public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
		modelRenderer.rotateAngleX = x;
		modelRenderer.rotateAngleY = y;
		modelRenderer.rotateAngleZ = z;
	}
}

 

public class BronzeArmor extends ArmorItem
{

	public BronzeArmor(IArmorMaterial materialIn, EquipmentSlotType slot) {
		super(materialIn, slot, new Item.Properties().group(ModSetup.MELTEM_GROUP));
		// TODO Auto-generated constructor stub
	}
	
	@SuppressWarnings("unchecked")
    @Nullable
    @Override
    public <A extends BipedModel<?>> A getArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlotType armorSlot, A _default)
	{
		if(itemStack != ItemStack.EMPTY && itemStack.getItem() instanceof ArmorItem) {	
			BronzeArmorModel model = new BronzeArmorModel(1.0F);
       
            model.helmet.showModel = armorSlot == EquipmentSlotType.HEAD;
            model.chestplate.showModel = armorSlot == EquipmentSlotType.CHEST;
            model.rightBoot.showModel = armorSlot == EquipmentSlotType.FEET;
            model.leftBoot.showModel = armorSlot == EquipmentSlotType.FEET;
           
            model.isChild = _default.isChild;
            model.isSitting = _default.isSitting;
            model.isSneak = _default.isSneak;
            model.rightArmPose = _default.rightArmPose;
            model.leftArmPose = _default.leftArmPose;
           
            return (A) model;
		}
		return null;
	}
	
    @Nullable
    @Override
    public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlotType slot, String type) {
        return "######:textures/models/armor/bronze_armor.png";
    }

}

 

Link to comment
Share on other sites

Mhm.. I replaced the functions in the model class as in your code but it now seems to render twice (at least for the head) and not in a.. let's say 'coherent' way
image.thumb.png.8bb4e700a6fa5dc2ab0f62dd68d8f17d.png

 

Here is what it used to look like:
unknown.png

Edited by Obeeron
Link to comment
Share on other sites

Okay so I managed to make it match the head and legs rotation + sneak but as you can see the models are too high. The boots are at the start of the legs and the chestplate starts at the middle of the body
image.png.7b30adab95168aadb1b4435aaf60726d.png
Here is the code
 

public class BronzeArmorModel extends BipedModel<LivingEntity> {
	public final ModelRenderer helmet;
	public final ModelRenderer chestplate;
	private final ModelRenderer bone2;
	private final ModelRenderer bone3;
	public final ModelRenderer leftBoot;
	private final ModelRenderer bone5;
	public final ModelRenderer rightBoot;
	private final ModelRenderer bone8;

	public BronzeArmorModel(float size) {
		super(size, 0, 64, 64);
		textureWidth = 64;
		textureHeight = 64;

		helmet = new ModelRenderer(this);
		helmet.setRotationPoint(0.0F, 0.0F, 0.0F);
		helmet.setTextureOffset(0, 0).addBox(-4.0F, -8.0F, -4.0F, 8.0F, 8.0F, 8.0F, 0.51F, false);
		helmet.setTextureOffset(0, 16).addBox(-4.0F, -8.5F, -4.0F, 8.0F, 1.0F, 8.0F, 0.45F, false);

		chestplate = new ModelRenderer(this);
		chestplate.setRotationPoint(0.0F, 5.3625F, 0.0F);
		chestplate.setTextureOffset(32, 0).addBox(-4.0F, -5.3625F, -2.0F, 8.0F, 11.0F, 4.0F, 0.28F, true);
		chestplate.setTextureOffset(40, 20).addBox(-2.0F, 6.0875F, -2.0F, 4.0F, 1.0F, 4.0F, 0.29F, false);

		bone2 = new ModelRenderer(this);
		bone2.setRotationPoint(-1.5F, 4.6375F, 0.0F);
		chestplate.addChild(bone2);
		setRotationAngle(bone2, 0.0F, 0.0F, 0.2618F);
		bone2.setTextureOffset(12, 41).addBox(-2.3F, 1.55F, -2.0F, 2.0F, 1.0F, 4.0F, 0.29F, false);

		bone3 = new ModelRenderer(this);
		bone3.setRotationPoint(1.5F, 4.6375F, 0.0F);
		chestplate.addChild(bone3);
		setRotationAngle(bone3, 0.0F, 0.0F, -0.2618F);
		bone3.setTextureOffset(0, 41).addBox(0.3F, 1.55F, -2.0F, 2.0F, 1.0F, 4.0F, 0.29F, false);

		leftBoot = new ModelRenderer(this);
		leftBoot.setRotationPoint(-2.0F, 21.0F, 0.0F);
		leftBoot.setTextureOffset(28, 15).addBox(-2.0F, -2.25F, -2.0F, 4.0F, 5.0F, 4.0F, 0.26F, false);
		leftBoot.setTextureOffset(24, 41).addBox(-2.0F, -2.0F, -2.5F, 4.0F, 4.0F, 1.0F, 0.0F, false);

		bone5 = new ModelRenderer(this);
		bone5.setRotationPoint(0.0F, -1.5F, -1.5F);
		leftBoot.addChild(bone5);
		setRotationAngle(bone5, 0.1745F, 0.0F, 0.0F);
		bone5.setTextureOffset(0, 0).addBox(-1.5F, -1.5F, -1.0F, 3.0F, 2.0F, 1.0F, 0.0F, false);

		rightBoot = new ModelRenderer(this);
		rightBoot.setRotationPoint(2.0F, 21.0F, 0.0F);
		rightBoot.setTextureOffset(28, 15).addBox(-2.0F, -2.25F, -2.0F, 4.0F, 5.0F, 4.0F, 0.26F, true);
		rightBoot.setTextureOffset(24, 41).addBox(-2.0F, -2.0F, -2.5F, 4.0F, 4.0F, 1.0F, 0.0F, true);

		bone8 = new ModelRenderer(this);
		bone8.setRotationPoint(0.0F, -1.5F, -1.5F);
		rightBoot.addChild(bone8);
		setRotationAngle(bone8, 0.1745F, 0.0F, 0.0F);
		bone8.setTextureOffset(0, 0).addBox(-1.5F, -1.5F, -1.0F, 3.0F, 2.0F, 1.0F, 0.0F, true);
		
		this.bipedHead.addChild(helmet);
		this.bipedBody.addChild(chestplate);
		this.bipedLeftLeg.addChild(leftBoot);
		this.bipedRightLeg.addChild(rightBoot);
	}
	
	@Override
    public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha)
	{
       // super.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha);
		
        helmet.render(matrixStack, buffer, packedLight, packedOverlay);
		chestplate.render(matrixStack, buffer, packedLight, packedOverlay);
		leftBoot.render(matrixStack, buffer, packedLight, packedOverlay);
		rightBoot.render(matrixStack, buffer, packedLight, packedOverlay);
    }
 
    @Override
    public void setRotationAngles(LivingEntity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch)
    {
        super.setRotationAngles(entityIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch);
        this.helmet.copyModelAngles(this.bipedHead);
        this.chestplate.copyModelAngles(this.bipedBody);
        this.leftBoot.copyModelAngles(this.bipedLeftLeg);
        this.rightBoot.copyModelAngles(this.bipedRightLeg);
    }

    
    public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z)
    {
        modelRenderer.rotateAngleX = x;
        modelRenderer.rotateAngleY = y;
        modelRenderer.rotateAngleZ = z;
    }
}

 

Link to comment
Share on other sites

Just to make sure, does it animate correctly?

If it does, then the way I fixed the problem you are having was by going in to tabula(what I used instead of blockbench) and opening up the player model. Then, make all of your parts childs of the player model. e.g. make helmet a child of the head. Once it is like that you should re align all of your parts so they are in the right place before removing them as children (even if it looks wrong) and deleting the player model from it and then exporting the model and doing the rest again.

Link to comment
Share on other sites

Quote

Fun fact about global and local ModelRenderers: If you make a global ModelRenderer a child of some other model, it will render twice! So, for every ModelRenderer you add, you need to make them local variables within your constructor to prevent that. Also, you shouldn't need to copyModelAngles if they are a child of the parent ModelRenderer.

 

Okay so if I understand correctly, this.bipedHead is the global ModelRenderer and helmet is the child, but you said I was suppose to make the local ModelRenderer local variables within the constructor. However I need to access them for the rendering part. What did I get wrong ?

Link to comment
Share on other sites

Okay so basically, if I get the render function like this :

@Override
	public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha){
		helmet.render(matrixStack, buffer, packedLight, packedOverlay);
		chestplate.render(matrixStack, buffer, packedLight, packedOverlay);
		rightBoot.render(matrixStack, buffer, packedLight, packedOverlay);
		leftBoot.render(matrixStack, buffer, packedLight, packedOverlay);
	}

then it does render properly but the animations do not work.

And if I get the render function like this :

@Override
public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {
	super.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha);
}

then the animations work but the the texture are totally mixed (see screenshot below)


image.png.c2e0967fdc0cc3f854a7ab509a58901d.png

 

 

 

42 minutes ago, ChampionAsh5357 said:

You shouldn't need to call them from the render part. If they are attached to a child, they get added via super.render(); There should be no reason to access a child anywhere outside the constructor.

In all the 'tutorials' I've seen, people enable / disable the models within getArmorModel function in the armor class like this:

model.helmet.showModel = armorSlot == EquipmentSlotType.HEAD;
model.chestplate.showModel = armorSlot == EquipmentSlotType.CHEST;
model.rightSleeve.showModel = armorSlot == EquipmentSlotType.CHEST;
model.leftSleeve.showModel = armorSlot == EquipmentSlotType.CHEST;
model.rightLegging.showModel = armorSlot == EquipmentSlotType.LEGS;
model.leftLegging.showModel = armorSlot == EquipmentSlotType.LEGS;
model.rightBoot.showModel = armorSlot == EquipmentSlotType.FEET;
model.leftBoot.showModel = armorSlot == EquipmentSlotType.FEET;

Should I not do it like that ?

Link to comment
Share on other sites

Hmm. Well then here's a thing. With the current system you have, it doesn't really support the method of local ModelRenderers. There are two ways to do it. Either remove the addChild tags and correct the model locations yourself with what you had before my previous message or redo the entire thing.

 

I'm going to assume you're just gonna remove the addChild tags. From there you just need to fix the box locations which is easy enough to do.

Link to comment
Share on other sites

To be honest moving them manually is way too hard, some of the pieces are tilted and it seems that they move according to their local rotation so.. I forfeit on that.
I'm willing to redo the entire thing because I prefer having something clean rather than twiking some values to cheat on the render.

Could you explain how to implement your local ModelRenderers method regarding 'setRotationAngles', 'render' and the constructor ?
If I get it right, I should only have the ModelRenderer variables declared within the constructor (otherwise they would magicaly be detected and rendered twice if I understood correctly) but then I have to change the .showModel boolean also in the constructor ?
Thank you!

Link to comment
Share on other sites

So here is what I get now (on an armorstand)
image.thumb.png.5368ab5453f1e84c504903641639d698.png


As you can see the textures seem heavily shifted.

 

image.thumb.png.2d789288aae420520d0e3378ad325bb1.png

 

Here is the corresponding code :

 

public class BronzeArmorModel extends BipedModel<LivingEntity> {
	
	public BronzeArmorModel(float size) {
		super(size, 0, 64, 64);
		
		ModelRenderer helmet;
		ModelRenderer chestplate;
		ModelRenderer ChestBtmPiece_R;
		ModelRenderer ChestBtmPiece_L;
		ModelRenderer rightBoot;
		ModelRenderer rightBootTop;
		ModelRenderer leftBoot;
		ModelRenderer leftBootTop;
		
		helmet = new ModelRenderer(this);
		helmet.setRotationPoint(0.0F, 0.0F, 0.0F);
		helmet.setTextureOffset(0, 0).addBox(-4.0F, -8.0F, -4.0F, 8.0F, 8.0F, 8.0F, 0.51F, false);
		helmet.setTextureOffset(0, 16).addBox(-4.0F, -8.5F, -4.0F, 8.0F, 1.0F, 8.0F, 0.45F, false);

		chestplate = new ModelRenderer(this);
		chestplate.setRotationPoint(0.0F, 5.3625F, 0.0F);
		chestplate.setTextureOffset(32, 0).addBox(-4.0F, -5.3625F, -2.0F, 8.0F, 11.0F, 4.0F, 0.28F, true);
		chestplate.setTextureOffset(40, 20).addBox(-2.0F, 6.0875F, -2.0F, 4.0F, 1.0F, 4.0F, 0.29F, false);

		ChestBtmPiece_R = new ModelRenderer(this);
		ChestBtmPiece_R.setRotationPoint(-1.5F, 4.6375F, 0.0F);
		chestplate.addChild(ChestBtmPiece_R);
		setRotationAngle(ChestBtmPiece_R, 0.0F, 0.0F, 0.2618F);
		ChestBtmPiece_R.setTextureOffset(12, 41).addBox(-2.3F, 1.55F, -2.0F, 2.0F, 1.0F, 4.0F, 0.29F, false);

		ChestBtmPiece_L = new ModelRenderer(this);
		ChestBtmPiece_L.setRotationPoint(1.5F, 4.6375F, 0.0F);
		chestplate.addChild(ChestBtmPiece_L);
		setRotationAngle(ChestBtmPiece_L, 0.0F, 0.0F, -0.2618F);
		ChestBtmPiece_L.setTextureOffset(0, 41).addBox(0.3F, 1.55F, -2.0F, 2.0F, 1.0F, 4.0F, 0.29F, false);

		rightBoot = new ModelRenderer(this);
		rightBoot.setRotationPoint(-2.0F, 21.0F, 0.0F);
		rightBoot.setTextureOffset(28, 15).addBox(-2.0F, -2.25F, -2.0F, 4.0F, 5.0F, 4.0F, 0.26F, false);
		rightBoot.setTextureOffset(24, 41).addBox(-2.0F, -2.0F, -2.5F, 4.0F, 4.0F, 1.0F, 0.0F, false);

		rightBootTop = new ModelRenderer(this);
		rightBootTop.setRotationPoint(0.0F, -1.5F, -1.5F);
		rightBoot.addChild(rightBootTop);
		setRotationAngle(rightBootTop, 0.1745F, 0.0F, 0.0F);
		rightBootTop.setTextureOffset(0, 0).addBox(-1.5F, -1.5F, -1.0F, 3.0F, 2.0F, 1.0F, 0.0F, false);

		leftBoot = new ModelRenderer(this);
		leftBoot.setRotationPoint(2.0F, 21.0F, 0.0F);
		leftBoot.setTextureOffset(28, 15).addBox(-2.0F, -2.25F, -2.0F, 4.0F, 5.0F, 4.0F, 0.26F, true);
		leftBoot.setTextureOffset(24, 41).addBox(-2.0F, -2.0F, -2.5F, 4.0F, 4.0F, 1.0F, 0.0F, true);

		leftBootTop = new ModelRenderer(this);
		leftBootTop.setRotationPoint(0.0F, -1.5F, -1.5F);
		leftBoot.addChild(leftBootTop);
		setRotationAngle(leftBootTop, 0.1745F, 0.0F, 0.0F);
		leftBootTop.setTextureOffset(0, 0).addBox(-1.5F, -1.5F, -1.0F, 3.0F, 2.0F, 1.0F, 0.0F, true);

		bipedHead.addChild(helmet);
		bipedBody.addChild(chestplate);
		bipedLeftLeg.addChild(leftBoot);
		bipedRightLeg.addChild(rightBoot);
	}

	@Override
	public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha){
		super.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha);
	}

	public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
		modelRenderer.rotateAngleX = x;
		modelRenderer.rotateAngleY = y;
		modelRenderer.rotateAngleZ = z;
	}
}

 

public class BronzeArmor extends ArmorItem
{

	public BronzeArmor(IArmorMaterial materialIn, EquipmentSlotType slot) {
		super(materialIn, slot, new Item.Properties().group(ModSetup.######_GROUP));
	}
	
	@SuppressWarnings("unchecked")
    @Nullable
    @Override
    public <A extends BipedModel<?>> A getArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlotType armorSlot, A _default)
	{
		BronzeArmorModel model = new BronzeArmorModel(1.0F);
		
		model.bipedHead.showModel = armorSlot == EquipmentSlotType.HEAD;
		model.bipedHeadwear.showModel = false;
		model.bipedBody.showModel = armorSlot == EquipmentSlotType.CHEST;
		model.bipedLeftArm.showModel = false;
		model.bipedRightArm.showModel = false;
		model.bipedRightLeg.showModel = armorSlot == EquipmentSlotType.FEET;
		model.bipedLeftLeg.showModel = armorSlot == EquipmentSlotType.FEET;
		
        model.isChild = _default.isChild;
        model.isSitting = _default.isSitting;
        model.isSneak = _default.isSneak;
        model.rightArmPose = _default.rightArmPose;
        model.leftArmPose = _default.leftArmPose;
       
        return (A) model;
	}
	
    @Nullable
    @Override
    public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlotType slot, String type) {
        return "######:textures/models/armor/bronze_armor.png";
    }
}

 

Edited by Obeeron
Link to comment
Share on other sites

The armor in the top 64x32 will be rendered automatically since that is where the original overlay is. The only thing you should be rendering is anything not already in the 64x32 biped model space. I also just opened up your texture file. The mapping is going to be very wrong. A file size of 841x326 does not scale down to 64x32. It differs by a factor of .5 resulting in the half texture offset you see before you.

Link to comment
Share on other sites

2 hours ago, ChampionAsh5357 said:

The armor in the top 64x32 will be rendered automatically since that is where the original overlay is. The only thing you should be rendering is anything not already in the 64x32 biped model space. I also just opened up your texture file. The mapping is going to be very wrong. A file size of 841x326 does not scale down to 64x32. It differs by a factor of .5 resulting in the half texture offset you see before you.

This isn't the texture, it's a screenshot of the texture oppened in Photoshop.
The original texture is 64*64 as I mentionned in the model constructor 

super(size, 0, 64, 64);


Here is the real texture :
bronze_armor.png.d010a341ba252a4055ead81562753cca.png

So should I move the custom model texture outside the 64*32 ?
 

Edited by Obeeron
Link to comment
Share on other sites

But it's the same issue as before? The top half of the texture is 64x25, 7 pixels short of the default 64x32. The default biped model renders the 64x32 area as its texture. Anything you add "must" be below that 64x32 area if you dont want it interfering in the default model. (I put must in quotations because there is some empty space throughout the model you could use).

Link to comment
Share on other sites

Yup it's the same, it's because the one from my previous message was a screenshot for making it bigger on the screen.
Okay so correct me if I'm wrong, the top half 64*32 part of the texture is a default area used by the bipedModel. If I want to make an armorModel texture I should get into consideration some kind of template to avoid interfering with it (what template should I use ? an armor one ?). The parts of my armor that align with this basic template could have their texture on it. However the different armor parts that differ from a vanilla armor model should have their texture outside the 64*32 (or within the few empty space).

Also, why does the boots render correctly and below the player ._.  

Link to comment
Share on other sites

57 minutes ago, Obeeron said:

(what template should I use ? an armor one ?)

Yeah. The default armor model uses that 64x32 area. If you are constructing a texture that doesn't specific change the default model of the armor, then it would be applied just like any other armor texture.

 

57 minutes ago, Obeeron said:

Also, why does the boots render correctly and below the player ._.  

I believe that has to do with the double child model and a case of lucky mistakes.

 

9 hours ago, Obeeron said:

-2.0F, -2.25F, -2.0F, 4.0F, 5.0F, 4.0F, 0.26F, true

When declaring the width, height, or depth of your model, it adjusts the scale of the texture needed to be wrapped. In the example I took from you, a width and height of 5.0 and 4.0 are fine. However, .26 is not so much. Even though in the tabula it will look normal, Minecraft will actually take your image, scale it up, and reference it as if it was literally 0.26 instead of what tabula outputs. So in your case, to have a correctly mapped texture, it would need to be scaled up to 6400x3200 to correctly map those decimal values.

 

Also, a model with a size of 0.0 will not render anything. I believe it needs at least a 0.005 thickness to stop flickering.

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.



×
×
  • Create New...

Important Information

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