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

Easier material customization with overlay lane markers #145

Open
TheDuckCow opened this issue Dec 3, 2023 · 1 comment
Open

Easier material customization with overlay lane markers #145

TheDuckCow opened this issue Dec 3, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@TheDuckCow
Copy link
Owner

Right now, the material that comes with the Road Generator default texture that is made to work with the exact layout necessary for the road generator. However, because it is a full color image, it means anyone wanting to bring in their own texture (e.g. asphalt) would need to completely design their own custom shader, or pre-create their own custom material. Both are possible, that's why the affinity template is provided, but it could be more convenient.

The proposal here is to default a default setup which would establish road markings with a transparent background, so that it is more of a straight overlay to be applied on top of an existing material. This would let someone use a two-way tiling asphalt (or brick, or dirt) texture that goes in any direction using global coordinates, while still using lane markings with UV layout. We could also provide an additional UV layer which is a simpler left-to-right seamless mapping, regardless of the number of lanes (though, there will be pinching if there are lane changes, or stretching if the texture provided doesn't match the number of lanes it was made for).

Open to other suggestions, but the above two would already open up the door for easier material customization.

@TheDuckCow TheDuckCow added the enhancement New feature or request label Dec 3, 2023
@TheDuckCow
Copy link
Owner Author

TheDuckCow commented Mar 2, 2024

In my more recent project here, I realized that we could use decals for this purpose (potentially). That's how I was able to easily get the finish line onto the road for the race start/end. We could potentially create some rules for adding road decals from a preset folder or built in presets for all things like arrows lines on the road. The main thing would be how to ensure such textures don't bleed onto other objects (Im sure there's some settings on how decals work, would just need to review it).

Also worth calling out: decals are Godot 4 only, it seems.

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

No branches or pull requests

1 participant