XComp's Forums

A place to discuss the mods of XComp
It is currently Fri May 26, 2017 11:06 am

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Laggy gradients
PostPosted: Fri May 12, 2017 8:57 pm 
Offline
Poster

Joined: Tue Sep 06, 2016 11:19 pm
Posts: 8
So I made an age that has two gradients applied respectively to two individual star layers. The only trouble is, it's really laggy! and I mean, really laggy...

it seems the problem happens when two gradients are transitioning at the same time. Here's a GIF of the age (the piston shown to demonstrate the FPS of the image, and that the choppiness of the stars is not the GIF's fault. also, please don't mind the weird white little specs you see in the picture, as they're an artifact of the GIF encoder. the only two legitimate star layers are the red and blue ones):
Image


I'm running the latest version of Mystcraft with no extra mods installed. Baselining is turned off. I've tried this before on older versions (such as Tekkit) and it worked seamlessly. What gives?

And in case anyone asks, the agedata:
Attachment:
agedata_11.dat [690 Bytes]
Downloaded 1 time


Really, what I'm asking is this: is there anything that is influencing this I'm unaware of, or is it a fault with the mod? If so, should I report it on the issue tracker?


Top
 Profile  
 
 Post subject: Re: Laggy gradients
PostPosted: Mon May 15, 2017 12:42 pm 
Offline
Mystcraft Developer
User avatar

Joined: Sat Aug 25, 2012 9:33 pm
Posts: 3950
I can't think of any reason that gradients would cause lag part of the time but not all of the time. They perform their calculations every frame.

It might be the star renderer logic itself that has issues. Does this occur with stars at certain colors that aren't tied to gradients?

_________________
I am the Mystcraft Dev.


Top
 Profile  
 
 Post subject: Re: Laggy gradients
PostPosted: Tue May 16, 2017 12:47 am 
Offline
Poster

Joined: Tue Sep 06, 2016 11:19 pm
Posts: 8
xcompwiz wrote:
I can't think of any reason that gradients would cause lag part of the time but not all of the time. They perform their calculations every frame.

It might be the star renderer logic itself that has issues. Does this occur with stars at certain colors that aren't tied to gradients?



Just tested it now. Yup, definitely happens with a single color (I used green, if that matters) too. I would provide a GIF, but given how easy the test is to perform and how hard it is to notice the FPS loss when it twinkles I feel it wouldn't be worth it.

Also, I take back what I said about it happening when two gradients are transitioning at the same time. I just tried a single star gradient and upwards of about 20 star gradients in two different ages and it all happens there too, at (from what i can tell) basically the same FPS loss.


Top
 Profile  
 
 Post subject: Re: Laggy gradients
PostPosted: Wed May 17, 2017 9:40 am 
Offline
Mystcraft Developer
User avatar

Joined: Sat Aug 25, 2012 9:33 pm
Posts: 3950
Good information. Thanks! :)

I'll need to review the star render code anyway for the 1.11.2 update. I'll keep this in mind as I do.

Are other gradient color effects similarly affected, or is it only twinkling stars? Do non-twinkling stars and twinkling stars both have the same FPS drop?

It is strange that the FPS drop doesn't scale up with the number of star effects. It might be worth testing to see if the FPS drop happens when there aren't any stars i nthe age.

_________________
I am the Mystcraft Dev.


Top
 Profile  
 
 Post subject: Re: Laggy gradients
PostPosted: Wed May 17, 2017 9:41 pm 
Offline
Poster

Joined: Tue Sep 06, 2016 11:19 pm
Posts: 8
I think there's some confusion going on here that I feel really isn't anyone's fault, so let me clarify some things: first of all, I've actually been working with normal stars the entire time. The stars as seen in the GIF in the first post are tied to gradients that go from black to their respective color to black again, giving the illusion of fading in and out (and when I was referring to stars "twinkling", I meant the way normal stars appear to go through a subtle animation). Second, when I say "FPS drop" I'm actually referring to the sky's "FPS", not the game's. So the sky's "FPS drop" doesn't seem to affect Minecraft's in any way.

Now that we have that cleared up, in regards to your last post: I've just tested Twinkling Stars with a base color and with a gradient and they both also suffer a staggering slowdown. So in other words, yeah from my tests all different types of stars go through this speed loss. Although no, I really don't see the stars getting any slower when there are more layers with gradients...

If you like all this extra information, another thing I feel I might want to mention is that sometimes the stars rapidly traverse across the gradient when I first enter an age (I specifically remember seeing this in the gradient Twinkling Stars age), until it starts really slowing down to the speed the demonstration in the first post shows.

In fact, I even made a simple comparison of two different versions to better show how slow this really is, this time changing from blue to yellow to more obviously illustrate they're normal stars. Both GIFs are in 20 FPS and Minecraft is running at around 120 FPS (I was having fun with the GIF editor putting the text at the bottom :) )

Image Image


Top
 Profile  
 
 Post subject: Re: Laggy gradients
PostPosted: Thu May 18, 2017 9:04 am 
Offline
Mystcraft Developer
User avatar

Joined: Sat Aug 25, 2012 9:33 pm
Posts: 3950
Ah! Now I get it! Thanks for clearing everything up. :)

I super appreciate all of the information and effort you've provided, here. This is great, and very helpful. :)



OK, looks like either the sky redraws less frequently (or using the wrong time value) or the gradient calculation is losing some precision somewhere.

I can't think of anything not sky related that uses a gradient in symbols, off hand, but the ink mixer uses the same gradient calculation system.
Would you be able to test the ink mixer gradient (adding some material to it) to see if that gradient is smooth?

Is the motion of the stars equally jumpy, or is it just the color transition? Does the jumpiness apply to the other celestials?

Thanks again! :)

_________________
I am the Mystcraft Dev.


Top
 Profile  
 
 Post subject: Re: Laggy gradients
PostPosted: Thu May 18, 2017 7:37 pm 
Offline
Poster

Joined: Tue Sep 06, 2016 11:19 pm
Posts: 8
Welp, I found out the reason this has been happening. Having the gamerule DoDaylightCycle off will apparently make Mystcraft celestials bug out. Part of me wants to feel stupid while the other part objectively asks how I could have ever known this simple fact. :roll:

I hope I haven't wasted your time.


Top
 Profile  
 
 Post subject: Re: Laggy gradients
PostPosted: Fri May 19, 2017 8:49 am 
Offline
Mystcraft Developer
User avatar

Joined: Sat Aug 25, 2012 9:33 pm
Posts: 3950
Well, it's still a bug. :D

Just, perhaps, a predictable one. I'll see what can be done about it. Thank you very much for tracking it down and helping me to understand the issue. :)
If you feel like being a mod tester, I'll have lots for you to do in the near future. :P You're very good at it.

_________________
I am the Mystcraft Dev.


Top
 Profile  
 
 Post subject: Re: Laggy gradients
PostPosted: Fri May 19, 2017 3:56 pm 
Offline
Poster

Joined: Tue Sep 06, 2016 11:19 pm
Posts: 8
xcompwiz wrote:
Well, it's still a bug. :D

Just, perhaps, a predictable one. I'll see what can be done about it. Thank you very much for tracking it down and helping me to understand the issue. :)
If you feel like being a mod tester, I'll have lots for you to do in the near future. :P You're very good at it.



wow, thanks! I sent you a PM.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group  
Design By Poker Bandits