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

I am attempting to render an ItemStack in 3D, hovering over a block.

I would like to use a FastTESR to do so.

I am using 

renderItem.getItemModelWithOverrides(stack, null, null);

to get the item model.

 

Problem is I would like to apply translation, rotation and scaling to the rendered model.
Is there a handy method I can use without touching all the baked quads myself?

(Also if there is better practice to do this I would greatly appreciate any advice)

 

Pointing me to some reference code or an example implementation should be enough.

Edited by Busti

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

  • Author

Would it even be a good Idea to do those transformations every frame?
Using a FastTESR they would probably have to be computed on the CPU and using the matrix stack would be more efficient?

Thoughts?

 

If not are there common methods to apply transformations to the entirety of an IBakedModel?

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

  • Author

I do not usually bump posts, but I have been digging through rendering classes for 2 days now and I cannot find something that is really helpful.
IBakedModel's are so finite.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

  • Author
1 hour ago, Aeronica said:

I believe diesieben07 linked this code for a similar post about transforming baked quads.
https://github.com/Vazkii/Botania/blob/master/src/main/java/vazkii/botania/client/model/GunModel.java#L82-L106

 

Thanks that is exactly what I was looking for.
Yet the question remains if it is actually more efficient than using the matrix stack. Doing so many vertex operations on the cpu every frame does not feel correct.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

  • Author

Well I want to make the item rotate slowly, which requires an update every single frame.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

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.