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

Improve Truck Town model, fix issues, use OMI glTF Physics #1110

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

aaronfranke
Copy link
Member

This PR improves the Truck Town demo, fixing many issues, and making use of the updated OMI glTF physics in Godot 4.3. Now, instead of the physics information being defined in the .import file, instead the physics is defined inside of the .gltf file itself. This means that theoretically anyone can grab the Truck Town model and use it in another project or even another game engine without setting up all the physics again.

For the sake of allowing users to learn about the glTF extensions, I kept the model as a .gltf text file instead of a .glb binary file, so that anyone can open it in a text editor.

The model is now centered on the map, such that the outer ground mesh has a rectangle cut out of its center. I moved the CSG racetrack into a separate scene to preserve the source geometry in case someone wants to edit it, but I put it in the .glb file so that I could fix some issues with the textures (see below).

This PR also fixes several problems with the meshes and materials. I fixed a lot of cases of weird texture stretching. I fixed some of the doors not being yellow (as it seems was intended). I removed the (2, 2, 2) scale on the UV map, instead baking the UV map scale into the UV map itself. Here are some comparison screenshots, where the left side is the old demo and the right side is this PR.

Screenshot 2024-08-27 at 1 51 39 PM

Screenshot 2024-08-27 at 1 52 32 PM

Screenshot 2024-08-27 at 1 52 07 PM

Screenshot 2024-08-27 at 2 05 15 PM

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally on 4.3.stable, it mostly works as expected.

The only issue I found is that the collision outside the stage is too low, so the wheels sink inside the grass:

image

This doesn't occur in the city or road.

@aaronfranke aaronfranke force-pushed the truck-town-gltf-physics branch from 25bcd50 to a63f2c5 Compare November 25, 2024 10:27
@aaronfranke
Copy link
Member Author

aaronfranke commented Nov 25, 2024

@Calinou I can't reproduce that in 4.3 stable. The collider is located at Y=-5 and has a Y size of 10, so it should go up to the origin height, and the ground texture is slightly below the origin height.

Unrelated: I pushed a change that fixes the triangles on the undersides of each roof, and recolors all chimneys to be a dull red-brown-brick color (previously the buildings had a mix of beige and brown chimneys).

@aaronfranke aaronfranke merged commit 5d95421 into godotengine:master Nov 25, 2024
1 check passed
@aaronfranke aaronfranke deleted the truck-town-gltf-physics branch November 25, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants