GithubHelp home page GithubHelp logo

Comments (5)

j-meiring avatar j-meiring commented on June 2, 2024

Hi all, please could someone look at this urgently? This is quite a pertinent issue for us so if there is something that can be done we would really appreciate any guidance as to how we can resolve this.

For more detail, we are using a fully managed Rojo project, using a PullAssets script to utilise Remodel's API to extract our .rbxm files into Roblox models.
We are using the following functions:
readDir()
isDir()
readModelFile()
readPlaceFile()
writePlaceFile()

And here you can see that when we open the .rbxlx file created by Rojo and remodelled, the position is off, compared to when we import the file into the place manually.
Built using rojo build -o Place.rbxlx && remodel run ./scripts/PullAssets.lua
Screenshot 2022-12-02 at 10 28 07
When the model (.rbxm file) is imported using "Import from file"
Screenshot 2022-12-02 at 10 28 51

We are automating our builds, so that when we do releases any team member can just pull the .rbxlx file out of the location and save it to Roblox without needing any knowledge of the technical scope, but this means that if we do come across this issue we could end up with releases being broken if they are unaware of models like this.

from remodel.

Boegie19 avatar Boegie19 commented on June 2, 2024

@j-meiring @JeromeFLS
This is the first time I hear of an issue like this.

I think that somehow the model loses its location data or is changed somehow.

Does this always happen to the same assets? so yes could you send me the asset it happens to?

This could happen at multiple places
1 the PullAssets script somehow makes it lose its data
2 an edge cease in remodel or rbx-dom

Work around would be to
Make a building place that has all buildings like you would want them in the live game at the right positions
Import the whole workspace and use the build script to switch your workspaces around

from remodel.

eAi avatar eAi commented on June 2, 2024

This isn’t very helpful, I’ve also not come across this. We have a somewhat similar workflow that relies on the position being saved correctly. I have occasionally seen floating point positions change very slightly when round-tripped through Rojo/Roblox Studio/Remodel.

Have you tried outputting as rbxmx files instead? That may fix the issue - or may at least help you diagnose it as it’s a human-readable format.

I’d suggest creating and sharing a minimal test case. That may identify the issue or help others solve it.

from remodel.

j-meiring avatar j-meiring commented on June 2, 2024

@Boegie19 I've asked @JeromeFLS to provide you more detail - he constructed the model so can hopefully provide you with more detail around the actual assets.
@eAi, I tried the export, but it interestingly saves the incorrect positional data to the .rbxmx file - see below (I named the assets with the file extensions so you can see which is which):
Screenshot 2022-12-05 at 09 49 56
Screenshot 2022-12-05 at 09 50 03

Plot.rbxm was inserted from file, and shows the coordinates as they should be. The .rbxlx file using our remodel script, and saved the asset as .rbxmx. I inspected the xml in that file, and found that the WorldPivotData was somehow set here:

<OptionalCoordinateFrame name="WorldPivotData">
	<CFrame>
		<X>0</X>
		<Y>6.22428417</Y>
		<Z>0.736301422</Z>
		<R00>1</R00>
		<R01>0</R01>
		<R02>0</R02>
		<R10>0</R10>
		<R11>1</R11>
		<R12>0</R12>
		<R20>0</R20>
		<R21>0</R21>
		<R22>1</R22>
	</CFrame>
</OptionalCoordinateFrame>

Even when I changed all of the coordinates to 0, PullAssets still imported them with these values, until I inserted the file manually. For context, our script doesn't manipulate any properties at all, we essentially have directories which we convert to roblox directories and give the assets the relevant ones as parents, for example:

for _, modelFile in pairs(models) do
	if remodel.isDir("assets/" .. location .. "/" .. modelFile) == true then
		addRobloxDirectory(game, location, modelFile)
	else
		local assetModel = remodel.readModelFile("assets/" .. location .. "/" .. modelFile)[1]
		assetModel.Parent = getLocation(game, location)
	end
end

It looks to me, based on saving it from Roblox, that the world pivot data is being saved out of nowhere - I saved the asset where the coordinates were all 0 and a readable in the xml as having changed. Importing it from file still works as expected, but when the models are generated via the script, the properties pull through incorrectly.

from remodel.

Jerome-SeaMonster avatar Jerome-SeaMonster commented on June 2, 2024

I think I've managed to find a work around to my issue. After adding new mesh objects to it, and removing model objects that were only being used as parent objects, And then placing the new meshes into folders instead, I'm no longer getting random position values after the remodel. I've also added a floor mesh that is now the primary part of this plot object and everything is working as expected.

image

from remodel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.