text: [{"Owner":"Dieterich","Date":"2018-10-02T20:34:29Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tBest practice_dd_ How close roof sides without using caps of extrude shape? OBS_dd_ Don_t_t close base inside of roof..\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThis my example_co_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a href_eq__qt_https_dd_//playground.babylonjs.com/indexStable.html#F1QRLS%2316_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/indexStable.html#F1QRLS#16_lt_/a_gt_\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Wingnut","Date":"2018-10-02T22:44:20Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHi D!  Hey_co_ good-looking warehouse.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tHere is a non-scientific method.  _lt_a href_eq__qt_https_dd_//playground.babylonjs.com/#F1QRLS%2319_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/#F1QRLS#19_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a href_eq__qt_http_dd_//doc.babylonjs.com/how_to/legacy_set#disc-or-regular-polygon_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//doc.babylonjs.com/how_to/legacy_set#disc-or-regular-polygon_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tWith the createDisc command_co_ we can make a triangle.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThen... using careful camera zooming and inspection (along with precise mesh scaling)... we can use these triangles to cap the roof-ends.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThere are other ways... like extruding a triangle_co_ too.  Hope this helps.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tNote1_dd_  It is best to keep hemisphericLights aimed straight UPward... like this.  var light _eq_ new BABYLON.HemisphericLight(_qt_luz_qt__co_ new BABYLON.Vector3(_lt_strong_gt_0_co_ 1_co_ 0_lt_/strong_gt_)_co_ scene)_sm_  This way_co_ all sides of your building are lit the same amount (and therefore are the same color).\n_lt_/p_gt_\n\n_lt_p_gt_\n\tNote2_dd_  If you wish to stop the SUPER BRIGHT light reflection on the ground and warehouse_co_ you can do_dd_  light.specular _eq_ BABYLON.Color3.Black()_sm_  [ or use _lt_strong_gt_new BABYLON.Color3(0_co_0_co_0) _lt_/strong_gt_]\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Wingnut","Date":"2018-10-03T00:08:02Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHere is a more _qt_dynamic_qt_ version...  _lt_a href_eq__qt_https_dd_//playground.babylonjs.com/#F1QRLS%2320_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/#F1QRLS#20_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tSee line 58... frontao.scaling _eq_ new BABYLON.Vector3(alturaParede*.5_co_ baseLarg*.192_co_ 1)_sm_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tBuildings via math_co_ eh?  *nod*\n_lt_/p_gt_\n\n_lt_p_gt_\n\tNew stuff in lines 61-63.  I _qt_baked-in_qt_ the rotation and scaling... for the triangles.  (reset the .rotation and .scaling values to default_co_ even though the triangle shape stayed frozen.)\n_lt_/p_gt_\n\n_lt_p_gt_\n\tWhy did I do it?  I dunno.  Makes like easier_co_ maybe.  heh.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tMath-made warehouses... 101.  _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt_ /_gt_  FUN!\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Dieterich","Date":"2018-10-03T12:24:07Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHi _lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/5733-wingnut/?do_eq_hovercard_qt_ data-mentionid_eq__qt_5733_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/5733-wingnut/_qt_ rel_eq__qt__qt__gt_@Wingnut_lt_/a_gt_. Great answer!\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI imagined that the object would be upgradeable_co_ but the answer is valid. \n_lt_/p_gt_\n\n_lt_p_gt_\n\tSorry I don_t_t understand how work the _qt_bakeCurrentTransformIntoVertices_qt_ and what is its usefulness? I did not notice a difference. Or why I did not drink coffee today _lt_span class_eq__qt_ipsEmoji_qt__gt_🤪_lt_/span_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThank you for the extra tips_co_ very useful.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tOne medal for you _lt_span class_eq__qt_ipsEmoji_qt__gt_🥇_lt_/span_gt_\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Wingnut","Date":"2018-10-03T14:42:44Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\t_lt_a href_eq__qt_https_dd_//playground.babylonjs.com/#F1QRLS%2328_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/#F1QRLS#28_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tYeah_co_ I guess I don_t_t see a difference with the baking_co_ either.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tLines 58/59 mess-with frontao rotation and scaling... possibly making ugly numbers.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tBut when I display frontao rotation and scaling in line 62_co_ it appears to NOT be rotated or scaled.  Instead_co_ pretty numbers.  Interesting.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI thought... at line 62... we would see ugly values.\n_lt_/p_gt_\n\n_lt_p_gt_\n\t----------------------------------\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a href_eq__qt_https_dd_//playground.babylonjs.com/#F1QRLS%2329_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/#F1QRLS#29_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tAHHH BUT... when I add updatable _eq_ _lt_u_gt_true_lt_/u_gt_ to the end of line 57 createDisc line_co_ THEN line 62 reports at-JS console...\n_lt_/p_gt_\n\n_lt_p_gt_\n\tBefore bake_dd_  _lt_strong_gt_frontao.rotation_dd_ Object { x_dd_ 0_co_ y_dd_ -1.5707963267948966_co_ z_dd_ 1.5707963267948966 }   frontao.scaling_dd_ Object { x_dd_ 1.5_co_ y_dd_ 6.72_co_ z_dd_ 1 }_lt_/strong_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tTHERE_t_S our ugly numbers_co_ eh?  Alright!  I KNEW they were nearby.  _lt_span_gt__lt_span_gt__lt_img alt_eq__qt__dd_D_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_biggrin.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/biggrin@2x.png 2x_qt_ title_eq__qt__dd_D_qt_ width_eq__qt_20_qt_ /_gt__lt_/span_gt__lt_/span_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tAfter bake_dd_  _lt_strong_gt_frontao.rotation_dd_ Object { x_dd_ 0_co_ y_dd_ 0_co_ z_dd_ 0 }     frontao.scaling_dd_ Object { x_dd_ 1_co_ y_dd_ 1_co_ z_dd_ 1 }_lt_/strong_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tClean numbers again... yet didn_t_t change scene at all.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tMostly useful if you need to make many more triangles for other warehouses... using _lt_strong_gt_var newtriangle _eq_ frontao.clone(_qt_newtriangle_qt_)_sm__lt_/strong_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tEasier to rotate new triangles with _lt_strong_gt_newtriangle.y _eq_ Math.PI/2_lt_/strong_gt__sm_  Easier to scale half-wide with _lt_strong_gt_newtriangle.scaling.x _eq_ .5_sm__lt_/strong_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI_t_m not sure WHY the updatable set to _lt_u_gt_true_lt_/u_gt_ (line 57) matters.  Your scene doesn_t_t need it_co_ but_co_ I needed to determine/learn why line 62 was showing pretty numbers instead of ugly numbers.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI_t_m still learning_co_ even after 5 years of playing with BJS.  I think... in the older days... we didn_t_t need to set updatable TRUE... to make the numbers be ugly.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tA couple years ago_co_ BJS added _qt_transformNodes_qt_... which I know very little about.  That could have changed things... and Wingnut didn_t_t pay attention.  _lt_span_gt__lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt_ /_gt__lt_/span_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_span_gt_---------------------_lt_/span_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_span_gt_Technically_co_ we should add verso.rotation.y _eq_ Math.PI_sm_  ... near line 74.  Currently_co_ verso has its BACK SIDE facing outward... and frontao has its FRONT SIDE facing outward._lt_/span_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_span_gt_Line 69 - frontao.material.backFaceCulling _eq_ false_sm_    ... makes us NOT NOTICE this.  Remove line 69 or set it to true_co_ and we will be able to see-thru verso... when viewed from outside.  And we could also see-thru frontao_co_ when viewed from inside the warehouse._lt_/span_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tWhen we use frontao.material.backFaceCulling _eq_ false_sm_ ... we cannot see thru EITHER side of the material-covered triangles_co_ no matter which SIDE is inward or outward.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tFront-sides_co_ back-sides... it_t_s all fun_co_ eh? \n_lt_/p_gt_\n\n_lt_p_gt_\n\t--------------------------------\n_lt_/p_gt_\n\n_lt_p_gt_\n\tWant to go a step further?  Let_t_s visit sideOrientation_dd_ DOUBLESIDE\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a href_eq__qt_https_dd_//playground.babylonjs.com/#F1QRLS%2333_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/#F1QRLS#33_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tLook at the changes in line 57.  We added _lt_strong_gt_BABYLON.Mesh.DOUBLESIDE _lt_/strong_gt_and we re-enabled backfaceCulling in line 69 (which is the default setting for BJS materials).\n_lt_/p_gt_\n\n_lt_p_gt_\n\tWe cannot see-thru any triangle_co_ no matter which side... because we created the triangle in doubleside mode.  Weird_co_ eh? \n_lt_/p_gt_\n\n_lt_p_gt_\n\tWe got lots of options to play-with.   Verso doesn_t_t need a 180 degree (Math.PI) Y-rotation.  Having it_t_s backside facing outward... is just fine_co_ because we created the triangles doubleside_t_d.  _lt_span_gt__lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt_ /_gt__lt_/span_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tYou probably know all this stuff already_co_ eh?  My apologies_co_ if you do.  _lt_span_gt__lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt_ /_gt_ _lt_/span_gt_\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Dieterich","Date":"2018-10-03T17:18:56Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHOOOO very complete article _lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/5733-wingnut/?do_eq_hovercard_qt_ data-mentionid_eq__qt_5733_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/5733-wingnut/_qt_ rel_eq__qt__qt__gt_@Wingnut_lt_/a_gt_ ! \n_lt_/p_gt_\n\n_lt_p_gt_\n\tI knew I was awake when I realized that there was no difference_co_ hohoho. No problem_co_ mistakes happen _lt_span_gt__lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt_ /_gt_ _lt_/span_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_span_gt_But now I understand the term _qt_bake_qt_._lt_/span_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThanks very much. Another medal_lt_span class_eq__qt_ipsEmoji_qt__gt_🥇_lt_/span_gt_\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"}]