Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95a is out! (03/26/21); Blog post: Skill Changes, Part 2 (07/15/21)

Author Topic: Entity Shading Limitation/Bug?  (Read 2021 times)

Machine

  • Commander
  • ***
  • Posts: 114
    • View Profile
    • Email
Entity Shading Limitation/Bug?
« on: January 26, 2017, 09:46:45 PM »

Ok, I'm not sure if this constitutes a "bug", and I'm fairly sure it is more like a limitation...

I was working on a sprite, for an artificial ring like station. Everything seemed to work fine, as the picture below shows.



Until I let the game fast forward and realized that the shadow casted over the sprite, had limits. I figured it might be because the sprite itself was quite large, but even after reducing it to a quarter of its size, I saw no differences. I guess this is entirely based on the sprite size defined in the custom_entities.json, since sprites set to smaller sizes do not seem to suffer from this,  which would mean there's an actual size limit for entities (if you want shading).



I know I could disable the effect for this entity (so it would look like the image below), or make the ring thinner and closer to the planet (reducing the sprite size define in the json file), but I would prefer not to, specially because I wanted to make an even larger megastructure, just for fun.



Anyway, I mostly want to sate my curiosity in relation to the game's rendering engine in this respect. Can this be fixed?, if not, what is the limit?. I hope I'm just missing a tag somewhere that could solve this for me, or there might be a file I can change, and so distribute it with my mod (I assume the effect is made by a square gradient of limited size, that's applied over an entity).
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 19112
    • View Profile
Re: Entity Shading Limitation/Bug?
« Reply #1 on: January 26, 2017, 10:15:43 PM »

Is your sprite square? If not, that's probably what's causing the issue.
Logged

Machine

  • Commander
  • ***
  • Posts: 114
    • View Profile
    • Email
Re: Entity Shading Limitation/Bug?
« Reply #2 on: January 28, 2017, 07:45:13 PM »

Well thanks, that fixed it, totally not what I was expecting. It also seemed to fix a weird jumping (the ring would move a couple pixels up or down instead of remaining centered over the planet). I noticed that as they orbited the sun (both the planet and ring have the sun as parent, and the same orbit parameters), but it was something very minor, only noticeable when setting the their orbiting speed to be ridiculously fast.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 19112
    • View Profile
Re: Entity Shading Limitation/Bug?
« Reply #3 on: January 28, 2017, 10:14:48 PM »

Ah - probably better to set the ring to orbit the planet at 0 radius, since then the coordinates should match exactly, where if they both orbit the star, even with the same parameters, there could be some minor mismatches over time.
Logged