Jump to content

Recommended Posts

Posted

Do you have a picture of what it is supposed to look like because from what I can gather, the model seems to be rendering the way you wrote it.

 

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.

 

Also, make sure you are using the newest version of tabula released for 1.15 if you are creating models.

Posted
On 7/7/2020 at 4:55 PM, ChampionAsh5357 said:

Do you have a picture of what it is supposed to look like because from what I can gather, the model seems to be rendering the way you wrote it.

 

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.

 

Also, make sure you are using the newest version of tabula released for 1.15 if you are creating models.

http://prntscr.com/teaidw 

^how to textures look in tabula(im using the latest version btw 8.0.1 for 1.15)

 

        ModelRenderer helmetLocal = this.Helmet;
        ModelRenderer chestplateLocal = this.Chestplate;
        ModelRenderer leftSleeveLocal = this.LeftSleeve;
        ModelRenderer rightSleeveLocal = this.RightSleeve;
        ModelRenderer rightLeggingLocal = this.RightLegging;
        ModelRenderer leftLeggingLocal = this.LeftLegging;
        ModelRenderer rightBootLocal = this.RightBoot;
        ModelRenderer leftBootLocal = this.LeftBoot;

^ also i'm not sure if this is what you meant with the local variables and would the double rendering cause the incorrect textures

 

 

Posted
5 minutes ago, clearcut said:

also i'm not sure if this is what you meant with the local variables and would the double rendering cause the incorrect textures

Setting a global variable to a local variable does not make it local.

 

You're having the same issue as the other person where you are trying to render everything custom and then adding child models. The top 64x32 area is reserved for the biped model rendering. Everything beneath that is space to render your own model on top of. If you are creating a texture that uses basic armor texturing, use the biped model area. Else, create your own model and attach it.

Posted

My textures have been changed to make sure that nothing is in the 64 x 32 area so I believe that shouldnt get in the way of the default model rendering.

 

But I still do not understand why the textures on the model are so off.

17 hours ago, ChampionAsh5357 said:

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.

I thought this might be the same problem for me but I do not have any decimals and I tried playing around with scaling the texture up aswell as increasing textureHeight and textureWidth in the model but It does not make it any better.

 

Thanks for your help so far btw,

onyx_armor2.png

Posted

Well that's an easy problem. You call textureHeight and textureWidth too late. For the biped model, it still uses a 64x32 image. So, your texture is compressed and scaled to that. You need to set it within your super like so:

super(modelSize, 0, 128, 128);

This makes it so that the default biped renderer knows that its supposed to be just taking the 64x32 area into account rather than the entire 128x128.

 

Due to the lack of understanding of ModelRenderer and custom armor models, I spent the entire day creating a detailed explanation of it and how it should be rendered. I would recommend taking a read through it as it should go over everything you need to know.

Posted

It is finally fixed! Thanks for the help

 

 

 

For the people having the same issue as me.

super(modelSize, 0, 128, 128);

 

^I implemented this change and followed this tutorial below to update all my classes.

2 hours ago, ChampionAsh5357 said:

That made the model look a bit better as it fixed the double rendering issue. However, I still had the same issue.

 

 

I then found out that the problem was as below.

       ModelRenderer LeftBoot = new ModelRenderer(this, 0, 13);
	LeftBoot.setTextureOffset(22, 53).addBox(-3.0F, 8.0F, -3.0F, 1.0F, 4.0F, 6.0F, 0.0F, 0.0F, 0.0F);

This makes the group "LeftBoot" as well as all my other groups that were declared have a texture offset(that is the "0,13").

 

In tabula, to find the texture offset for a box, it adds the texture offset from the group to the texture offset from the individual boxes and so your model will look normal.

However, in game it does not work the same way.

 

 

	LeftBoot = new ModelRenderer(this);
        LeftBoot.setTextureOffset(22, 66).addBox(-3.0F, 8.0F, -3.0F, 1.0F, 4.0F, 6.0F, 0.0F, 0.0F, 0.0F);

 

To fix this, I changed the declaration of all my groups to be declared as above. This makes the group texture offset (0,0) then you can add the numbers that were in the group's texture offset to each of the boxes in that group.

Posted
2 hours ago, clearcut said:

In tabula, to find the texture offset for a box, it adds the texture offset from the group to the texture offset from the individual boxes and so your model will look normal.

However, in game it does not work the same way.

I will make sure to include this as a note in my explanation. Congrats on getting it fixed.

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.