• Content count

  • Joined

  • Last visited

  • Days Won


MackeyK24 last won the day on February 18

MackeyK24 had the most liked content!


About MackeyK24

  • Rank
    Advanced Member
  • Birthday
  1. We use material.effect.setFloat and setTexture so on an so forth... Is there a way to GET a rule from a shader... Unless i am just stupid and don't see it, again How do or can we event getFloat on a value that we can calculate in the shader... or even some present GLSL output property we can read ???
  2. Thanks Delta... I eventually figured that out... I now use a modified PBRMaterial for my SplatmapMaterial... That way i can pick ALL the regular PBR material lighting... It was actually easier than before... i just replace the: albedoColor = texture2d(albedoSampler) with the blended up splatmap textures... EASY PEASY... same thing for bumping... that way we DONT change anything from the par shaders EXCEPT of course adding the additional texture properties and blending up all those texture colors RIGHT where you would normally use texture2D(albedoSampler) and texture2D(bumpSampler)... So easy... and works beautiful, so far
  3. Yo @MrVR Dude... you gotta go get a actual Samsung Gear VR headset... All the clone models fail in comparison... But you can only get the full WebVR experience so we can use in the BabylonJS toolkit games... You gotta have an actual GearVR headset... once you first install into headset it will install GearVR software on your device... One of the that will allow access to Samsung Internet For GearVR with full support for WebVR 1.0... Now the babylonJS WebVRCamera will work... Dude.. its a whole other experience in the native Samsung GearVR WebVR enable browser than the clone headsets we where using... and should be crystal clear on Samsung S7 Edge running at 2560 x 1440 with like 560+ pixels per inch thru the native browser supported WebVR API not using the native device orientation especially for the compensate distort effect that causes the jitter... Hope its good for IPD as well But really go get a Samsung GearVR headset... The black one... not the white one...
  4. Yo @MrVR I finally got my Daydream View headset... Thanks too much... have not even open yet... Now i got the 1... Homido V2 (which looks great with S7 Edge and has eye distance controls) 2... Daydream View with the hand control from you (THANKS SOOOOO MUCH) 3... The Black Samsung Gear VR free from sprint when i bought the phone (S7 Edge) I am excited to give Mobile VR another SHOT I am hoping the WebVRCamera with Samsung GearVR browser makes the IPD eye distance issue a MOOOT point
  5. I am about to start messing with stuff ion my toolkit.... i currently setup a Camera Rig system for working with cameras... You have two basic chooses... 1... VRDerviceOrientedFreeCamera/GamepadCamera of 2... WebVRCamera (Requires there to be an attach VRDevice to the browser... the browser WebVR API handles all the heavy lifting)... For samsung GearVR you have to activate the WebVR support in the GearVR web browser : To enable WebVR, all you need to do is open the Samsung Gear VR internet browser on your headset and visit internet://webvr-enable or visit internet://webvr-disable to disable WebVR support. I just bought a brand new Samsung S7 Edge and the 2016 (The Black One) Version of Samsung GearVR headset... Gonna try some VR stuff with my toolkit... Curious to see how WebVR Camera will differ from VRDeviceOriented camera... Mainly how WebVR camera will handle IPD (Pupil Eye Distance) Yo @MrVR We should try the WebVRCamera instead of the VRDeviceOreientedCamera since we both now have samsung S7 devices... Just gotta active like above from device using the gear vr browser then set camera rig to webvrcamera and see what happens
  6. I am working on that now.... shadows (baked and realtime) will basically get handled by the babylon splatmap shader... I know i already have to implement lightmapTexture... that is where baked shadows will come from... I think realtime shadows will come from including the 'Lighting' section of the shader and skybox (indulging operate HDR reflection is selected) will come from the implementing the reflectionTexture parts... Those are work in progress... I just really getting into messing with shaders at that level... will let you know how is comes along Take a look at the video when can... you can see how and where this stuff gets handled
  7. Hope it will help (when new toolkit get released) Until then i will PR the new BABYLON.SplatmapMaterial (when i finish) and you use it JUST LIKE BABYLON.TerrainMaterial Except: mixTexture is now splatmapTexture 1 thru 4 and up to 12 diffuse and bump textures (3 per splatmapTexture)
  8. Yo @Dad72 - check out this thread Hope it will help (when new toolkit get released) Until then i will PR the ne BABYLON.Splatmap material and you use it JUST LIKE BABYLON.TerrainMaterial Except: mixTexture is now splatmapTexture 1 thru 4 and up to 12 diffuse and bump texture (3 per splatmapTexture)
  9. @MrVR You probably DONT want to render into the playing canvas but rather create a new canvas element and render into that... Check out the Virtual Joystick Implementation... @davrous does something like this to render the two virtual joystick controls ONTOP on the engine rendering canvas... Also if you got the video element already no need to render anything into another element ... Just put #video element on top of canvas USING ABSOLUTE POSITIONING take a look at some of the "Scence Controller" Html markup where i put things like "Score" on the game screen... is using a little SNIPPET of css above the actual html markup to show and position the element on the screen... Note: The main page container is using ABSOLUTE positioning so YOU MUST also
  10. While trying to add additional support for my new SplatmapMaterial... I am using TerrainMaterial shader as a base/guide to make my modifies splatmap material... have a question regarding bump map... if you look in the code normal is calculated ... BUT I CANT SEE WHERE IT IS ACTUALLY BEING USED ... Please look at this: // Bump #ifdef NORMAL vec3 normalW = normalize(vNormalW); #else vec3 normalW = vec3(1.0, 1.0, 1.0); #endif #ifdef DIFFUSE baseColor = texture2D(textureSampler, vTextureUV); #if defined(BUMP) && defined(DIFFUSE) normalW = perturbNormal(viewDirectionW, baseColor.rgb); #endif now that calculates out normalW ... but after that NOWHERE is normalW being used... HOW IS BUMPING BE APPLIED ??? Attach is who vertex and fragment programs... Please tell me whats up with the BUMP feature from BABYLON.TerrainMaterial terrain.vertex.fx terrain.fragment.fx @Deltakosh , @Sebavan , @davrous or @RaananW Please Help If Can
  11. New Terrain Splatmap Material (Based Off BABYLON.TerrainMaterial)... Supports up to 4 splatmaps using up to 12 textures for terrain painting. The new splatmapMateral.ts will be added to the the babylon Materials Library soon but check out how i am using it for native terrain support using the U3D BabylonJS Toolkit. Of course you DONT NEED the toolkit to use the new BABYLON.SplatmapMaterial... I am just using it in the toolkit by default. U3D - BabylonJS Toolkit: Terrain Splatmap Material Overview Hey @Deltakosh , @Sebavan , @davrous , @RaananW , @Dad72 , @MrVR ... Hey guys please check this out... I am pretty proud of this... Its my FIRST venture into the low level shader parts (using the terrainMaterial.ts as a guide)... But i think it turned out beautifully
  12. Yo @Dad72 ... After going over the BABYLON.TerrainMaterial and studying the Unity Internal Alphamap Ecoding... I just RE-BUILT my Terrain Generator... 1... No more separate collision mesh... can now procedurally generate optimized mesh natively... No need for CreateGroundFromHeight when i can just procedurally generate the actual mesh (using resolution info from terrain material inspector... HeightmapWidth, HeightmapLength, Heightmap Resolution)... Ex: 300 x 300 x 33 yields an excellent leave space low poly BUT NICE LOOKING terrains... *IS OPTIMIZATION 2... I now handle the native Unity Splatmap generation workflow to dynamic produce up to 12 splats using up to 4 splatmaps... This give you up to 12 textures (i could make more ... bu that seems enough to me... also i don't feel like adding another set of properties and functions and handle more that 12 right now ) 3... Enforces image encoding (if not a jpeg or png will auto convert to selected image format) really helps with tag and dds types textures 4... Support scene dependencies to BREAK scenes apart into separate scene files... Characters with make bones and animations could in there own unity scene... Fully prefaced out and scripted and can be loaded at runtime using this.manager.importMeshes("MyOtherScene.babyon"); ... am also working on a scene dependency loader to auto load all required meshes from the selected number for dependent scenes... 5... Auto pre-compress scenes to make a .gz version... even dependent scenes Will make video showing progress in creating my new BABYLON.SplatmapMaterial (that is based of the work of BABYLON.TerrainMaterial) but it will support: 1... Supports up to 4 Splatmap textures (optional meaning will not error out of you don't have all three textures: red, green, blue diffuse textures defined)... May only use the primary splat for the entire terrain... only 1 texture in the read channel of the primary splatmap texture image. This give you up to 12 painting textures to use directly in unity. 2. Auto splatmap texture configuration... Will pull the proper splatmap for the 1 of 12 diffuse text no matter which of the 4 splatmap textures if may land on depending on the Unity Terrain Editor changes that are dynamically made... Basically you don't have to do ANYTHING... all this is built in now. 3... Support self illumination ... will eventually support a useDiffuseAsIllumination just like the standard material useEmissiveAsImllumnation for Full Light Baking Support (WORK IN PROGRESS) 4... Support lightmapTexture for pre-baked lightmap shadows support (WORK IN PROGRESS) 5... Support reflectionTexture for SKYBOX Environment reflections (WORK IN PROGRESS) Anyways check back soon for a sample video show a proof-of-concept of my new Terrain Generation system @MrVR You should check out also... I got the Scene i am using to PUSH the limits of what i can do with a scene (Unity Assets In A Babylon Game... Working So Smooth So Far... Not a magic converter... But i will show how to properly use unity assets and get great frame rate and rude content payloads)
  13. I am still stuck with the 3 texture limit... Trying to see about packing a FORTH texture into the ALPHA channel of the splatmap But it working so beautifully (Even with 3 texture limit)... will post a video showing the terrain features shortly
  14. The metadata is VERY necessary for the Scene Manager API.. First off... The new version support Pre-Compressed Scene Files (MyScene.babylon.gz). The design uses a HttpBabylonModule at the server level (BabylonJS/Extensions/HttpBabylonModule and the new Toolkit has this built into the Preview WebServer) to serve the pre-compressed version of a babylon scene IF IT EXISTS AND THE BROWSER SUPPORTS GZIP (Accept-Encoding contains: gzip)... So that REALLY HELPS since the babylon scene file is TEXT based... Get GREAT compression ratio. Second... The terrain is probably that big because my first version of the toolkit (which is what you have)... I actually BASE64 Encode the HeightMap PNG that is used to CreateGroundFromHeight into the .babylon scene file... Your Terrain must be BIG ... Also it turns out that the base64 encoded representation of the height map bytes probably increase that 25-30 percent with all the base64 text encoding overhead... That was probably not a good idea... although it seemed really kool when i was writing it... and all my height maps were really small... And on top of that... I think i always encode PNG now as apposed to jpeg... Because if you look at code... we really PACK reach Color Channel with a special encoded values so we DONT loose ANY precision on the actual HEIGHTMAPS... byte[] packed = BitConverter.GetBytes(inverted); if (packed != null && packed.Length >= 4) { pixels.Add(new Color32(packed[0], packed[1], packed[2], packed[3])); } So this file is probably a major contributing factor to your size problem. My new version is coming out soon... It should really help. Also ... Ping @MrVR he is doing some kool looking stuff with the terrains using My Toolkit
  15. In BabylonJS Toolkit ... The Terrain Generator Component... You would use the Surface Material option to assign material to terrain. (I can't get to the textures that the unity editor is using at design time... So i was forced to use a EXTERNAL property to set the textures... hence... the Surface Material Option on Terrain Generator Component) I have been working with @MrVR on the new toolkit update (trying to get all documented)... But is has been using the the Babylon.TerrainMaterial to set things up in code and just set Surface Material in editor to null... I plan on going back in and looking at the TerrainMaterial extension for babylon js... Maybe i can use that instead... I haven't had a chance to really look at the TerrainMaterial.... But i think that would be a great fit... And UNTIL I stick it the toolkit.... You can ALWAYS just throw a mesh component script on the terrain object in your unity editor... then in start function: var terrainMesh:BABYLON.AbstractMesh = this.scene.getMeshByName("Terrain"); terrainMesh.material = new BABYLON.TerrainMaterial(....) BLAH BLAH BLAH