by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Dave Cooper
    @genworks
    I'm currently reloading with the reload(); function. But this resets the camera coords to the defaults as defined in the x3d data. I'd like to override this and specify the camera coords which have just been queried previous to the reload.
    James Saunders
    @jamesleesaunders
    Hi Dave, this may not be exactly what you are after but as a starter for 10 you could look at the syncViewpoints() code at the bottom of https://github.com/jamesleesaunders/d3-x3d/blob/master/examples/X3DOM/component/Showcase.html
    This is an example of grabbing the viewpoint values, and then re-using them again on a different chart.
    (BTW You don’t necessarily need to send to mailing list as this Gitter forum is automatically replicated on the mailing list also.)
    Dave Cooper
    @genworks
    Thanks James, I see the behavior is that changing viewpoint on one chart will apply the same viewpoint to all the charts. The syncViewpoints(e) function takes that "e" argument - where does the "e" come from, exactly? Is that an event or a viewpoint object? Is it getting bound automatically by the viewpoint which is listening for the viewpointChanged event?
    Dave Cooper
    @genworks
    Update: Yep, that event object contains the data I'm looking for, accessible with the e.orientation[0], e.orientation[1], and e.position, as you have illustrated. Thank you! When I get my example working and building online, I'll post a link here..
    So, the orientations in x3dom are given as axis ([0]) and rotation angle ([1]). Of course that makes sense, it's the same representation as in X3D..
    Andreas Plesch
    @andreasplesch
    Dave Cooper
    @genworks
    @andreasplesch Thank you for that link. A lot of info indeed. The ability to add viewpointChanged-Listeners also to the Scene-Node looks useful, and looks like it should be in the 1.8.0 stable release. Downloading that now..
    Andreas Plesch
    @andreasplesch
    I could load gendl on jupyter notebook with a common lisp kernel: https://github.com/yitzchak/common-lisp-jupyter
    and quicklisp: (ql:quickload :gendl) (gendl:start-gendl!)
    Andreas Plesch
    @andreasplesch
    I guess the next step would be to generate a box object and x3dom graphics as html in jupyter. Could be interesting.
    x3dom now also supports a good part of the X3D Nurbs component which may be interesting to gendl.
    Pablo
    @PabloZheng
    Hey guys,my supervisor asked me to learn X3Dom, I wonder what is x3dom for ?
    Andreas Plesch
    @andreasplesch
    The x3dom home page at https://x3dom.org is a good starting point.
    Dave Cooper
    @genworks
    @andreasplesch Happy to hear that Gendl loaded and started without issues in Jupyter. Which CL implementation is it? From the little I've heard of Jupyter, using Gendl inside Jupyter sounds interesting for sure. I haven't really looked at Jupyter at all yet. So far we just deploy Gendl as a traditional web application server, with its built-in CL-based webserver, and old-school Emacs/Slime as IDE. Rendering a simple box indeed sounds like the next logical step, if your goal is to embed dynamic Gendl models inside a Jupyter notebook. Gendl's online demos and documentation are somewhat lacking and out of date at present; we are working to correct that as soon and as nicely as possible. In the meantime, please reach out to me directly with any issues or if you'd like to discuss ideas for next steps (and let me know here if you need contact info).
    Andreas Plesch
    @andreasplesch
    Just exploring at this point. https://github.com/yitzchak/common-lisp-jupyter/blob/master/Dockerfile installs most CLs and then uses SBCL. I am not versed enough to tell from the REPL/Jupyter notebook if that CL is actually then used.
    Dave Cooper
    @genworks
    Communicating here about Gendl is fine by me, but I’m thinking it might look like noise to so
    e who are here only for x3dom..
    To check which CL is running, you can try
    (lisp-implementation-type) ;;and
    (lisp-implementation-version)
    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?