Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I made a model for a trashcan for a mod. (I was playing around with the Forge API and to get used to it)

This is what happens: (No errors)

hRuoxKD.png

 

This is what the model looks like in Techne:

tYk0MZo.png

 

Model class: http://pastebin.com/HqRvFm5M

 

Block class: http://pastebin.com/wWpnG80P

 

Renderer class: http://pastebin.com/WgY7Ud3S

 

Main class: http://pastebin.com/JPdN5hk6

 

Any ideas? (Will post any other info needed)

I find that when you're working on the model, it is best to have a texture file that is filled in with a solid coloar (don't worry about proper texture map, just have a 64 x 32 file that is some color that is easy to see like orange.

 

What it looks like to me is that your model isn't finding the right texture.  (Do you see any errors in the console log indicating that it didn't find the texture?)

 

Or maybe your texture is found but the texture offsets are wrong (this can be tricky to get right).

 

Lastly, you might have got your texture improperly scaled.  You MUST have your texture file keep the same 2:1 width to height ratio, otherwise it will squish the texture in one dimension and cause transparent gaps.

 

Anyway, it is one of those three things.  In all cases, if you try with a fully filled texture image you can confirm that the model is working properly before you fool around further with the texture mapping itself.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

  • Author

I find that when you're working on the model, it is best to have a texture file that is filled in with a solid coloar (don't worry about proper texture map, just have a 64 x 32 file that is some color that is easy to see like orange.

 

What it looks like to me is that your model isn't finding the right texture.  (Do you see any errors in the console log indicating that it didn't find the texture?)

 

Or maybe your texture is found but the texture offsets are wrong (this can be tricky to get right).

 

Lastly, you might have got your texture improperly scaled.  You MUST have your texture file keep the same 2:1 width to height ratio, otherwise it will squish the texture in one dimension and cause transparent gaps.

 

Anyway, it is one of those three things.  In all cases, if you try with a fully filled texture image you can confirm that the model is working properly before you fool around further with the texture mapping itself.

 

I think 2 things may be happening here  :-\

 

1. Texture offsets

or

2. My Techne model resized itself to 128x32.

 

Most likely #2, but im going to make a fully filled texture image to see if it is working.

 

EDIT: Its the 128x32 causing the issue, as well as duplicate Shape1 variables.

Yeah, it took me a long time to realize that the texture file had to have the 2:1 proportions.  My kids were making all my texture maps for me and sometimes they just weren't working, but eventually we realized that it was scaling in one dimension and causing the trouble.  I'm not entirely sure why the texture maps work that way -- you think they would just take pixels as they need them based on the offset (who cares if there are extra pixels in the file) -- but it is important to remember.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Hello Spideynn,

 

U know that it's realy better to use http://gist.github.com/ to show your code, u can update it when u change something :), like the two glPushMatrix() :) !

 

Maybe we can have the Techne file to see... it's your Class model are realy strange, u have just 3 shapes (ModelRenderer) and u modify it many time... i think that it will need more shape in your Techne !

 

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.