maruohon / multishot

Multishot Minecraft mod for automatically taking screenshots (for timelapses etc)
http://minecraft.curseforge.com/projects/multishot
GNU Lesser General Public License v3.0
6 stars 1 forks source link

Items being picked up appear in freecam (?) #6

Open magneticflux- opened 7 years ago

magneticflux- commented 7 years ago

Multishot version: 1.12.0-3.2.2 Forge version: 14.21.1.2423

At least, I think that's what is happening. I was mining rows of grass blocks and my freecam suddenly showed floating dirt items for two frames. Here's the relevant images:

2017-07-24_10 09 58_000218

2017-07-24_10 09 58_000219

You can see my player in iron armor on the right side, at the bottom of the path from the nether portal.

magneticflux- commented 7 years ago

Addendum: this also happens with the Minecolonies build preview. I don't know if the rendering systems are on the same "level" or something, but it looks like this:

image

Obviously the structure in the center is misplaced, but the diamond blocks denoting the colony boarders are also shifted. These structures only appear to the player using the wand, so others on the server (and possibly freecam?) shouldn't see them.

maruohon commented 7 years ago

Do those previews stay fixed in the same place from the free cam's point of view, or do they move around when your player moves in relation to the preview locations?

But yeah, obviously the free camera rendering is for some reason picking up things that normally are rendered for the player's point of view. Fixing this might require copy & pasting the massive vanilla world rendering method, and leaving out parts that the free camera shouldn't render... which would then become a new place for countless situational rendering bugs...

I was trying to find out why the item pickup animation renders for the free camera, and it seems to happen via a particle renderer. And from what I could see, it should be using the item's and the picking-up-entity's positions, so I don't know why it would render for the free camera. Unless I was looking at the wrong thing after all...

magneticflux- commented 7 years ago

@maruohon I think they're fixed around my player, so they shift around in the freecam. My framerate was only 5 sec/frame, so I'm not sure exactly how it moved between frames. Would it be possible to spoof the freecam's position to the player for certain rendering items and then return it to the path?

maruohon commented 7 years ago

What exactly would you like to accomplish with that spoofing? The rendering currently happens via a single method call, so if the camera's position would be changed to the player's position before rendering, then it would render exactly what the player sees, ie. the same as without free camera mode.

OH! I just now thought of why the previews probably get rendered for the free cam - it's because they use something like the RenderWorldLastEvent, which also fires when the free camera renders its view point. So I probably need to copy & paste the render code and leave out posting those events... :/

magneticflux- commented 7 years ago

@maruohon Here's a full timelapse video I rendered: Link. It'll be in 1080p when Google gets around to it. You can see examples of items and the Minecolonies preview, as well as sky color changes as the player descends into the mine to just above bedrock. Clearly, several things still depend on the player's position, but I don't know what exactly since I haven't spent much time inside Minecraft's rendering code.

maruohon commented 7 years ago

I just uploaded version 3.3.0, which adds (an optional) custom rendering method to the free camera mode. It fixes the Minecolonies previews (and other modded event-based rendering things) rendering for the free camera. There is also a new config option (disabled by default, as in, do not render) for that custom rendering mode to omit a certain type of particle effects rendering, which fixes the item pickup animation/particle rendering for the free camera.

Let me know how that version works for you. I'm also interested (haven't tested it myself) whether or not this new rendering method works better or worse or just the same with Optifine (that fast rendering option that was mentioned in the other issue).