Mesh Parts are live!

You can throw the mesh/texture id into a specialmesh instead and scale that using the mesh’s Scale property if you want.

1 Like

I’ve tried with filemeshes, it doesnt work!

Then you’re doing it wrong

Wasnt doing anything wrong, turned out that i had my camera inside the mesh and couldnt see it… :joy: :joy:

I am not sure if that’ll work, but I would try to use model resize plugin.

SpecialMeshes have a Scale property which you can adjust to make the mesh bigger/smaller, so no need for a plugin like that.

2 Likes

There you go, meshes truly are amazing!

14 Likes

So I tried your script and this is what happens

The result is supposed to be like this

But it ends up looking like this

Is it because of the

export_scale = .01 # configure your fbx export scale in Blender here
import_scale = .01

If so how would I determine those scales?

TL:DR the script doesn’t move the object, and if it does it barley moves it at all.

2 Likes

The export scale is determined by this value during export:

Roblox sees 1 “blender unit” as 100 studs, which is the .01 fixed import scale.
This all assumes you do actually use the blender units (“None”).

Should note that I’ve figured the dimensions of the object used in the script are object-space, not world-space, so if you have applied either a rotation or scale object transformation (in object mode), you should apply those first before running the script. I’ll probably change the script itself later to compute a proper world-space AABB later on, but that could cause issues too with the positioning.

1 Like

If anyone else still cares enough to use my technique for properly aligning meshes ( :stuck_out_tongue: ), here’s an updated script to be used in Blender which computes the bounds properly.

import bpy
from mathutils import Vector

export_scale = .01 # configure your fbx export scale in Blender here
import_scale = .01 # do NOT edit this value, only the export_scale above!!!

outp_script = """
local sel = game.Selection:Get();
assert(#sel == 2);
local meshPart = sel[1];
local anchorPart = sel[2];
if (anchorPart:IsA("MeshPart")) then
    meshPart, anchorPart = anchorPart, meshPart;
end
meshPart.CFrame = anchorPart.CFrame * CFrame.new({:.20f}, {:.20f}, {:.20f});
"""

scale = export_scale / import_scale
for obj in bpy.data.objects:
    if obj.select and obj.type == 'MESH':
        dims = obj.dimensions
        mesh = obj.data
        vertices_world = [(obj.matrix_world * vert.co) for vert in mesh.vertices]
        
        # compute world space bounds of the selected object 
        minvec = Vector()
        maxvec = Vector()
        for axis in ['x', 'y', 'z']:
            setattr(minvec, axis, min([getattr(vec, axis) for vec in vertices_world]) * scale)
            setattr(maxvec, axis, max([getattr(vec, axis) for vec in vertices_world]) * scale)
        
        offsetvec = (minvec + maxvec) * .5
        
        # note: blender has the Z-axis pointing up
        bpy.context.window_manager.clipboard = outp_script.format(offsetvec.x, offsetvec.z, -offsetvec.y)
5 Likes

I think the reason that uploading meshes is free is because too many things can mess up: flipped normals, missing textures, bad smoothing, etc. It would cost the dev too much to re-upload (I think it took me over a dozen tries just to get the mesh I was uploading to appear correctly). As for audio, it’s pretty safe to say that what you’re uploading is what you’re getting in-game. Also, I think they’re planning on making the payments for audio uploads tiered.

It’s probably more along the lines of moderation time required. Each asset has to be reviewed twice by separate moderators to be approved. Even detailed meshes can be reviewed relatively quickly, while if someone uploads a 2 minute audio clip, moderators have to collectively spend four minutes reviewing that one clip.

In that regard, it wouldn’t initially seem like audio should cost anything if it’s only a second or two long, but if that were the case, users would split up their audio into chunks, and while moderators were still previewing the same total length of audio, users were uploading them all for free.

After clicking the import from file button at the Mesh ID field and then select my FBX file to import ; The studio only tells me the error " Could not read" ?

what am i doing wrong ): ?

3 Likes

which version FBX are you exporting, and from what program?

It would be nice if we could upload a group of meshes and studio would insert them with their relative positions… trying to upload my AK that I made with Roblox then cleaned up with Maya and I hate having to piece it back together.

I believe @Den_S made a script for that.

yeah I’m downloading blender now :unamused:

The best decision you’ve made in your entire life.

7 Likes

Flawless advertising

1 Like