• Content count

  • Joined

  • Last visited

  • Days Won


Wingnut last won the day on March 19

Wingnut had the most liked content!

About Wingnut

  • Rank
    Advanced Member
  • Birthday 12/15/1957

Profile Information

  • Gender
  • Location
    Bessemer, MI, USA
  • Interests
    3D Web, CSS, HTML, Guitars, NORML, storytelling

Recent Profile Visitors

2,875 profile views
  1. Yeah, I understand. And... it seems... the directionalLight beams should be the exact same direction... as the angle between light and target POSITIONS (for least jaggies). ie. Set light and target positions first, then light.setDirectionToTarget(target.position) to "get your beams aligned". (it's a log cabin-builder's thing)
  2. But, hmm.. Orbiting the light around mesh, constantly doing light.setDirectionToTarget... looks good again, even with angled shadow. Ok, I think I'm starting to understand this. Or not. I'm out-of-category a bit. I should start Q/A thread.
  3. Yeah, that works, but, no. You re-aimed the light. Is the light angle related-to the jaggies? Seems so. Causes diagonal edges, I suppose.
  4. Yeah, but I only assembled it from great tools and nice pics... done by others. It has a strange "mood-feel", eh? Adam and Sebavan contributed, too. Both of them fixed my forgotten .hasAlpha in lines 64 and 72. I wish I could draw 2d graphics that nice. I'd be somebody. But really, it's BJS that makes it all easy. YOU also contributed, artistically, @Deltakosh. You answered a forum question: "How do I put a different image on back side?" ... by suggesting a second plane. That's when I added the back-side plane to it. So, it was a colossal team effort, which was a breeze for me. Most important for me... is that this PG has helped 2 forum friends, so far, and might do many more. Yay! The playground app is the best learning tool EVER, I think.
  5. SO bumpy-edged (acne? heh - a term borrowed from some shadow tutorial contributor), even with a big 4096 shadowGen. hmm. *shrug* Lines 22-33 is experiment zone. I'm probably making mistakes, though. I don't work-with shadows too often. Also, light.shadowMinZ and .shadowMaxZ (for lights used in shadowGenerators) are not included in PG intellisense (as far as I can tell)... but perhaps too new, yet. Just thought I'd mention it. Congrats on the feature-add, DK and crew! I think the shadows tutorial is yours, @Deltakosh. If it were mine, it would contain 20%+ incorrect statements.
  6. Hi guys! @arek3D, I got a playground rolling for you, and am doing some dynamicTexture tests. I am getting same results as you so far. Could be my mistake, though. No SceneLoader.Append in this one... I use ImportMesh instead, for this demo. As you can see, a second plane... created within the scene... is rendering the drawText fine. SO... it is my opinion... that your imported plane has no UVs set. I am also having troubles scaling it (line 13). The in-scene-made plane scales correctly in line 19. hmm. There may be options in your modeling software for "generate UVs", or ways to "include UVs" during the export. I don't work with modelers very often - sorry. You COULD even set the UV's yourself, with JS, in the scene (by setting 4-8 Vector2 values on the mesh's vertexData object). We'll talk about that later. First, check your modeler and perhaps view the .babylon file with wordpad or online JSON viewer... see if there is UVS data in there, or only vertices and indices. Keep us posted. You should be able to use that playground above... for testing. Make more saves, bookmark the url after each save, etc. Have fun, you cannot damage anything in the playground... no matter how much you try. Good luck.
  7. Hi Royi... sorry for the slow replies. I hacked-together a playground that sort-of accomplishes this. Watch console. All the scene observer-based pointer events are working fine. My math work in lines 91-94... is likely less-than-optimal. I have some "accumulation" problems... somewhere. I'm sure you can improve it. This method is easier than coding/modding a camera input, at least. Be well.
  8. Hi guys! Yeah, somebody else was goofing around with that, too. Version 42 is good, too... I bet that whole playground series is full of weird things. No 3rd party physics engines used... in those two. There IS a physics engine version somewhere around here. I think I saw someone put @RaananW's little physics-active car... in the bowl, too. And his cloth mesh got dropped into the bowl, as well. Ahh, there it is. That's the physics engine version... with the car, and the cloth, and the ball... all in the bowl. But, it's not working right now. hmm. Good fun. Hope this helps. Maintain perpetual motion, you say? Helluva challenge.
  9. Hi @bentwonk. The MultiMaterial class is small and has no .emissiveTexture property. You CAN, though, use the .emissiveTexture on each/any of the subMaterials... like this: (lines 39 and 45) The Babylon decal feature has been "tried" as an on-ground (and terrain contour-following) "reticle" or target circle, but it had some problems on extremely bumpy grounds. Also, our decal system is reasonably complicated and cannot be easily moved. It is better... if re-created in the new place, and not "dragged" or animated across bumpy terrain. There's another idea/method for putting BLACK grids on ANY section of heightMap, multi-material'd or not - with shadows/shadowGenerators and a spotlight (Our shadows are NOW available with ESM soft-edges and self-shadowing - see recent forum announcement). (yay!) Take a look at this playground, if you would. See how the images are only casting shadows... for the non-transparent parts of the image? This means you could make a transparent-background grid image... and shine a spotlight through it (like the playground), but this light would shine straight down onto your ground... and would be easily position-able and size-able. You would have a grid made of shadow, if everything goes correctly. I think it is limited to black... maybe. It may have a circular outer ring/border... because spotlights are round. Could THAT type of grid... work for your project? With this type of grid, the grid is drawn "over" (atop) all non-terrain mesh, too (if mesh.receiveShadows = true). It is a light from above, so it crosses EVERYTHING, if wanted. As far as I know, we have not had great success at sliding-around an image atop a bumpy heightMap. (having it "terrain follow"... stretching nicely across mountain peaks and through deep valleys). A more advanced method... might be to create a second smaller heightMap, and it copies the Y height of each heightMap vertex... from the terrain below. In other words, as you move-around this smaller "tile" of heightMap, it constantly re-transforms its vertices, matching the terrain contour beneath it. Then ITS single diffuseTexture or emissiveTexture... could be a transparent-background grid image. A constantly-transformed grid of "lines" (using Babylon LinesMesh class)... might be able to do a terrain-following grid in the same way, always setting its line "points"... to match the height of the verts beneath. BUT... our linesMesh produces color-settable thin lines, with no thickness setting, so your grid might look a bit "wirey". Just some ideas. Maybe others have more. Hope this helps. Issue still open... fellow forum folk. Ideas welcome.
  10. Well darn. Sorry, Ilniley. Are you browsing index.html from a web server / web site? Or perhaps double-clicking on index.html ... within a local hard drive folder? (better way for testing) This is puzzling. I'll keep thinking.
  11. Hi @ILNILEY, welcome to the forum. Yeah, a file not found is interesting. Check your typing carefully. Can you grab this little zip package? It's slightly different code (uses Append instead of Load)... but it worked fine for me, here, locally... loading a little .obj file (included in package). See if it works at your house, if you wish. Report back, if you would, thanks. This is likely a simple problem... so check carefully for those "hidden obvious things". Again, welcome, we'll talk more, be well. Hope this helps, somehow.
  12. Hi @fitocs452, welcome to the forum. I'm no expert at loading... but I want to show you some things. #1. Your loader code is slightly old. Please look at THIS playground demo. Model loaded ok? Notice line 6 ... Append instead of Load. Not sure why Append is preferred ... but I heard it is. Perhaps 'Get ZIP' of this playground, home-edit the index.html (to point to your generic-houses-1.babylon), and try that. Does it work? #2. Here is another playground demo. It uses 'ImportMesh instead of Append or Load. Scene look good? Model render? Perhaps do the same with THIS playground. Use the 'Get .zip' button on the playground, take it home, adjust the index.html for generic-houses-1.babylon, and see if things load-in/display. Note: Look carefully at the previous playground demo. In line 3 we define a 'camera', and in line 12 we define another 'camera'. This is not unusual when working inside the playground. Notice that the playground app complains of not having a camera... when I disable the first camera. That happens mostly in playgrounds. We can talk more about that later. I just wanted to tell you about the reason for seeing two cameras being defined. The top camera, if not set as the scene.activeCamera... is there ONLY to "fool" the playground... avoiding its "You must have at least one camera" error. #3. If you want to keep trying YOUR index.html, I see one little mistake... camera.activeCamera.attachControl(canvas); Probably should be... newScene.activeCamera.attachControl(canvas); If I understand error report, the camera is missing... within .executeWhenReady function. You COULD try this... BABYLON.SceneLoader.Load("", "generic-houses-1.babylon", engine, function(newScene){ newScene.executeWhenReady(function() { var camera = new BABYLON.FreeCamera("Camera", new BABYLON.Vector3(0, 5,-10), newScene); newScene.activeCamera = camera; // this line might be removable - done automatically. camera.attachControl(canvas); }); }); Might work. Okay, that's all I have for you, so far. Do you have a free GitHub account? That is where I stored my bjs_text.babylon file (as you can see), and it would be a good place for YOU to "publish" your generic-houses-1.babylon (so we could suck it into the playground for testing). Others (smarter people than I) may comment soon... it's still early. Hope this helps. Be well, talk again soon.
  13. Hi @hit2501, good to see you again. Any chance we could get a list of errors from Mac error console? That might help. Could your friend be blocked by CORS restrictions... when trying to access images? Perhaps try using pictures gotten like this. (Notice the "labeled for reuse" setting on Google Image Search tools.) Perhaps your Mac friend is quite buried behind a firewall? This would also prevent image saving, too, I think. CORS can be rather brutal for JS... blocking all sorts of fun things (for security reasons). See lines 62-63 in this playground? Setting that img.crossorigin = 'anonymous' does something (also notice Rolento's comment on the end of line). Not sure what screen-grab/save methods you are using, but you might consider checking if it has a img.crossorigin setting. Also, there might be a tab/section inside your friend's browser DEV TOOLS... labeled 'net' or 'network'. (logging network access events) In that section, reports about FILES are logged. There might be more info in there, too. Perhaps it tells WHY the file loading/saving is failing. Anyway, tell more details, if you can. Thx!
  14. Hi @davidnl, welcome to the BJS forum. I don't think you are doing anything wrong. I did some tests. I changed many things. Made the scene larger, moved camera to front, increased ball size, wireframed it, and I disable MOST of collide func except... a ball color changer. So, same deal, spacebar to fire, ball is higher and shorter (more like cannonball than bullet) (I wanted to try to increase ball-ground gravitational impact and also play with ball.ellipsoid) I learned almost nothing. As you can see, our line 126 registerOnPhysicsCollide ... is only triggering SOMETIMES. And it NEVER wants to trigger on the first impact, which is where YOU want it to trigger. (to change-out ball, and cause dirt particles blast, play sound, shake CSS canvas.marginTop... you know... all the GOOD STUFF) We've seen this before... in a paddleball/ping-pong game that a forum friend is building. Inconsistent collide trigger events from the impostor. Possibly related to the physics "step" speed, which I know very little about. I would love to figure out what causes this. I will try to study it more. Calling all helpers. Issue open. Sorry for inconvenience, D, and sorry for no solution... yet.
  15. Yet another basic dyna-cabin. MUCH MORE scalable/dynamic, now... with many "knobs" in lines 76-84. FUN! I'm still too scared to add the var howManyLogsHigh value. Log fencing to go with it, you say? Yeah! On Bonanza, the Ponderosa Ranch didn't have many fences, but the few they had... were all-wood, I think. No barbed wire for those guys. They were always kind to animals, especially when Hop Singh would cook steaks for the boys.