Dinkelborg

Members
  • Content Count

    57
  • Joined

  • Last visited

Everything posted by Dinkelborg

  1. Hi all, I just found a big pack of free studio setup cube maps, unfortunately they are all in HDR format, is there any support for HDR files in BABYLON or could we add it? Or does anybody happen to know a tool or software to convert a hdr to the six images needed to create a BABYLON cubemap texture?
  2. I found this thread that describes the same problem that I'm facing and the authors problem, like mine remains unanswered: While a function like BABYLON.Tools.LoadImage() will allow one to load an Image, how does one create a BABYLON.Texture from that? "binyan" describes the same problem in his last post...
  3. I'm sorry but this doesn't really help me: - I tried to look at the source of the sandbox, however it seems very narrow and I couldn't really find anything related... - I looked at the LoadImage function, and while I cannot understand it entirely I think it creates an Image(); as well... In the end I'm left with the same problem that I started with again: - I can load an image from a local file, but I cannot create a Texture from the image. ...I'm sorry if I missed something I don't understand how this function works //ANY database to do! if (database && database.enableTexturesOffline && Database.IsUASupportingBlobStorage) { database.openAsync(loadFromIndexedDB, noIndexedDB); } else { if (url.indexOf("file:") === -1) { noIndexedDB(); } else { try { var textureName = url.substring(5); var blobURL; try { blobURL = URL.createObjectURL(FilesInput.FilesTextures[textureName], { oneTimeOnly: true }); } catch (ex) { // Chrome doesn't support oneTimeOnly parameter blobURL = URL.createObjectURL(FilesInput.FilesTextures[textureName]); } img.src = blobURL; } catch (e) { img.src = null; } } }What does it need as a parameter? Just "localStorage"? And how can one use this function to create a new BABYLON.Texture? I would be very glad about an example that would show how to use this to create a Texture...
  4. I tried with a directional light and with a directional light I cannot cast any shadow at all, however when all mesh parts are kept separate, I can cast shadows with a spot light, but not with everything combined to one mesh
  5. Hi, I'm working on a project, where the user is supposed to be able to upload his own images as a texture for an object. Now I'm able to get the image like this: <table id="fileForm"> <tr> <td> <input type="file" id="files" name="file[]"> </td> </tr></table>var handleFileSelect = function(evt){ var files = evt.target.files; var reader = new FileReader(); reader.readAsDataURL(files[0]); var boarding = scene.getMeshByName("Boarding"); reader.onload = function(e) { console.log(e.target.result); //$("#fileForm").append('<img src="'+e.target.result+'"/>'); var mat = new BABYLON.StandardMaterial("mat",scene); mat.diffuseTexture = new BABYLON.Texture(e.target.result,scene); boarding.material = mat; }}$("#files").on("change",handleFileSelect);Now with the commented line: $("#fileForm").append('<img src="'+e.target.result+'"/>'); I can attach the texture to my form, that works like a charm, however I cannot figure out how I can use the loaded image as a texture. As I tried above I just get the error message: "Uncaught TypeError: Cannot read property 'replace' of null" Which is probably because the constructor of BABYLON.Texture expects a URL and instead gets a data stream... But how can I solve this in a way that will work? Thanks for any hints or clues. Dinkelborg
  6. var spot = new BABYLON.SpotLight("Lamp",BABYLON.Vector3.zero,BABYLON.Vector3.zero,2.5,8,scene); spot.intensity = 1.75; spot.diffuse = new BABYLON.Color3(0.9, 0.8, 0.8); spot.angle = 5; spot.exponent = 8; spot.position = new BABYLON.Vector3(-17.6, 18.8, -49.9); spot.setDirectionToTarget(new BABYLON.Vector3(0, 0, 0));The Building is about 3 unity high as the cube floating next to it is at position.y = 3
  7. Hi, has been a while however I started a new project using BabylonJS, where I'm importing a model from Blender into a scene, now for some reason I cannot get it to cast a shadow. I added a cube next to it and it does cast a shadow, I'm also adding both the cube and the model to the renderList of the shadow generator.. Any ideas or suggestions what I could try or why it wouldn't work?
  8. iOS only supports WebGL from iOS-Version 8.1 on before that it was diabled by Apple (or at least very restricted) so if your iPad runs any other version it wouldn't work at all and since 8.1 is the first version allowing WebGL to run, it might just not be entirely ready and optimised for it
  9. Not working version is still at: http://analogmadness.bplaced.com/Demo/VideoSwap/index2.html Same link as in the very first post
  10. @Wingnut: So... while playing files larger than 1MB still doesn't work, here is a first version of the whole video swap idea: http://analogmadness.bplaced.com/Demo/VideoSwap/ You can click the red ball and it will switch the video with a little effect, or you can click the video itself and change it tile by tile... BTW: Switching tabs for me crashed playback for both videos but while testing they often also just randomly stop playing :/ While it is a first step this is anything but presentable ... How come there are so many issues with this o.o
  11. Okay so when I tried this: t_vid1 = new BABYLON.VideoTexture("video", ["http://www.babylonjs-playground.com/textures/babylonjs.mp4"], 256, scene, false);it shows the error message attached to this reply, I also converted the 7MB trailer I had to 3gp and it does play the audio of that, but not the video, I was watching the console and even after the entire file has been loaded the video is not shown.
  12. Okay now I downloaded the same trailer as before in mobile size (youtube) 7MB and this one also doesn't play AT all (not even local) ... It plays fine in Windows Media Player ...
  13. I'm using a free hoster called "bplaced.net" but I also tested it locally - I use Webstorm as developer environment and it created a local server emulation just like xamp or wamp would do. It doesn't work locally nor globally so I guess that is not the problem... Where exactly is the testscene's video hosted? would it be possible to just reference the http-url in my code to test if that works... then again why wouldn't it... if it works in the playground...
  14. Okay, I understand... So the array is only for fall-backs, but why can't I use larger video files? Normally the video element would just buffer a certain range of frames and then play them while it keeps buffering the rest of the video, right? At least that's what the HTML5 documenation says about it. But with very large files the video will start loading, and then suddenly stops without any playback (can also not be forced ... I tried to make it play with commands, no effect) And intermediate sized videos ~10MB - ~20MB are not played video wise but the audio plays with I don't know 5 times its original speed or so? What is going wrong there?
  15. I tried to split the video (24,6MB) into 1MB long videos, and while the first video (of 24) is played now, it does not play the others am I doing something wrong here: t_vid1 = new BABYLON.VideoTexture("video", ["js/assets/movie/split/penguins_trailer_1.mp4", "js/assets/movie/split/penguins_trailer_2.mp4", "js/assets/movie/split/penguins_trailer_3.mp4", "js/assets/movie/split/penguins_trailer_4.mp4", "js/assets/movie/split/penguins_trailer_5.mp4", "js/assets/movie/split/penguins_trailer_6.mp4", "js/assets/movie/split/penguins_trailer_7.mp4", "js/assets/movie/split/penguins_trailer_8.mp4", "js/assets/movie/split/penguins_trailer_9.mp4", "js/assets/movie/split/penguins_trailer_10.mp4", "js/assets/movie/split/penguins_trailer_11.mp4", "js/assets/movie/split/penguins_trailer_12.mp4", "js/assets/movie/split/penguins_trailer_13.mp4", "js/assets/movie/split/penguins_trailer_14.mp4", "js/assets/movie/split/penguins_trailer_15.mp4", "js/assets/movie/split/penguins_trailer_16.mp4", "js/assets/movie/split/penguins_trailer_17.mp4", "js/assets/movie/split/penguins_trailer_18.mp4", "js/assets/movie/split/penguins_trailer_19.mp4", "js/assets/movie/split/penguins_trailer_20.mp4", "js/assets/movie/split/penguins_trailer_21.mp4", "js/assets/movie/split/penguins_trailer_22.mp4", "js/assets/movie/split/penguins_trailer_23.mp4", "js/assets/movie/split/penguins_trailer_24.mp4",], 256, scene, false);I looked at the example here and it doesn't look any different... It keeps repeating "penguins_trailer_1.mp4" in a loop ...? I also noticed that as soon as the window looses focus, the video is stopped and cannot be started again in any way ... that's kind of really bad o.O
  16. Hi, as I'm looking into the video texture component at the moment, I ran into yet another problem: At first I tried to play a short and small video file so that I wouldn't have to wait too long while testing, this worked flawless: looky here code here But when I tried the same thing with a huge file (24,6MB) that I had downloaded from youtube for testing (so it was loading fine on youtube, why wouldn't it load for the texture, right?) it would start loading it, then stop without any output, when I re-sized the file to a smaller image size and less quality (17,1MB) the file would still not show, but for some weird reason the audio now gets played in super fast forward: looky here code here (although nothing changed in code except for the video url) So I tried to make the video component preload, tried to make it load manually, I got output while its loading and tried to get output when it would be ready to play, although that never triggered... Since I am clueless as for how to solve this, I hope someone here could help me out (again ) Thanks for any hint or help in advance! - Dinkelborg
  17. Yes I was gonna try the same thing! Awesome RaananW! Could you maybe explain a little more of the background behind these commands? videoPlane.setVerticesData(BABYLON.VertexBuffer.UVKind, [0, 0, 0.5, 0, 0.5, 1, 0, 1]);videoPlane2.setVerticesData(BABYLON.VertexBuffer.UVKind, [0.5, 0, 1, 0, 1, 1, 0.5, 1]); It looks like the uv-array requires values inbetween 0 and 1 could you elaborate how those come to be? Thanks in advance.
  18. Hi, I'm working on a little side project where I want to switch between two videos with a slider, now while there might be complex shader ways of doing this I was thinking: What if I had a hundred little planes which would build a mesh, on which video 1 was projected and another hundred little planes on which video 2 would be visible and I would just place them in front of each other and fade the planes to the left of my slider out... So my question would be: Is it possible to display a video on a hundred little planes? What I'm looking for is pretty much EXACTLY this: http://threejs.org/examples/#webgl_materials_video
  19. @Deltakosh: So... is this a bug or so now? Since the standard Cameras become entirely useless like this... as soon as I want to add a button-press function or so I will have to detach the camera control from canvas...
  20. @Deltakosh: Yes that solves the problem... well half way... If I don't attach controls for the camera key-input works , if you were to test the scene now here (the url with the frame-set) you will be able to use Space to switch cameras and everything, while you cannot control each camera (logically) @jerome I don't exactly know what that means, but how do you test that? Could be useful in the future
  21. It's not like I cannot use a float, in fact I did just create a float and made its value 1.0 or 0.0 so that I can check in the shader for it, but that just isn't what floats are made for really... and I think a boolean is cheaper than a float, so if one day anyone wants to create a huge shader that needs - I don't know - 300 booleans it might make a difference if there is 300 float variables instead ... I don't exactly understand how the engine's or effect-class' setBool function would help me set a boolean value in my shaderMaterial... ? All I'm saying is, that GLSL knows more variable types as there are set-functions in the shaderMaterial-class, if the shaderMaterial class wants to make it easier for the user to set a value for a shader-uniform by automatically finding the uniform-index and handing the value to the shader, then it should do so for all available variable (or uniform) types. Otherwise there is a shortcut for like 5 variable types and if one wants to use one of the other 7 or so that don't have this shortcut, he has to go the long way anyways, so why even bother getting to know the shortcut?
  22. I commented the line integrating hand.js out, but that didn't change anything (<!--<script src="js/engine/hand-1.3.8.js"></script>-->) url are still the same as at the very top.
  23. @Deltakosh yes it's referenced in the index.html, but I'm not using any of its functions @jerome no I just returned everything into the original state (window.addEventListener) but it still doesn't work for me neither in Firefox nor in Chrome, are you sure you're looking at "analogmadness.com" and not "analogmadness.bplaced.net" ?