Jump to content

[SOLVED] MODELING HELP!!! - - - OBJ making for 1.7.10


jackmano

Recommended Posts

I made a tesr renderer, a tile entity to render, and a block, and I know the renderer works because I rendered other models with it. But when I use my own OBJ model, the texture doesn't work. It's super simple, I just resized the default Blender cube and exported to OBJ, but the texture wont work. The cube renders, but just 1 color, however the color seems to be related to the texture, like I set the texture to the blaze texture and it was orange, pig was pink, etc. It looks like one pixel of the texture renders, depending on what way I look, like if i use a texture from a mob, that has some transparent pixels, sometimes the model is see-through, but if i use a solid texture, its never see-through. Please help, I need to make models that actually have textures! (My renderer is TESRHydroTorch, block is BlockHydroTorch, etc)

Tile Class

 

 

package com.rabidfox.syntheticgems;

import net.minecraft.tileentity.TileEntity;

public class TileHydroTorch extends TileEntity {

public int getFacing() {
	// TODO Auto-generated method stub
	return 0;
}

}

 

 

Block Class

 

 

package com.rabidfox.syntheticgems;

import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

public class BlockHydroTorch extends BlockContainer{
public BlockHydroTorch(){
	super(Material.circuits);
	setBlockName("syntheticgems" + "_" + "blockhydrotorch");
	setCreativeTab(SyntheticGems.sgemstab);
	setBlockTextureName("minecraft" + ":" + "iron_block");
	setHardness(10.0F);
}
@Override
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side)
{
return false;
}

@Override
public boolean isOpaqueCube()
{
return false;
}

@Override
public boolean renderAsNormalBlock()
{
return false;
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
	   return new TileHydroTorch();
}
}

 

 

Renderer

 

 

package com.rabidfox.syntheticgems;

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;

import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;

public class TESRHydroTorch extends TileEntitySpecialRenderer{

IModelCustom model = AdvancedModelLoader.loadModel(new ResourceLocation("syntheticgems", "obj/untitled.obj"));
ResourceLocation texture = new ResourceLocation("minecraft", "textures/entity/pig/pig.png");

@Override
    public void renderTileEntityAt(TileEntity te, double posX, double posY, double posZ, float timeSinceLastTick) {
TileHydroTorch te2 = (TileHydroTorch) te;

		bindTexture(texture);

		GL11.glPushMatrix();
		GL11.glTranslated(posX + 0.5, posY + 0.5, posZ + 0.5);
		GL11.glPushMatrix();
		model.renderAll();
		GL11.glPopMatrix();
		GL11.glPopMatrix();
	}
}

 

 

Log (no crash)

[10:59:01] [main/INFO] [GradleStart]: Extra: []
[10:59:02] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/machi_000/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[10:59:02] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[10:59:02] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[10:59:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[10:59:02] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[10:59:02] [main/INFO] [FML]: Forge Mod Loader version 7.99.16.1448 for Minecraft 1.7.10 loading
[10:59:02] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_45, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_45
[10:59:02] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[10:59:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[10:59:02] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
[10:59:02] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[10:59:02] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[10:59:02] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[10:59:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[10:59:02] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[10:59:02] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[10:59:02] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[10:59:03] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[10:59:08] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[10:59:08] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[10:59:08] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
[10:59:10] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[10:59:10] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
[10:59:10] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
[10:59:10] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[10:59:13] [main/INFO]: Setting user: Player608
[10:59:18] [Client thread/INFO]: LWJGL Version: 2.9.1
[10:59:22] [Client thread/INFO] [sTDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: ---- Minecraft Crash Report ----
// Sorry 

Time: 10/22/15 10:59 AM
Description: Loading screen debug info

This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_45, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 777851592 bytes (741 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: 
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.3.12682 Compatibility Profile Context 13.302.1601.0' Renderer: 'AMD Radeon(TM) R3 Graphics'
[10:59:23] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[10:59:23] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1448 Initialized
[10:59:23] [Client thread/INFO] [FML]: Replaced 183 ore recipies
[10:59:24] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[10:59:25] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[10:59:25] [Client thread/INFO] [FML]: Searching C:\Users\machi_000\Documents\Minecraft Development\syntheticgems\eclipse\mods for mods
[10:59:27] [Client thread/INFO] [syntheticgems]: Mod syntheticgems is missing the required element 'name'. Substituting syntheticgems
[10:59:36] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[10:59:38] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, syntheticgems] at CLIENT
[10:59:38] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, syntheticgems] at SERVER
[10:59:40] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:syntheticgems
[10:59:40] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[10:59:40] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
[10:59:40] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
[10:59:41] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
[10:59:41] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[10:59:41] [Client thread/INFO] [FML]: Applying holder lookups
[10:59:41] [Client thread/INFO] [FML]: Holder lookups applied
[10:59:41] [Client thread/INFO] [FML]: Injecting itemstacks
[10:59:41] [Client thread/INFO] [FML]: Itemstack injection complete
[10:59:41] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
[10:59:41] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
[10:59:42] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
[10:59:42] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[10:59:43] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
[10:59:43] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
[10:59:43] [sound Library Loader/INFO]: Sound engine started
[10:59:58] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[10:59:59] [Client thread/INFO]: Created: 256x256 textures/items-atlas
[10:59:59] [Client thread/INFO] [sTDOUT]: [com.rabidfox.syntheticgems.SyntheticGems:init:132]: Successfully Registered World Generator
[10:59:59] [Client thread/INFO] [sTDOUT]: [com.rabidfox.syntheticgems.SyntheticGems:init:135]: Successfully Bound Hydro Torch TESR
[10:59:59] [Client thread/INFO] [FML]: Injecting itemstacks
[10:59:59] [Client thread/INFO] [FML]: Itemstack injection complete
[11:00:00] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
[11:00:00] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:syntheticgems
[11:00:01] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[11:00:01] [Client thread/INFO]: Created: 256x256 textures/items-atlas
[11:00:01] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
[11:00:01] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down...
[11:00:02] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]:     Author: Paul Lamb, www.paulscode.com
[11:00:02] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
[11:00:02] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
[11:00:02] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
[11:00:02] [Thread-10/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
[11:00:02] [Thread-10/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[11:00:02] [Thread-10/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
[11:00:02] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
[11:00:02] [sound Library Loader/INFO]: Sound engine started

Link to comment
Share on other sites

Look around in your Model's mesh, where the texture is set - that is where you import textures to Blender - that is most likely where you must set your texture path - as I stated before, this is something that I would try first, considering this is what you had to do in 1.8 for B3D models until a recent Forge build. I would then look in your code and make sure you are binding your texture correctly with the correct MODID and texture path. After that, double check your texture location and again, your IItemRenderer type to make sure you are rendering your model and binding your texture correctly.

 

*Also, Forge .OBJ implementation requires your mesh to be triangular, not in quadrilaterals*

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

Link to comment
Share on other sites

When you make an .obj model, generally speaking the texture is very specific to the model. In the case of the default blender cube, it's probably a very small texture - so when you apply a vanilla mob texture to the cube, it's only sampling a couple of pixels from the texture to render. Usually you can scale up with no issues (eg for a 2x2 texture, 4x4, 8x8, 256x256 etc will work) - but if you're using mob textures then the resolution probably doesn't match (they are often multiples of 1x2), which would cause issues

 

Have a look at UV mapping etc for blender, so you can make your own relevant test texture from the cube, then use that instead of the mob texture.

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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