1

OBJ Armor Rendering - Texture Bug

QuickScoP3s's Avatar QuickScoP3s7/20/17 1:09 pm
1 emeralds 611 8
7/27/2017 2:20 am
QuickScoP3s's Avatar QuickScoP3s
To the PMC modding community

I'm currently in the progress of creating an .OBJ file armor renderer, but I have a problem:

I've created a class extending ModelRenderer where I do the rendering stuff and everything is loaded in fine, except the texture...

I'm on my 2nd week of searching for the problem: I've looked at a lot of GitHub projects, MCForums, Forge Forums, ... posts, but I have yet to find the problem!

Here is the renderer code:
https://pastebin.com/jF0g5Ww8

This is how it renders (only one color pixel of the texture is loaded)


This is the texture (The not-brown colors are to showcase the problem)

(Download it to open zoom in)

Finaly: There is no problem wiith the model itself, as all modeling programs (Blender, Windows 3D View, Paint 3D, ...) open it fine...

Thanks in advance!
Posted by QuickScoP3s's Avatar
QuickScoP3s
Level 55 : Grandmaster Programmer
26

Create an account or sign in to comment.

8

1
07/27/2017 2:20 am
Level 55 : Grandmaster Programmer
QuickScoP3s
QuickScoP3s's Avatar
Thx, I'll try!
1
07/26/2017 2:28 pm
Level 51 : Grandmaster Pixel Painter
TheMightyWaffle
TheMightyWaffle's Avatar
It may actually be the texture itself.
Try making a larger version of the texture at 16x16 and re-UV-map it for it. Let me know if it works if you try that out.
1
07/20/2017 3:30 pm
Level 51 : Grandmaster Pixel Painter
TheMightyWaffle
TheMightyWaffle's Avatar
What did you use to make the model?
Also, was it UV mapped properly and everything?
1
07/21/2017 6:49 am
Level 55 : Grandmaster Programmer
QuickScoP3s
QuickScoP3s's Avatar
I used Cubik Studio, but I can open it in every other 3D design program, which means the UV SHOULD be mapped correctly
I also imported it to Blender and exported it there: Same result...

I hope Forge makes a tutorial for loading OBJ files as armor one day...
1
07/20/2017 1:59 pm
Level 1 : New Crafter
BenceTheGreat
BenceTheGreat's Avatar
ok, as I said before I don't mod, but can we get a picture of what happens if you try to load the texture?
1
07/21/2017 6:46 am
Level 55 : Grandmaster Programmer
QuickScoP3s
QuickScoP3s's Avatar
I appriciate you trying to help, but please don't if you have no experience with modding... And to answer your question: The image with Steve HAS the texture loaded -> Download and open the tiny image and look at the upper right corner pixel: It's orange, as is the helmet in the picture
1
07/20/2017 1:42 pm
Level 55 : Grandmaster Programmer
QuickScoP3s
QuickScoP3s's Avatar
Thx for the quick reply:
1. Yes (View Post -> Last lines)
2. Yes, because it loads the orange 1 pixel color from the texture
3. Same as 2
1
07/20/2017 1:33 pm
Level 1 : New Crafter
BenceTheGreat
BenceTheGreat's Avatar
I'm no modder, most of the things I'll ask you've probably already done but just incase:
1. Does it load in the modeling software?
2. Are you sure that the model can identify/find the texture?
3. Related to the last one, are you sure that the model can load the texture?

These are some questions to answer, just in case you may have missed something, and/or to supply other people with some info.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome