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

Hi everyone,

I've been porting a mod from 1.7.10 which had no problem rendering entities with models imported from .obj files; it just called renderAll() and that was that.

I didn't find something similar in 1.12.2 so have naively written my own renderer, which looks like this (renderWithNormal function): https://github.com/fredtargaryen/ExRollerCoaster/blob/1.12.2/src/main/java/erc/renderer/ModelRenderer.java

Here's the result: https://imgur.com/a/EJbBQ31

So it looks like if it's going to render a face, it won't render any faces that share an edge with that face... the problem is probably deeper than just that though.

Things I've considered so far:

  • Invalid .obj file: the .obj worked with 1.7.10, and importing it in Blender shows all the triangles.
  • Bad renderer: I have copied the rendering code from decompiled Forge 1.7.10, and as far as I can see the model was the same. Personally I can't see why my naive renderer wouldn't work.
  • Model importing wrong: the OBJModel object has the same number of faces as the .obj file has. There might be some kind of check the importing code does which changes point coordinates; I haven't checked whether all the values are the same yet because that could be a long, tedious process.

So my guess is there's some quirk with how 1.12.2 does graphics, that may have led to that renderAll system being removed? Though of course I am open to the suggestion that my renderer's bad.

Anyone know what's going on here?

Thanks for reading.

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.