schwarzdavid Posted August 30, 2016 Share Posted August 30, 2016 Hey Guys, I'm pretty new with Babylonjs, and I'm facing a problem I cannot solve by myself. I have to show a metal plate, which is long and thin. So I'm going to create a ribbon, and it works fine, but when the length gets bigger or when I zoom out, the ribbon starts extremely flickering. You can see an example here: http://www.babylonjs-playground.com/#1CZ6XW#15 Thanks! Quote Link to comment Share on other sites More sharing options...
Nastro Posted August 30, 2016 Share Posted August 30, 2016 Hi @schwarzdavid test to use : camera.minZ = 100; camera.maxZ = 1000; Quote Link to comment Share on other sites More sharing options...
Nastro Posted August 30, 2016 Share Posted August 30, 2016 It's ok with add minZ; http://www.babylonjs-playground.com/#1CZ6XW#16 Line 23 schwarzdavid 1 Quote Link to comment Share on other sites More sharing options...
schwarzdavid Posted August 30, 2016 Author Share Posted August 30, 2016 Thank you very much Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 30, 2016 Share Posted August 30, 2016 It seems that your object is not at the right scale. If that's the case, take care to use correct dimensions in your 3d scenes, it's avoid you some "physical" issues like this. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 30, 2016 Share Posted August 30, 2016 Hi guys. Sorry to interrupt, but... @V!nc3r... what makes you say that? If this were a piece of edging... that installs along the side of the Mackinaw Bridge (26,372 ft), then the scale could be correct, yes? The model is 5000 "units" in depth. And what if those units are millimeters? 5 meters, then. 16 ft. But yeah, I guess Khronos and the gang are pretending that a webGL "unit" is 1 meter... making this model just over 3 miles deep. Have any thoughts, V-meister? Just curious... wondering if you might have some info about something... that I need to beg you to teach me. heh. (I'm a knowledge thief, and I'll attack ANYONE to get some.) Kind of a cool playground. Good ribbon wrangling! Nice stuff, and welcome to the forum, @schwarzdavid! Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 31, 2016 Share Posted August 31, 2016 I answer as a CG artist (is this the right traduction for infographiste ? I've never been sure ^^), a dev' surely could add some points (and may correct my own) : working in right units is part of good practices (example), 'cause even in computer science we just try to copy the real world so all physical values used on 3d engine/software comes from IRL. It's very important if you set a lighting or use physic engine (such basic collision for example) in order to keep logical value of your lamp intensity, gravity, camera parameters, etc. And in physics, the default unit is meter. convenience during modeling : very large unique object are a pain to navigate through, and software viewport handles it with difficulty (example : in blender the viewport default camera is set to min[10cm] max[1km]) pixel density : I don't want to calculate the required size of the lightmap/dirtmap/occlusion-map of a 5km object to have a clean render, that scares me (even in google earth, the San Francisco bridge have a texture tiled streaming system on it) in case of Mackinaw bridge, if you want a detailled model (to travel it in FPV for example), you surely make it in several parts, probably largely instanciate, in order to use LOD, camera occlusion culling, etc Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 31, 2016 Share Posted August 31, 2016 EXCELLENT answer... thanks! @max123 recently proposed scaling an entire scene, or camera scaling... and I was thinking about the ramifications. I was wondering if the length of a meter... would scale, too. IF all units of measure involved in the scene... scaled WITH the scene scaling, then all the ratios would remain the same. Even in Blender, if the scene were scaled-up by a factor of two, the maxZ would double... adjusting to the scene's master scale setting. Hmm, difficult to comprehend. If there were a scene.scaling property, I wonder how many places in the code, both for webGL framework and physics engines, would need to perform a final multiplication against current scene.scaling. If scene.scaling DID exist, all the mesh distances from origin 0,0,0... would need to scale, too. But the distance "ratios" of the mesh placements... would remain the same. Also, I have a project going that requires lots of vertex locating... and thought about... WHAT if... each vertex position DID NOT contain a location in worldSpace... but each was, instead, the amount of offset from the previous vertex position. Weird. I don't know what my point is. Just thinking. Thanks again for the info, refs, and nicely formatted post. Cool. Do you have any thoughts on the master scene.scaling property? I would be glad to hear them, from you and others. I'm not suggesting that scene.scaling would ever be added to BJS. I'm just... trying to see the big picture/impacts of such a thing. Be well! Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 31, 2016 Share Posted August 31, 2016 If you're a cg artist and doesn't want to arouse the wrath of coworker-developpers, start to model your scene at the correct scale and don't ask to add a scene.scaling function, in my opinion You have summarise some ramifications that this feature could involved, while there is just to use correct scale at the beginning and then no problem appears. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 31, 2016 Share Posted August 31, 2016 But what if... you build a room, and on a shelf in that room... the artist wants three complete BJS scenes placed there, made by other people. Each of these three scenes were CREATED using correct scale, but their scene items were not based upon a master parent. In other words, they are very difficult to miniaturize. If there were a scene.scaling property, it would be easy to miniaturize. The tiny scenes would work fine IF you shrink your character/cams to match (before entering those scenes). But what IS "entering". Scaling them back up to full scale? hmm. One of the scenes has a rollercoaster... and it operates primarily on gravity and inertial forces. It would be nice to have that operate correctly, even in miniaturized form. Dollhouse ops. @Pryme8 also spoke recently about putting an entire scene inside the knot-hole of a tree. hmm. But yes, I agree with you... establish/use a standard when scene building, and stay with it. Pryme8 1 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 31, 2016 Share Posted August 31, 2016 And what if you developp a game like Pillow Castle ? Each project have its own concern, and if you play with different world scale you indeed have to play with logical and the chosen 3d engine, and before start 3d assets have a talk between artists & dev' Quote Each of these three scenes were CREATED using correct scale, but their scene items were not based upon a master parent. So if they use correct scale there is no problem, these items or scenes can be merged and place anywhere in a master scene. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 31, 2016 Share Posted August 31, 2016 Cool video! You didn't address the challenge, though. They might be merge-able, but how can they be miniaturized? Little car, driving on physics-active heightMap terrain, making jumps, auto-pilot. If I want to change its 2000 by 2000 -unit terrain... to fit on my 2 by 2 -unit shelf, how would that be done? Would the physics still be correct when it sits on the shelf, with all its units 1000% smaller? (Not as simple as doors and other static models like that space shuttle, right?) There is not much "talking to dev" happening in MY world. Just me, and 25 great playgrounds/scenes that need to sit on a shelf in a room. Max123 DID get an answer from "dev" (Deltakosh) who said something like "parent everything to a master parent object". Doing that (adding a master parent) to 25 great physics and animation playgrounds (initially made by others)... would take me around 700 years to complete. Not plausible. Ideally, ANY scene can be miniaturized, and still work correct. (dream-on, Wingnut) Master parent won't even work, because master parent won't scale the distance between scene items. All the mesh can scale up/down from a master parent, but the distances between each mesh will not scale proportionally. *sigh* Perhaps I am sitting on the fence between dev department and art department, and this is why there is something "up my butt". V!nc3r 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 31, 2016 Share Posted August 31, 2016 I was really kinda mulling around this idea like Wingnut said. You would need to have some sort of model degrader to make sure that your small scenes placed in view are not being drawn as an actual scene but as a small scale model representation of it. I was talking about using a 4th dimension that would give you your scale location i what ever scene your in then you would have to figure out at what point it transfers over and you would have to reset all your scaling and have the system effectively loop on itself. The Horton Hears a Who, idea... Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 31, 2016 Share Posted August 31, 2016 this whole idea i was working on is loosely inspired by: Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 31, 2016 Share Posted August 31, 2016 which actually also makes me think on a side topic and kinda X-files. What if this concept is real? What if this is actually how our reality works? Would there be intelligent persons who know how to tap into this? If you could shift your dimensional scale how fast could you travel between stars when your able to make your scale reference of them minimal, to the point of taking a single step could bring you to a whole other Galaxy... o_O freaky... but anyways with proof of quantum entanglement the new Model of reality is starting to hint to these things. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 31, 2016 Share Posted August 31, 2016 32 minutes ago, Pryme8 said: not being drawn as an actual scene but as a small scale model representation of it I would prefer not to accept that "imitation" and limitation. The scene has to work. We're ONLY scaling it, not making any other changes. SO, our little auto-piloted terrain jumping car... keeps jumping... bouncing and tumbling from IT'S attached physics engine and imposters. Allow us to turn its tiny scene.gravity knob, and have it change its gravity right now, but not affect the gravity of the shelf holding the scene. Use BJS, running on a virtual machine (software-based complete PC computer)? hmm. DREAM ON, WINGLEBERRY! That VM would be SO SLOW compared to real PC's, huh? *nod* About the same as a steam-powered i7 box. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.