-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
CommonMCOBJ Feedback #243
Comments
Yea, I like it, think it makes sense to be able to pass some kind of standard metadata around. My only comment would be that the selection centre would be redundant if you already have the bounds. |
Makes sense. Regarding selections, is getting in-game coordinates possible for the the bounds of a selection, or would that be more complicated on the exporter side of things? |
Yes - I had assumed that the bounds were in world space and that should be easy to do given that the selection is already made and used with world coordinates. |
Just thinking a little more, is there a reason why the selection is only for the XY and not Z and then on top of that, why would it be supplied in Z up coordinate mode when minecraft is Y up by default. |
To clarify, Having a Z coordinate for selections might be a bit weird as selections tend to be interpreted as 2D, but I think including it would be fine, perhaps with a seprate height range variable that could be something like |
Z up is fine as it is. My point was that the spec says As for including the vertical coordinate in the data, It's just a much more complete description of what is actually included in the obj. If this is supposed to describe what part of a minecraft world has been exported into the obj file then it's pretty important to include that I would have thought. |
Thanks for clarifying, a bounding box would certainly be a more flexible option. If I'm understanding correctly, instead of using selection vertices, there would be min-max ranges for the X, Y, and Z components, similar to the following? (just as an example): # x_range: (min x, max x)
# y_range: (min y, max y)
# z_range: (min z, max z) |
Yea, that could certainly work too.
Where the XYZ is (inclusive) the minecraft coordinates of the exported blocks |
I've done a basic implementation here if you wanna try it: |
Sounds good to me, thanks for the feedback. I'll open a PR once we've finalized version one of CommonMCOBJ |
Just wanted to say thanks @mmdanggg2 for being quick to respond and support the idea, very excited for moving this forward! |
Thanks for the clarification, I'll update the spec accordingly |
Alright, I've updated the selections section to be more in line with your proposal: https://github.com/CommonMCOBJ/CommonMCOBJ#selections |
I've opened #245 to add CommonMCOBJ version 1 support. Although version 1 isn't technically finalized, it's more or less in a complete state. |
Yea - nice. |
A scale parameter is a good idea, I'll add it. As for centered, I think we could define it as the center of the bounding box itself (which would presumably be the center of the OBJ), or perhaps we could just forego Split blocks would be equivalent to object per block, where each block type is split as its own separate object. |
I don't wanna sound too pushy with my suggestions but to me an offset xyz would still provide the information that is_centered would give at the same time as removing any ambiguity with what exactly that means and then additionally provides information about any other kind of translation that could have been applied. It would mean that jmc's weird centered mode is handled but also any arbitrary offset that could be made, something else that jmc allows. Ok, the current split block description sounds much more like jmc's split materials option so that should be clarified. |
Regarding is_centered, I also agree that bounding box min/max conveys the same information and is a bit more obvious to understand. I'd just leave it out. Something separate that would be interesting to know is a block offset. From the MCprep standpoint, this is one of those things that we hard code : if jmc2obj do an extra vec3(0.5m) offset, but don't do for Mineways (or vice versa, don't remember offhand).
And this would just be hard coded in jmc2obj as (0,0,0) or (0.5, 0.5, 0.5) and would be the opposite in Mineways (again, I don't remember which one is using which). Or maybe we define it as an absolute position of the lowest value vertex, in which case it'd be either (0,0,0) meaning the cube position ranges from xyz 0->1, or (-0.5, -0.5, -0.5) meaning the cube is centered on the orgin itself. |
Yea, that's a good point about if the coordinate is at the centre of the block or in the lower corner. Something like you say perhaps I think my point about a general offset value is important to include. Without it it would be impossible to accurately piece together multiple separate exports into the same coordinate space. |
Yeah I'm fine with that definition. Right, I also agree about having an absolute offset shift as indeed, where this common header will shine the most is in letting users re-export the same section or adjacent sections with ease. |
|
Working on defining offsets, but I'm a bit lost, can you give a visual representation of how that might look? |
Ok I think I get it now, is it just how much the center is offset in world space (3D software side) from the center of the bounding box? |
@mmdanggg2 @TheDuckCow is this a good definition for offsets?:
|
So in order words, offsetting the coordinate of |
It's not specifically of the max, its of all coordinates, the whole model has been translated by the offset vector. |
Alright |
After a bit of writing, we've got this definition of offsets:
|
I think we're ready to finalize V1, any changes that need to be made? (CommonMCOBJ can also be updated as time passes) |
Nearly there. last couple of bits. We probably should have, as @TheDuckCow suggested, a
I think scale should be float, why be restricted to whole values. The description for split blocks still reads to me as though you mean that there is only one object per block type, not per individual block. |
Block offsets have been added now, and scale has been change to float. To clarify on split blocks, it is split on a block type basis, not individual blocks |
Ok so that is then closest to jmc's object per material option, not object per block. |
Assuming there's nothing else to add or change, CommonMCOBJ V1 is finalized now! 🎉 Thanks for all of the feedback @mmdanggg2 |
Hey there, Mahid from the MCprep team here. I want to propose and discuss a draft specification that we at the MCprep team have been working on for the past week or so: CommonMCOBJ
CommonMCOBJ aims to establish a common standard for extra metadata in OBJ exports, such as texture export information, information about the selection that the OBJ is derived from, etc. In addition, we also want to create a unified way to export biome information, to improve animator workflows in the 3D software side of things.
Even though it's a draft, we want to gather feedback for CommonMCOBJ from OBJ developers to make sure the spec works for OBJ exporters (after all, it's so far made from the perspective of us MCprep developers), and improve it before finalizing V1 and requesting support.
Hope to hear back!
The text was updated successfully, but these errors were encountered: