jSnake04

Members
  • Content count

    11
  • Joined

  • Last visited

About jSnake04

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location
    Texas

Recent Profile Visitors

344 profile views
  1. @Nockawa Sounds good, I can always sort the children on my end. I might dig in to canvas2d and play around a bit, even if just to get more familiar with the internals. I've lost a lot of good stuff over the years, and still haven't learned my lesson either. lol. I don't think I've ever worked for a company that actually did proper automated unit tests, but I do feel it is worth it. Definitely lots of pros to it with a small upfront dev time con that pays off in the long term.
  2. Hi @Nockawa , I figured out a bit of a workaround--not ideal, but it seems to work. http://babylonjs-playground.com/#CMZLC#22 For some reason, if I add an extra rectangle2d as the parent of the rectangle2d containing the stackpanel then the marginAlignment property starts working I have to also manually calculate its height with the total height of the stackpanel's children, then reverse the order of the stackpanel items, then I can get what I'm trying to achieve. Seems like this would be a pretty common use case, maybe there would be an easy way to integrate this into the canvas positioning/alignment system to make it a bit more intuitive? Anyway, I've been following your posts about the gui controls library that you are building on top of canvas2d, I was wondering if there is a repository on github or something for the current development in progress? I might be able to help out with it if so. I've kind of already started the same concept with a few simple control types, but I don't want to go all out with it if you are coding that same wheel. I suppose the worst case scenario would be to decline my pull requests. lol. You won't hurt my feelings if so. . Even if I can just help out with the documentation to free up some of your time. I'm pretty new to the game development world, but I have been working on business type web applications for quite some time now. I think I could help out, but I'm pretty new to OpenGL/WebGL still.
  3. It Seems I can get a Text2D object to position at the top, but my rectangle won't go there with the same positioning properties var canvas = new BABYLON.ScreenSpaceCanvas2D(scene, { id: "ScreenCanvas", backgroundFill: "#C0C0C040", backgroundRoundRadius: 50, children: [ new BABYLON.Text2D("Hello World!", { id: "text", marginAlignment: "h: center, v:top", marginTop: 10, fontName: "20pt Impact", }), new BABYLON.Rectangle2D({ id: "frame", fill: '#000000FF', marginAligment: 'h: center, v: top', marginTop: 10, children: [ new BABYLON.Group2D({ id: "group", layoutEngine: "VerticalStackPanel", children: [ new BABYLON.Rectangle2D({ id: "rect1", width: 100, height: 100, fill: "#30D040FF", marginTop: 10 }), new BABYLON.Rectangle2D({ id: "rect2", width: 100, height: 100, fill: "#D04040FF", marginTop: 10 }), new BABYLON.Rectangle2D({ id: "rect3", width: 100, height: 100, fill: "#4040D0FF", marginTop: 10 }), ] }), new BABYLON.Text2D("Hello World!", { id: "text", marginAlignment: "h: center, v:top", fontName: "20pt Impact", }) ] }) ] }); http://babylonjs-playground.com/#CMZLC#20
  4. @webGLmmk Thanks for the reply. I'm not sure where the "dat.GUI" stuff is coming from, but it is using straight HTML elements to manipulate the properties of the canvas2d objects. I commented out the GUI stuff, it just creates the little control panel on the side. http://babylonjs-playground.com/#CMZLC#19 The stack panel seems to be working, I just need to figure out how to move things around properly and all the demo playgrounds have things absolutely positioned from the bottom left corner of the screen. I assume there is an easy way to move it center-top with its children flowing downward. I'm betting I am using it wrong. lol
  5. I'm trying to wrap my head around the Canvas2D functionality and StackPanel. I'm having trouble figuring out how the layouts work. I modified a playground based on the stack panel example to use a vertical stack panel, but I can't seem to re-position it the way I want. My goal is to get the entire stack panel to center horizontally, and move to the top of the viewport so that the children list downward from the top with the first child at the top (green rectangle). http://babylonjs-playground.com/#CMZLC#17 Is the marginAlignment the wrong property to use altogether? I'm sure it is something simple that i'm doing wrong.
  6. Blender export error

    @gryff should be 1024X1024, unless I'm missing something. Could probably pack things in better and optimize a bit, but I'm just trying to prototype at this point. I plan on doing a walk and run animation here pretty soon. Thanks for the MakeHuman tip, that should come in handy when I start polishing things. Looks like a pretty cool app. I plan on creating an ambitious reusable ragdoll manager for babylon js. I want to make it work with any model and babylon physics plugin (plus some config of course). It's coming along pretty good so far. Been working on it for a while now. Got it working decently with a cube worm model/animation so far. Just need to try it out with a human form and simplify/reorganize the config options. I plan on releasing it as a babylon extension or something once I get further along. I noticed there was quite a bit of talk here on the forum about ragdoll physics. Definitely not a simple thing to do, but it sure is a fun challenge. I'm descending deep into the world of matrix math and quaternion rotation fourth dimension hyper-spheres. Wish me luck and if I'm not back in a few months, then wait another few months. lol. I already scoured the forums for every bit of ragdoll talk and even various robotics tutorials. I will post a playground with the model animation and ragdoll effect once I get things working well.
  7. Blender export error

    Hi @gryff, thanks for the help I tried following your steps, but it seems it isn't working for me. I tried it several times. Maybe I'm doing something slightly different. I'm of the opinion that this should probably be considered a bug (not sure if blender or the exporter is the root cause). I've always thought that a crazy monkey at the keyboard and mouse shouldn't be able to cause an exception in a application no matter what key and click combinations in the ui, but maybe that is just me. lol Just curious, but why are there so many blank textures and one blank material in the materials tab? In my debugging, I noticed that it was trying to output two materials, my material worked okay, but the last one was a null object... Well I just realized all I had to do was delete that one material with a blank name and it started working again. I wonder how that got there in the first place? I guess that answers my question. lol Oh well, thanks again for the help guys. Got me pointed in the right direction. I attached my texture if you are still curious. consider my most bestest model and texture ever created in the history of the planet, public domain. I made the texture and the model comes from: http://opengameart.org/content/very-low-poly-human
  8. Blender export error

    Looks like it gives the same error with 5.0.5 Exporter version: 5.0.5, Blender version: 2.77 (sub 0) ========= Conversion from Blender to Babylon.js ========= Scene settings used: selected layers only: false flat shading entire scene: false inline textures: false texture directory: C:\data\web\html5game\models\soldier\export\ Python World class constructor completed processing begun of skeleton: ArmLow, id: 0 processing begun of bone: Hip, index: 0 processing begun of bone: Back, index: 1 processing begun of bone: Shoulder.Left, index: 2 processing begun of bone: Upperarm.Left, index: 3 processing begun of bone: Forearm.Left, index: 4 processing begun of bone: Hand.Left, index: 5 processing begun of bone: Head, index: 6 processing begun of bone: Shoulder.Right, index: 7 processing begun of bone: Upperarm.Right, index: 8 processing begun of bone: Forearm.Right, index: 9 processing begun of bone: Hand.Right, index: 10 processing begun of bone: Thigh.Left, index: 11 processing begun of bone: Shin.Left, index: 12 processing begun of bone: Foot.Left, index: 13 processing begun of bone: Thigh.Right, index: 14 processing begun of bone: Shin.Right, index: 15 processing begun of bone: Foot.Right, index: 16 processing begun of mesh: HumanLow ========= An error was encountered ========= File "C:\Users\***[removed]***\AppData\Roaming\Blender Foundation\Blender\2.77\scripts\addons\babylon-js\json_exporter.py", line 99, in execute mesh = Mesh(object, scene, nextStartFace, forcedParent, nameID, self) File "C:\Users\***[removed]***\AppData\Roaming\Blender Foundation\Blender\2.77\scripts\addons\babylon-js\mesh.py", line 144, in __init__ recipe = BakingRecipe(object) File "C:\Users\***[removed]***\AppData\Roaming\Blender Foundation\Blender\2.77\scripts\addons\babylon-js\material.py", line 199, in __init__ self.backFaceCulling &= material.game_settings.use_backface_culling ERROR: 'NoneType' object has no attribute 'game_settings' ========= end of processing ========= elapsed time: 0 min, 0.01 secs
  9. Blender export error

    Didn't realize you could have the exporter versions at the same time like that. I will give 5.0 a shot here in a bit. I'm pretty new to blender, babylon, and python. lol. I'm willing to dig in and get my hands dirty though. I'm using babylon 2.4 at the moment. Are there any big differences between 5.0 and 4.6.1? or circumstances where 4.6.1 should be used instead of 5.0? the blend file probably started as an older version then I modified it and savedAs it several times as I made progress with the model--creating a bunch of backups being so new to blender.
  10. Blender export error

    Seems I got it to work, not sure if it is the best solution, but I made a few changes to the exporter addon script to skip the null materials. I have no idea why the material object is null though. I figured out that there were two materials attempting to be exported. I only added one that I know of. One of the materials was correct and the other was the null one causing problems. starting at line #793: for slot in object.material_slots: #------ my change---------- if slot.material is None: continue #-------------------------- # None will be returned when either the first encounter or must be unique due to baked textures material = exporter.getMaterial(slot.name) if (material != None): Main.log('registered as also a user of material: ' + slot.name, 2) else: material = StdMaterial(slot, exporter, object) exporter.materials.append(material) and at line #1872: for material_slot in mesh.material_slots: # a material slot is not a reference to an actual material; need to look up material = material_slot.material #------------ my change ----------- if material is None: continue #---------------------------------- self.backFaceCulling &= material.game_settings.use_backface_culling I attached the modified script. Let me know if you guys think I should make a pull request on github or something. Seems to work, but i'm not sure if there are any unintended consequences. I probably should have taken a look at the 5.0 version of the exporter. Not sure if that would play nice with my babylon js version though. io_export_babylon.py
  11. Blender export error

    I'm getting an error when trying to export from blender. It exported fine until I added a UV mapped texture material to the model. Here's the log file: Exporter version: 4.6.1, Blender version: 2.77 (sub 0) ========= Conversion from Blender to Babylon.js ========= Scene settings used: selected layers only: false flat shading entire scene: false inline textures: false texture directory: C:\data\web\html5game\models\soldier\ Python World class constructor completed processing begun of skeleton: ArmLow, id: 0 processing begun of bone: Hip, index: 0 processing begun of bone: Back, index: 1 processing begun of bone: Shoulder.Left, index: 2 processing begun of bone: Upperarm.Left, index: 3 processing begun of bone: Forearm.Left, index: 4 processing begun of bone: Hand.Left, index: 5 processing begun of bone: Head, index: 6 processing begun of bone: Shoulder.Right, index: 7 processing begun of bone: Upperarm.Right, index: 8 processing begun of bone: Forearm.Right, index: 9 processing begun of bone: Hand.Right, index: 10 processing begun of bone: Thigh.Left, index: 11 processing begun of bone: Shin.Left, index: 12 processing begun of bone: Foot.Left, index: 13 processing begun of bone: Thigh.Right, index: 14 processing begun of bone: Shin.Right, index: 15 processing begun of bone: Foot.Right, index: 16 processing begun of mesh: HumanLow ========= An error was encountered ========= File "C:\Program Files\Blender Foundation\Blender\2.77\scripts\addons\io_export_babylon.py", line 330, in execute mesh = Mesh(object, scene, nextStartFace, forcedParent, nameID, self) File "C:\Program Files\Blender Foundation\Blender\2.77\scripts\addons\io_export_babylon.py", line 780, in __init__ recipe = BakingRecipe(object) File "C:\Program Files\Blender Foundation\Blender\2.77\scripts\addons\io_export_babylon.py", line 1872, in __init__ self.backFaceCulling &= material.game_settings.use_backface_culling ERROR: 'NoneType' object has no attribute 'game_settings' ========= end of processing ========= elapsed time: 0 min, 0.01 secs I tried commenting out the "self.backFaceCulling" line in the python addon script but it appears that 'material_slot.material' is a null value and it just threw the same error on the next if statement. for material_slot in mesh.material_slots: # a material slot is not a reference to an actual material; need to look up material = material_slot.material self.backFaceCulling &= material.game_settings.use_backface_culling # testing for Cycles renderer has to be different if material.use_nodes == True: self.needsBaking = True self.cyclesRender = True self.nodeTrees.append(material.node_tree) I am using blender render. I attached the blend file. Not sure what else to try. soldier_armature_2.blend