Jump to content

Large Custom Model Render Bounds Help


AndyBTTF

Recommended Posts

Ok, so I'm working on a mod which imports large sets from animations into Minecraft. But the thing is, whenever I look to far away from that block with the custom model, the whole model disappears...

Example: https://gyazo.com/e6b376db49e1d80d8e90ee836d70eaec 

I'm wondering if anyone knows a way to fix this issue, cause its a pretty big problem right now.

Link to comment
Share on other sites

Well yeah, the block that has that model is outside of your view. Minecraft assumes that all block models are no larger than 1x1x1, with some allowance given to the Y axis (but no more than half a block) due to fences.

 

You can't fix this except by using multiple blocks and multiple models.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

If you are using a TESR then TileEntity#getRenderBoundingBox allows you to specify a custom AxisAlignedBB to do frustrum checks and TileEntity#getMaxRenderDistanceSquared allows you to control the distance at which your tile will no longer be rendered.

Edited by V0idWa1k3r
Link to comment
Share on other sites

3 hours ago, V0idWa1k3r said:

If you are using a TESR then TileEntity#getRenderBoundingBox allows you to specify a custom AxisAlignedBB to do frustrum checks and TileEntity#getMaxRenderDistanceSquared allows you to control the distance at which your tile will no longer be rendered.

Is there any way to do that without a tesr? -or would you have to do that? i dont wanna cause unnecessary lag, and ive noticed tesrs do that once they add up.

Edited by AndyBTTF
Link to comment
Share on other sites

Without a TESR?

Yes, multiple blocks.

4 hours ago, Draco18s said:

You can't fix this except by using multiple blocks and multiple models.

 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

13 minutes ago, Draco18s said:

Without a TESR?

Yes, multiple blocks.

 

Well I don't feel like splitting that model into a billion different little models, that set is huge. I have overridden TileEntity#getRenderBoundingBox and returned INFINITE_EXTENT_AABB in a normal TE, but it doesnt achieve anything. But I'm not able to override TileEntity#getRenderBoundingBox in a class that extends tesr. Im probably missing something super simple, so please excuse my stupidity lol

Edited by AndyBTTF
Link to comment
Share on other sites

28 minutes ago, AndyBTTF said:

I'm not able to override TileEntity#getRenderBoundingBox in a class that extends tesr

Of course not, that's a method in TileEntity. But in order for it to work, your model needs to be rendered from a TESR, not a block model.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

10 minutes ago, AndyBTTF said:

You mean using the old way of importing objs? No json files, and all of the rendering being done inside of the tesr?

Yes

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

  • 2 weeks later...
On 5/19/2018 at 6:52 AM, AndyBTTF said:

f u n. welp, thanks for your help :)

You can use block models, look at the AssemblyTable in my mod. It takes up an area of 3x2x3 and renders multiple models inside that area. The larger bounding box is achieved with multiple blocks.

https://github.com/Cadiboo/WIPTech/blob/master/src/main/java/cadiboo/wiptech/block/BlockAssemblyTable.java

https://github.com/Cadiboo/WIPTech/blob/master/src/main/java/cadiboo/wiptech/client/render/tileentity/TESRAssemblyTable.java

 

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Another option is to use an actual Entity instead. You can disable the frustum checking easily for entities.

 

Not sure if that really helps depending on what format your models are in. I'm guessing you have them in JSON which is why you're concerned about moving to OBJ. I think you can render baked models as entities though -- look at how falling blocks are rendered. Choonster explains how to do that here: 

 

Edited by jabelar

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

Link to comment
Share on other sites

On 5/29/2018 at 7:00 AM, jabelar said:

you have them in JSON which is why you're concerned about moving to OBJ.

They actually are in OBJ, not JSON.

Please forgive me for my lack of knowledge of this, I'm not very talented in the area of modding. im just doing this for a friend because i know a tiny bit of java.

Im using Forge's built-in OBJ rendering with the JSON models referencing the OBJ models, https://gyazo.com/bdb29fce63b095687490d7ec34109a5b Would this JSON work with a TESR that's trying to render a block model from a vanilla-JSON?
 

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.