Jump to content

[1.14.4] Rendering custom OBJ Models


Felix_

Recommended Posts

Hi there,

 

I want to use my custom 3D Models I created, but I don't understand how to render and bake custom 3D OBJ Models, or if it is even possible.

 

Here is what I got so far:

public class BakeHandler {
	
	public BakeHandler() {
		OBJLoader.INSTANCE.addDomain(HelicopterMod.MOD_ID);
	}
	
	@SubscribeEvent
	public void onModelBake(ModelBakeEvent event)
	{
	    try
	    {	    	
	        IUnbakedModel model = OBJLoader.INSTANCE.loadModel(new ResourceLocation(HelicopterMod.MOD_ID, "models/entity/helicopter_tris.obj"));
	        //model.bake(bakery, spriteGetter, sprite, format);
	        
	    } catch (Exception e)
	    {
	        e.printStackTrace();
	    }
	}
}

 

I simply don't know where to continue now, as I don't find any currently working example or explanation. 

 

Does anyone of you guys know an example I can look at, or a good explanation on how to use OBJ models for entities?

 

Would appreciate any help :D

 

Link to comment
Share on other sites

On 9/18/2019 at 5:10 AM, TheMikeste1 said:

I made a post about this topic not too long ago. You can find it here: 


Hopefully you'll be able to figure it out by poking through there.

Oh thanks. Got a solution by now, i just made my own file format and parsed the object to textured quads ;D

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.

Announcements



×
×
  • Create New...

Important Information

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