Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polygon_from_sprite_precice.gml #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jgric2
Copy link

@jgric2 jgric2 commented Jul 28, 2021

I had an idea after using another lighting system to create an automatic mesh maker based on the sprite itself, it takes the sprites origin point and then casts rays from the origin point to the border and uses transparent values as the edges of the sprite, it will then take those points and generate mesh for shadows in the engine from that.

the script has 3 modes:
Greedy: this mode will cast rays from the center but will terminate the ray at the first instance of a transparent pixel. The user can choose how many points the poly has from 4 to 360.
Normal: this mode will cast rays from the center until said ray reaches the border of the sprite, when it does it uses the last known transparent pixel fro that ray. The user can choose how many points the poly has from 4 to 360.

Auto: this mode was a test, it casts rays from the outside in, it produces a fixed number of points for the polygon being width+height+width+height

I will make an update in the coming days to make compatible with dynamic meshes.
Enjoy!

I had an idea after using another lighting system to create an automatic mesh maker based on the sprite itself, it takes the sprites origin point and then casts rays from the origin point to the border and uses transparent values as the edges of the sprite, it will then take those points and generate mesh for shadows in the engine from that.

the script has 3 modes:
Greedy: this mode will cast rays from the center but will terminate the ray at the first instance of a transparent pixel. The user can choose how many points the poly has from 4 to 360.
Normal: this mode will cast rays from the center until said ray reaches the border of the sprite, when it does it uses the last known transparent pixel fro that ray. The user can choose how many points the poly has from 4 to 360.

Auto: this mode was a test, it casts rays from the outside in, it produces a fixed number of points for the polygon being width+height+width+height

I will make an update in the coming days to make compatible with dynamic meshes.
Enjoy!
@jgric2
Copy link
Author

jgric2 commented Nov 7, 2021

hello??

@jgric2
Copy link
Author

jgric2 commented Oct 5, 2023

Sigh....

@hiban1
Copy link

hiban1 commented Aug 6, 2024

hi, Im using the stuff but I have som performance issues, 'm modifying the global_lightning function but its taking too much power.

@jgric2
Copy link
Author

jgric2 commented Aug 7, 2024

hi, Im using the stuff but I have som performance issues, 'm modifying the global_lightning function but its taking too much power.

I am not the developer, just someone who developed a cool addition to this engine. Posted here in 2021 but looks like the author no longer cares to check the GitHub page :(

@DevTRUCKer
Copy link

Wait What! wow this PR from 2021 to 2023 and now it's 2024 and the dev is not here yet???

@jgric2
Copy link
Author

jgric2 commented Aug 14, 2024

Wait What! wow this PR from 2021 to 2023 and now it's 2024 and the dev is not here yet???

Believe me I know... I am beyond annoyed as I spent a few days making this addition and the dev (who is active on GitHub) can't be bothered to take a 2 minute look.

I made this extension so it would automatically created light maps and shadows based on the sprites transparent pixels and it does it REALLY fast too...

A shame the Dev can't be bothered to take a look...

@DevTRUCKer
Copy link

Yeah I know and I really like the PR I hope one day they come back, however don't worry and be strong like you are already,
We all here and we all will wait... 🗿🗿🗿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants