6

Im looking for some advice. Im rendering a 3d warehouse with three.js it works fine until I do not have more than 50 locations per level in length, then its slows down horribly. every location is an object, simple square, every level is locations stacked in two rows with a place for the robots to move in the middle, every aisle is an object with levels stacked on each other, and finally the warehouse is aisles stacked next to each other. This seemed the logical approach, its created programmatically. What would be the way to speed this thing up? I don't know the reason of slowing, too many objects or too many polygons?

Comments
  • 0
    Ooooooooooooooooo

    Aaaaaaaaaaaaaaaaa

    Js did this with webgl ?
  • 0
    @MadMadMadMrMim I did this with js with three.js library. I want to visualize the shuttle movements by the data from the opc.ua. So customer can see in a fancy way the completion of the orders they're sending to us.
  • 2
    To answer your question you could separate the two if you wanted and test
    But often with 3D the more objects visible the slower frame render

    However
    If you run a burn test against direct3d for example that ends up being ALOT of polygons on modern hardware

    You might want to try that
    I forget the name of the scene test but it reports back the number of polygons visible and you could use this benchmark to more easily figure out Which it is in this and future scenarios

    So where objects are concerned maybe I misread but how are they being used and are they in a collection per level that is an item in a larger collection ?

    Because if you’re interating every frame through a huge series of objects and calling a tender statement there uh is a good chance of lag there depending on how this is being done because of added overhead

    I’m not familiar with three but this question has already been answered yeah ?
  • 0
    Can i see the code ?
  • 0
    Yeah I saw the three js part but it renders to webgl ?

    Nice idea btw I had a similar one I just never worked on it
  • 0
    Mine was for a hotel though hehe
  • 0
    And was going to use a series of bots connected to opensim
  • 0
    I will try to make the level to be single object and location to be an x number of distance instead of being an object, so the number of objects will be x*y*z*2 less... Wish me luck :D
  • 1
    @blindXfish why not just measure some times
    Determine how long each iteration of the rendering code is taking by enclosing then in some date.now and generating a little report ?

    Then you can determine what is wrong and what to do better

    I don’t know if three works like a game loop
    But if it does a game loop has to handle a very very small
    Frame to be quick enough to feed the renderer meaning you might want to try a dual threaded design that modifies a stack of graphical info if the individual updates of objects take awhile and fires fast
  • 0
    Also yeah render distance apparently matters which comes down to the same thing
    Polygons visible
    Your structure doesn’t look that graphically intense though
    It looks like a linear wireframe
    And that would just be some endpoints not complicated things like rotated textured prims
  • 0
    Anyway got the code handy I have time to waste
    Be kind and document this time
    Lol
  • 1
    Could you perhaps join the "boxes" into larger boxes? Like one per shelf? The rendered boxes doesn't necessarily have to correlate to those in memory
  • 1
    @ScriptCoded That's what I will try so I dont have to render every single location and future boxes one by one
  • 0
    @MadMadMadMrMim I will share the project so you can take a look at it :)
  • 1
    depending on how you programmed it, there might be things like FBOs and as @jespersh said Instancing aswell. With those two things you could boost performance a lot, since draw calls are expensive
  • 1
    @thebiochemic thats what i was thinking partly earlier that a mechanism should exist to prevent having to rerun all the calls to play prims in the scene, but then i thought, well the hardware should do that shouldn't it ?

    and then it comes down to also that you're prolly seeing matrix rotations in the hardware with scaling as well.
  • 2
    @MadMadMadMrMim @ScriptCoded Thx guys, I have generated a length of 200 and it works fine. Now the location is not a separate object, it is only a segment of the level. :)
  • 0
    @blindXfish so what was it iteration related expense ?
  • 0
    @MadMadMadMrMim Yepp, I created an object for every location with a for loop, and it made overhead for rendering, now I have a single object for every level, and the three.js defined "segment" is the new "location". I just have to figure out how to relate to the position of the segment, but for sure there is a way, or I can just check the distance from the front like in reality. Anyway, I will share the code soon when it looks acceptable for others too :)
  • 0
    @blindXfish spatial boundaries ?
  • 0
    @blindXfish like i mean to associate back from a point in space i mean.
  • 0
    damn the days fly by when you have nothing to do but remember why everything will fail.
  • 0
    damn the days fly by when you have nothing to do but remember why everything will fail.
  • 0
    seriously is there anywhere without their taint ?
    montreal now ?
  • 2
    @MadMadMadMrMim why do you always comment so much as if someone was talking to you.

    Unless someone blocked me and I can't see the comments.
  • 0
    @mundo03 I’m adding by the bot comments from successive previous times all this repeated
  • 0
    @mundo03 which didn’t used to be bot comments because these conversations all already happened and I was a part of them and then you people did your crazy shit or tried to cut off content at a certain point thinking you were all slick before realizing how fucked over you all are lol
  • 0
    so that site that distributes three.js which is surprisingly FUCKING HUGE I might add !

    so it leads to a series of links
    and this was one of them :P
    https://billie.withyoutube.com/
  • 0
    sigh can nothing be new anymore ? :(
  • 0
    annnd i saw most of these already. goddamn !
  • 0
  • 0
Add Comment