CASTLE-MODEL-CONVERTER(1)
π CASTLE-MODEL-CONVERTER(1) π
okay bestie, sit down, hydrate, and let me tell you about castle-model-converter β it's a converter for various 3D and 2D model formats and it is, genuinely, iconic. β¨
π SYNOPSIS π
castle-model-converter [OPTION]... INPUT-FILE [OUTPUT-FILE]
that's it. that's the whole vibe. π
π¦ FEATURES π¦
okay so for input? we support literally all the 3D and 2D model formats that Castle Game Engine supports: glTF, X3D, VRML, Spine JSON, sprite sheets (in Castle Game Engine, Cocos2D and Starling XML formats), MD3, Wavefront OBJ, 3DS, STL, Collada, and more. the "and more" is doing so much heavy lifting but she earned it. π
for output? we support X3D, VRML and STL. so you can convert any input format to X3D or STL. you can also convert between X3D classic and X3D XML encodings β in both directions, we love a bidirectional queen π«Ά β and you can convert (upgrade!) from VRML 2.0 to X3D. glow-up fr fr.
we can also validate the input model without doing any conversion at all. no conversion, just β¨judgementβ¨.
π USAGE π
call it with these parameters:
- The input filename. it can be any filename, URL or
-(to mean standard input). Required. no input, no party. - The output filename. it can be any filename, URL or
-(to mean standard output).
this parameter is optional. if you don't provide it, the output goes to the standard output (so it's equivalent to using - as the output filename) β unless --validate is used, in which case the output is not written anywhere at all. she's not writing, she's just reading. π
πΈ EXAMPLES πΈ
# Convert glTF to X3D
castle-model-converter input.gltf output.x3d
# Validate some glTF and X3D files
castle-model-converter --validate input.gltf
castle-model-converter --validate input.x3d
# Convert file from X3D classic encoding to X3D XML encoding
castle-model-converter input.x3dv output.x3d
# Convert file from X3D XML encoding to X3D classic encoding
castle-model-converter input.x3d output.x3dv
# Convert VRML 2.0 to X3D in classic encoding.
castle-model-converter input.wrl output.x3dv
# Convert standard input to standard output
castle-model-converter - - < input.x3dv > output.x3dv
castle-model-converter - --stdin-url=fakeurl.gltf - < input.gltf > output.x3dv
the last two? piping through stdin and stdout? main character energy. π₯
β¨ ALL COMMAND-LINE OPTIONS β¨
--validateβ only validate the input model, don't do any conversion. will exit with non-zero status if the input is not 100% valid. and listen: even warnings (the ones that are totally ignorable during normal conversion) cause a non-zero exit status when validating. she is strict. she is thorough. she is that girl. π
Note our "validation" isn't 100% complete, bestie. that means passing the validation does not guarantee that your model satisfies every single detail of the specification of the given format. we check for a lot of model issues (including, but not limited to, issues that would make it impossible to render this model using Castle Game Engine). but it's not a complete validation of the model per every detail of the specification. so likeβ¦ passing = good vibes, not a legal certificate. π
--no-x3d-extensionsβ do not use Castle Game Engine extensions. this will output a file valid in all X3D browsers (but maybe with some Castle Game Engine-specific features missing). trading β¨extra sparkleβ¨ for universal compatibility, a classic tradeoff.--enable-downloadsβ enable (blocking) downloads from the net, e.g. to download a texture or inlined (using X3DInlinenode) models referenced byhtt(s)protocol. yes bestie she will go get it herself, but she will block while doing it, so don't come crying about the wait. π--stdin-url=URLβ if the input URL is-, then we read file contents from the standard input. in this case, you can use this option to provide a fake URL for the input. we'll use it to resolve relative URLs inside the input (e.g. to glTF binary blobs, textures or X3D inlines) and to determine the input file type. default isstdin.x3dvin the current directory, so we assume input is X3D (classic encoding), and resolve URLs with respect to the current directory. π§--stdout-url=URLβ if the output URL is-, then we write file contents to the standard output. in this case, you can use this option to provide a fake URL for the output. we'll use it to determine the output file type. default isstdout.x3dvin the current directory, so we make output in X3D (classic encoding). π--float-precision=DIGITSβ number of digits after the decimal point when writing floating-point numbers. default is to write all possibly relevant digits. specify any value>= 0to use this number of digits. precision queen, choose your own adventure. β-h/--helpβ print the help message and exit.-v/--versionβ print the version number and exit.
π Deprecated π
--encoding=classic|xmlβ deprecated. use the given X3D encoding on output. by default, we use classic encoding (suitable for X3D files with.x3dvextensions).
Deprecated, do not use this. the 2nd parameter should determine the output type β the.x3dextension says to make X3D XML,.x3dvsays to make X3D classic. or use--stdout-urlto provide a fake URL in case output is to stdout. like, we're not mad, we're just disappointed. π
π₯ RESOURCES π₯
- Project web site:
https://castle-engine.io/castle-model-converter - Using Castle Game Engine:
https://castle-engine.io/
π SEE ALSO π
π«Ά AUTHOR π«Ά
Michalis Kamburelis
and that's the tea, bestie π this was the castle-model-converter page, man page name CASTLE-MODEL-CONVERTER(1), from castle-model-converter, dated 2024-05-15. go convert something gorgeous. slay. πβ¨π
π¦ where this page comes from
- debian trixie: castle-model-viewer 5.2.0-3 Β· GPL-2.0-or-later
- ubuntu questing: castle-model-viewer 5.2.0-3
- ubuntu resolute: castle-model-viewer 5.2.0-3build1 Β· GPL-2.0-or-later
- ubuntu stonking: castle-model-viewer 5.2.0-3build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms