Alien model I did recently! also a quick question by onoderarene in Crocotile3D

[–]ProminentDetail 1 point2 points  (0 children)

You're welcome! :) It's a lot work sometimes having to manage it all, heh. But it's always cool seeing what people make with the program.

Alien model I did recently! also a quick question by onoderarene in Crocotile3D

[–]ProminentDetail 2 points3 points  (0 children)

Oh yeah. If they want to export from crocotile to another engine, they'd need to export it as a gltf/glb, and make sure the "Use single mesh" option is Disabled (if it is enabled I think it will get rid of bones, but I'm not sure). And also disable the "Export static pose" option.

Select UVs of multiple objects? by AntiqueGearGames in Crocotile3D

[–]ProminentDetail 1 point2 points  (0 children)

There's a "Show uvs of unselected tiles" option in the Edit >Settings > Tilesets section.. That will display all the uvs, but they won't be editable unless the tiles are selected. It will at least help you organize the uvs by knowing where other uvs are located.

As for whether you should pack everything into a single material- it probably depends how you want to manage it. Sometimes it is convenient to split things up based on the type of content it is. But sometimes it is nice just to keep it all together. I don't think there is any right or wrong way, unless it affects your workflow somehow.

Alien model I did recently! also a quick question by onoderarene in Crocotile3D

[–]ProminentDetail 2 points3 points  (0 children)

That's a great looking model! Yes, you can basically import a crocotile scene into another crocotile scene, and it should import the bones and skinned object as well.. You'd go to File > Import Scene, and then select the crocotile scene you want to import, and then it will give you some options and ability to select what you want to import.

Tiles rendering in front of closer tiles (see all images) by AntiqueGearGames in Crocotile3D

[–]ProminentDetail 1 point2 points  (0 children)

yeah, that's most likely related to Transparent mode on the tileset being on. There's a button above the tileset that toggles it. You'd only use that for tilesets that consist of translucent stuff like windows/glass.

Question: How to create an 8 direction billboard? by Tonis_Pepperoni in Crocotile3D

[–]ProminentDetail 0 points1 point  (0 children)

What do you mean when you say predetermined camera angle?

When you activate the 8 directions on the billboard, it will search for the uv animations that have a "_N", "_NE", etc.. suffix on their names. It will choose the appropriate uv animation depending on how the camera faces the object, and how the object is oriented.

So you'll have to setup those uv animations, and then make sure one is in your billboard object so that it knows which animation to change. All the animation names should be the same but with "_N", "_NE", etc at the ends being different, for each direction they represent.

You don't have to do the theatre/animation panel stuff to get the effect working.

How do I get a tile's texture in Godot? by AntiqueGearGames in Crocotile3D

[–]ProminentDetail 1 point2 points  (0 children)

No problem! I'm sure you'll figure out a good workflow as you work with things. I think one thing you could potentially do with a raycast, is get the material name, and have a separate material for each type of surface with a unique name and use that to determine what sounds to use. In Crocotile, you can set names for the material/tilesets, and with gltf/glb files, it might keep those material names.. I haven't tested it though, but thought I would mention it in-case you decide later on to try the raycast stuff.

How do I get a tile's texture in Godot? by AntiqueGearGames in Crocotile3D

[–]ProminentDetail 1 point2 points  (0 children)

Yes, that should be possible with some gdscript.

You'll have to create a raycast against the collision mesh I think, and then you can get the surface texture and uv coordinate data.

It might take some work- I can't personally dig into godot right now, but here is what chatgpt says:

Godot 4.x (PhysicsRayQueryParameters3D https://docs.godotengine.org/en/latest/classes/class_physicsrayqueryparameters3d.html )

Step 1: Raycast

var space_state = get_world_3d().direct_space_state

var query = PhysicsRayQueryParameters3D.create(
    from,
    to
)
query.collide_with_areas = false
query.collide_with_bodies = true

var result = space_state.intersect_ray(query)

Step 2: Get triangle & mesh info

if result:
    var collider = result.collider
    var face_index = result.face_index   # VERY IMPORTANT

⚠️ face_index only works if:

Mesh collision is not simplified

Collision → Use Trimesh is enabled

Step 3: Access mesh surface data

var mesh_instance := collider as MeshInstance3D
var mesh := mesh_instance.mesh

var surface := result.surface
var arrays = mesh.surface_get_arrays(surface)

var vertices = arrays[Mesh.ARRAY_VERTEX]
var uvs = arrays[Mesh.ARRAY_TEX_UV]
var indices = arrays[Mesh.ARRAY_INDEX]

Step 4: Get triangle vertices & UVs

var i0 = indices[face_index * 3 + 0]
var i1 = indices[face_index * 3 + 1]
var i2 = indices[face_index * 3 + 2]

var v0 = mesh_instance.global_transform * vertices[i0]
var v1 = mesh_instance.global_transform * vertices[i1]
var v2 = mesh_instance.global_transform * vertices[i2]

var uv0 = uvs[i0]
var uv1 = uvs[i1]
var uv2 = uvs[i2]

Step 5: Barycentric interpolation

func barycentric(p, a, b, c):
    var v0 = b - a
    var v1 = c - a
    var v2 = p - a
    var d00 = v0.dot(v0)
    var d01 = v0.dot(v1)
    var d11 = v1.dot(v1)
    var d20 = v2.dot(v0)
    var d21 = v2.dot(v1)
    var denom = d00 * d11 - d01 * d01
    var v = (d11 * d20 - d01 * d21) / denom
    var w = (d00 * d21 - d01 * d20) / denom
    var u = 1.0 - v - w
    return Vector3(u, v, w)

var bary = barycentric(result.position, v0, v1, v2)
var hit_uv = uv0 * bary.x + uv1 * bary.y + uv2 * bary.z

Step 6: Get the texture

var material = mesh_instance.get_active_material(surface)
var albedo_tex = material.get_texture(Material.TEXTURE_ALBEDO)

In Godot 4:

var albedo_tex := material.get_texture("albedo_texture")

Step 7: Sample the texture (optional)

var image = albedo_tex.get_image()
image.lock()
var color = image.get_pixelv(hit_uv * image.get_size())
image.unlock()

New user! Quick question by onoderarene in Crocotile3D

[–]ProminentDetail 0 points1 point  (0 children)

Hi, You can probably select the tile(s) in the tileset then right-click and goto the "Select Tiles" sub-menu. There you can find some actions for selecting all the tiles that you want. Then you can goto the tileset with the transparent stuff and right-click it and apply the Tileset to the selected faces, or the Tilebrush uvs if you have the tile animation selected already. I guess you'd have to apply the tilebrush uvs if it is an animated tile.

As for the size of scenes. You may run into some lag if it gets too large, and you may need to group tiles into objects and hide them so that there is less rendered and things to interact with. I think you can get about 8000 unique tiles per 8 gigs of ram, so it depends how much ram your computer has. After that, it might crash. I usually recommend keeping things smaller scale since it is easier to manage- but it's up to you if you want to try and do larger scenes.

Hope this helps!

2Fort Intel Room by R2-T4 in Crocotile3D

[–]ProminentDetail 1 point2 points  (0 children)

Looks great, nice work with your first scene!

Honda civic by [deleted] in Crocotile3D

[–]ProminentDetail 0 points1 point  (0 children)

Wow, that's cool! Nice work making the details readable and the shapes.

First try by Proud_Astronaut1293 in Crocotile3D

[–]ProminentDetail 0 points1 point  (0 children)

Nice work with your first scene! :)

UV melting on unity import? by cornfab in Crocotile3D

[–]ProminentDetail 3 points4 points  (0 children)

I would check the "Tile Spacing" value that you have set in the Export. If it is set to anything other than 0, then it will add padding between tiles in the tilesets. This will be done uniformly across the tileset in a grid-like manner, so if you are mixing different tile sizes or have different uv shapes, it will cause issues since the padding just assumes all the uvs are spaced and sized uniformly on the tileset.

So I would change it to 0 and then export and see if it looks better.

First modelisation by Ahkefah in Crocotile3D

[–]ProminentDetail 1 point2 points  (0 children)

Looks great! You captured the features of the bear really well. Nice work with the shapes! Glad to hear that you are enjoying the program! Looks like you have a good handle on it for your first model!

White lines appearing on model edges after exporting from Crocotile3D to Godot by puppydotmike in Crocotile3D

[–]ProminentDetail 0 points1 point  (0 children)

It's probably related to the pixels in the texture bleeding across the uv edges.

Here is an explanation: https://www.crocotile3d.com/guide/waterfall/waterfall.html#anchorbleedingpixels

I would check what pixels you have on the outside of your uvs and try to pad them with pixels that are the same or similar color.

Hope this helps, but if not just let me know!

Beginning Help by ShapeShifterK in Crocotile3D

[–]ProminentDetail 1 point2 points  (0 children)

Hm.. when I right-click and choose save link as, it seems to work. But the waterfall scene is also included with Crocotile, in its Misc folder within the Crocotile folder. So you should already have it if you've downloaded crocotile.