by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Andreas Plesch
    @andreasplesch
    you are right; I sent a private message
    David Everitt
    @DaveEveritt
    I've just converted some VRML files to X3D to display with X3DOM. They aren't showing up correctly, so I'm looking for some troubleshooting. Instead of typing up all the links and details, I've put up a tagged question here https://stackoverflow.com/questions/59920017/where-are-the-issues-in-this-conversion-from-vrml-to-x3d
    Andreas Plesch
    @andreasplesch
    Hi Dave, the main issue is that the scenes use Protos which are not completely supported in x3dom. The good news is that the ProtoDeclarations here are effectively simple macros and probably work as x3dom inline in json format.
    https://gist.github.com/andreasplesch/4fb27cb9f3db9ee423066ae74d4aaae1 has the scene as vrml, x3d and json. The vrml was converted with view3dscene to x3d. view3dscene works better than the online instantreality converter. The x3d was then converted to json with http://xsltransform.net/ and the official stylesheet at https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3dToJson.xslt
    Andreas Plesch
    @andreasplesch
    Sorry, this is complicated but the json encoding is new and currently the only encoding which works with (simple) Protos in x3dom.
    Andreas Plesch
    @andreasplesch
    There is an issue with the l, r, n, i protos . The x3dom expander does not deal with nested protos, it appears. You could define those protos without nesting, easiest in VRML and reconvert.
    Andreas Plesch
    @andreasplesch
    For these macro type protos it is often possible to use DEF/USE instead which can be more concise. https://gist.githack.com/andreasplesch/1709621326ec13282ea0204ca65c6301/raw/4eea3a4fe4faae83e312c72a233521db99b1fbbe/t1defuse.html does that. No json is needed since there no protos in this x3d: https://gist.github.com/andreasplesch/1709621326ec13282ea0204ca65c6301#file-t1defuse-x3d
    Bravis
    @Bravis
    Hi to all! How can I make the model in x3dom more smooth: https://prnt.sc/r8ii3t. Should I look into a x3d file with a model or I should set/call some x3dom parameter/function?
    Andreas Plesch
    @andreasplesch
    Hi Bravis
    if you can link to the actual x3d or html file in addition to the screen shot it would help
    it looks like setting creaseAngle='3.14' for the geometry (probably IndexedFaceset) should help.
    Bravis
    @Bravis
    Hi Andreas. Thank you for your reply. I will prepare x3d/html file shortly...
    I already tried to set creaseAngle, but with no success. Probably I'm doing something wrong. Also I noticed that x3d does no have ElevationGrid node after x3d model loads
    Bravis
    @Bravis
    I created simple HTML file that loads a model here: http://3d.digitaction.com
    URL to x3d file: http://3d.digitaction.com/crankshaft_gaz-51.x3d
    Andreas Plesch
    @andreasplesch
    ok. This is a TriangleSet. For smooth appearance you can use the creaseAngle field: https://examples.x3dom.org/example/x3dom_creaseAngle.html
    But this field is only available IndexedFaceSet. So you would need to generate this kind of node from your geometry data.
    If you need to use TriangleSet you can explicity define normals at each vertex with a Normal node. For smooth appearance, the normals would need to be the average of the triangle normals around each vertex. Perhaps your backend can generate such normals.
    Andreas Plesch
    @andreasplesch
    You could use meshlab to convert to IndexedFaceSet.
    Bravis
    @Bravis
    Thank you! I will try it ASAP. If I'll have any problems this is the best place to discuss?
    Andreas Plesch
    @andreasplesch
    Any place is fine. Sharing files is easiest on github.
    Bravis
    @Bravis
    Thank you Andreas, I was able to solve my question.
    Hovewer, I have another question. I know there is "downloadsfinished" event that fires when x3d file was fully loaded. For some reason sometimes it does not called - probably due to some error. Is there some kind of "onloaderror" event that can be called if downloadsfinished was failed?
    Andreas Plesch
    @andreasplesch
    Good to hear. Out of curiosity, what did you end up doing to smooth ?
    For Inline there is an "onerror" handler which is called when the xhr is unsuccessful: https://github.com/x3dom/x3dom/blob/62c719935e0ff65934b0d768912e0dc23fade5fb/src/nodes/Networking/Inline.js#L316
    Not sure how useful that could be.
    Bravis
    @Bravis
    Hi Andreas. Sorry for the late reply. Smooth option was done on the library that I'm using to generate x3dom files, so I just changed few options and it look smooth now. Thank you for your help!
    arturo picca
    @pdrsvt_gitlab
    hey! nobody?
    leoul
    @leoull
    Hello guys. I just forked x3dom to upgrade webVR to webXR. I am new to this and I am trying to figure out the code, so far I found webVR code in src/X3DCANVAS.js and /src/util/VRControllerManager.js. can you please direct me on which files I should look into? I looked around and I couldn't find another webVR codes.