[x3d-public] [x3dom-users] Scale and relative size
Andreas Plesch
andreasplesch at gmail.com
Mon Jan 13 08:16:12 PST 2020
Did you click on the upper right chain symbol to load the url by
copying and pasting ?
On Mon, Jan 13, 2020 at 10:55 AM Jesse Campbell <emsjessec at gmail.com> wrote:
>
> All I see is a blur: https://imgur.com/a/H6uWpKQ
>
> On Fri, Jan 10, 2020 at 3:28 PM Andreas Plesch <andreasplesch at gmail.com> wrote:
>>
>> Did you click on the upper right chain symbol to load the url ?
>>
>> It does not need to be converted since x3dom natively supports glTF
>> models as inline content with the inline node. The web page just sets
>> the url attribute of the Inline element to the gltf url.
>>
>>
>> On Fri, Jan 10, 2020 at 3:22 PM Jesse Campbell <emsjessec at gmail.com> wrote:
>> >
>> > That soda can demo is impressive. Can the it be converted to X3D?
>> >
>> > I'm getting a weird view on the inline-gltf.html link: https://imgur.com/a/H6uWpKQ
>> >
>> >
>> >
>> > On Fri, Jan 10, 2020 at 3:11 PM Andreas Plesch <andreasplesch at gmail.com> wrote:
>> >>
>> >> Exploring further practical gltf use, it turns out all of the models
>> >> at sketchfab can be autoconverted to gltf before downloading.
>> >>
>> >> https://sketchfab.com/3d-models/soda-can-high-poly-08be81ca5fa74718b5d95ac6a5a928f2
>> >>
>> >> is another CC licensed soda can. Downloaded as gltf and converted to
>> >> glb I put it here:
>> >>
>> >> https://raw.githubusercontent.com/andreasplesch/glTF-Sample-Models/extra/2.0/extra/sodaHigh/glb/scene.glb
>> >>
>> >> It also works well with the x3dom inline viewer at
>> >> https://x3dom.netlify.com/examples/functional/inline-gltf.html
>> >>
>> >> The height dimension is about 320 units.
>> >>
>> >> On Fri, Jan 10, 2020 at 11:52 AM Andreas Plesch <andreasplesch at gmail.com> wrote:
>> >> >
>> >> > Another idea is to use the new gltf support in x3dom. I tried to find a nice gltf soda can but could only find other formats. Since blender is often the original format, I got
>> >> >
>> >> > https://free3d.com/3d-model/high-poly-soda-can-186004.html
>> >> >
>> >> > as blend. Since collada is similar to gltf, I then converted to collada here:
>> >> >
>> >> > https://www.ofoct.com/3d-model-file-for-3d-printer-converter/3d-model-file-converter.html
>> >> >
>> >> > which uses assimp. There are many other similar services.
>> >> >
>> >> > Then I could use https://blackthread.io/gltf-converter/ to convert to gltf. It uses Three.js internally.
>> >> >
>> >> > At first without textures but it turned out to be easy to include a diffuse texture by renaming one of the included texture files to the name the collada file references.
>> >> >
>> >> > This then resulted in a binary gltf (.glb) with an embedded texture which I provide here:
>> >> >
>> >> > https://raw.githubusercontent.com/andreasplesch/glTF-Sample-Models/extra/2.0/extra/soda/glb/Soda_Can.glb
>> >> >
>> >> > Here is the x3dom test gltf viewer:
>> >> >
>> >> > https://x3dom.netlify.com/examples/functional/inline-gltf.html
>> >> >
>> >> > Click on the chain symbol at the upper right and copy and paste the URL above for soda can. It should then display, using an x3d Inline node with that url.
>> >> >
>> >> > It should work as it did for me. The size of the can is whatever the original source file had used. Measuring the height using the debug log view, I get about 9 units.
>> >> >
>> >> > There are many ways to convert to gltf, this was just one cobbled together quickly using free resources, to test feasibility.
>> >> > ---on the phone---
>> >> >
>> >> >
>> >> >
>> >> > On Thu, Jan 9, 2020 at 11:19 AM Jesse Campbell <emsjessec at gmail.com> wrote:
>> >> > >
>> >> > > Thanks, I decided to use: https://grabcad.com/library/330ml-and-500ml-beverage-cans-1
>> >> > >
>> >> > > I have another question. Is it possible to place text onto the screen of the X3D file so it doesn't move? Sort of like the heads-up display (HUD) on games where it shows the score.
>> >> > >
>> >> > > On Thu, Jan 9, 2020 at 10:04 AM Andreas Plesch <andreasplesch at gmail.com> wrote:
>> >> > >>
>> >> > >> https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter17Textures/Figure17_05dTexturedSodaCanX3dom.xhtml
>> >> > >> has a nice soda can.
>> >> > >>
>> >> > >> The default unit is meter and it looks like the soda can uses meter.
>> >> > >> It does not mean that scene authors adhere to that in general. There
>> >> > >> is a UNIT statement in X3D but it is rarely used and x3dom does not
>> >> > >> support it. Otherwise X3D is unit agnostic, eg, the length unit in
>> >> > >> your scene is whatever you designate and will be the same for all
>> >> > >> coordinates. Meter or millimeter is a common choice.
>> >> > >>
>> >> > >> Cheers, -Andreas
>> >> > >>
>> >> > >> On Thu, Jan 9, 2020 at 8:57 AM Jesse Campbell <emsjessec at gmail.com> wrote:
>> >> > >> >
>> >> > >> > I'd like to be able to show the relative size of the object. A soda shown next to the object should be good for that purpose.
>> >> > >> >
>> >> > >> > Does anyone have an .X3D file of a soda can that's the right dimensions? I see some in .STL format on Thingiverse which can be converted using FreeCAD. It would be nice to texture the 3d model.
>> >> > >> >
>> >> > >> > Do the parts in X3D files have a scale? Inches, millimeters, etc. ?
>> >> > >> >
>> >> > >> > --
>> >> > >> > Jesse Campbell
>> >> > >> >
>> >> > >> > _______________________________________________
>> >> > >> > X3dom-users mailing list
>> >> > >> > X3dom-users at lists.sourceforge.net
>> >> > >> > https://lists.sourceforge.net/lists/listinfo/x3dom-users
>> >> > >>
>> >> > >>
>> >> > >>
>> >> > >> --
>> >> > >> Andreas Plesch
>> >> > >> Waltham, MA 02453
>> >> > >
>> >> > >
>> >> > >
>> >> > > --
>> >> > > Jesse Campbell
>> >> > > Web Developer
>> >> > > eMachineShop & Pad2Pad
>> >> > >
>> >> >
>> >> >
>> >> > --
>> >> > Andreas Plesch
>> >> > Waltham, MA 02453
>> >>
>> >>
>> >>
>> >> --
>> >> Andreas Plesch
>> >> Waltham, MA 02453
>> >
>> >
>> >
>> > --
>> > Jesse Campbell
>> > Web Developer
>> > eMachineShop & Pad2Pad
>> >
>>
>>
>> --
>> Andreas Plesch
>> Waltham, MA 02453
>
>
>
> --
> Jesse Campbell
> Web Developer
> eMachineShop & Pad2Pad
>
--
Andreas Plesch
Waltham, MA 02453
More information about the x3d-public
mailing list