Posted September 15, 20178 yr 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 September 15, 20178 yr by Busti PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
September 15, 20178 yr 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.
September 15, 20178 yr 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.
September 15, 20178 yr 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
September 15, 20178 yr 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.
September 16, 20178 yr 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.