gryff

Members
  • Content Count

    1362
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by gryff

  1. Well I'm not sure how much I can contribute to this thread - but I will try I've been playing with the .glTF format and found that I could load them in the Sandbox - so I thought I would try with @Mythros's .obj files. But first I imported them into Blender and re-exported as a .babylon file. That .babylon file worked fine in the Sandbox. So now I re-exported them from Blender as an .obj file and loaded the .obj file into the Sandbox and I got the result in image 1 (upper) - just the tree trunk. but the materials were present. So I started to make changes. First, in the leaf material, I changed the the value labelled as "alpha" from 0 ->1. The result, I could now see the "leaves" but extraneous stuff filled up all the planes - so no transparency I then scrolled down to the texture that was being used and looked at the "hasAlpha" value - Image 2(upper) which said "false" and changed that to 1. Result - tree was showing fine (Image 2 bottom) I went back to the babylon file I had created and look at the material parameters. {"name":"tree1.Mat17310","id":"tree1.Mat17310","ambient":[0.8,0.8,0.8],"diffuse":[0.64,0.64,0.64],"specular":[0.25,0.25,0.25],"emissive":[0,0,0],"specularPower":50,"alpha":1, "backFaceCulling":true,"checkReadyOnlyOnce":false,"maxSimultaneousLights":4, "diffuseTexture":{"name":"English_Oak_diffuse.png","level":1,"hasAlpha":1,"coordinatesMode":0,"uOffset":0,"vOffset":0,"uScale":1,"vScale":1,"uAng":0,"vAng":0,"wAng":0,"wrapU":1,"wrapV":1,"coordinatesIndex":0}}, NOTE the value for"alpha (line1) and "hasAlpha" (last line). I also tried to load @Mythros's original files into the Sandbox - they did not work. The leaves mesh was visible - but both the trunk and the leaves meshes both had a standard material. The Sandbox seemed to be ignoring the .mtl file. Examining the original .obj file I found this mtllib ./models/deciduous/01/deciduous01/deciduous01.mtl Changing that line to : mtllib deciduous01.mtl and it loaded and behaved just like my .obj export from Blender did. I'm not sure if this helps @RaananW, or @Deltakosh or @Mythros in figuring out the problem. Or did I just add more confusion? cheers, gryff
  2. @JCPalmer : Well I watch with interest Jeff. I just tweaked the color spread slider - which did not seem to differentiate between intra/inter to the casual observer. Mind you, can you produce something like this: Hair Streaks As I walk around downtown I see that there are many young ladies into that type of hair coloring cheers, gryff
  3. gryff

    Mirrored UV's

    @RelativeNull Well yes they are Compare these two scenes: Jack with Normal map Jack without normal map I deleted the normal texture from just the body - the face still the same in both models. By the way, the black hair has more verts and faces than the whole of the body The body mesh is not very good - no flow to the faces that you would get with lowpoly "box/edge" modelling And you still have issues with the bones and animation - 72 bones is way to many and the IK bones are not connected properly cheers gryff
  4. @JCPalmer : Well Jeff it does allow for the adding of er ... " platinum, glitter, wisdom or stress highlights"... that us old folk get cheers, gryff
  5. gryff

    Mirrored UV's

    @RelativeNull : thanks for the .blend file:) Now I'm trying to figure out what you mean by " you don't take into account mirrored UV " and what you see as the problem? Here is your character Jack that I exported from Blender but I changed one of the textures to have a green number 2 on the chest. (See image below) Jack Walk towards the character - the image is mirrored. nicely. (I suspect the body and face meshes were created using the mirror modifier. If you don't want the the textures to be mirrored you are going to have to re-uvMap the meshes.) There are other issues though with your model - meshes poking through each other, the ugly shading on parts of the mesh, bones that are not used or set up etc. cheers, gryff
  6. @Baker Xiao : As an additional thought it does not work in Firefox on my Windows XP machine (I know, I know). It throws this amongst the errors: #define NUM_BONE_INFLUENCERS 7 #define BonesPerMesh 42 @JCPalmer has explained the max number of bones issue - but the NUM_Bone_Influencers surprised me given the low poly nature of the mesh ( I normally work with 2-3). How was the rigged mesh created? cheers, gryff
  7. gryff

    Mirrored UV's

    @RelativeNull : yes be helpful to post your .blend file - it almost always is ! Ohh - and ignore @Deltakosh 's comments about me And welcome to the forum! cheers, gryff
  8. @Arte : Hi and welcome to the forum First time I used a skybox, I got those kind of behaviours. Try changing the "maxZ value for the camera. PG here Note line 12 that I added. Hope that helps. cheers, gryff
  9. @Michael3D : Hi and welcome to the forum. You might want to have a look at this example I created. Walk around in the maze Maze It uses a single point light attached to the camera and two hemi lights to provide up and down "fill" lighting (lighting the floor and ceiling parts). The point light uses a range not "radius" which you tried in your code I notice!! I set the range to 5, the intensity to 3 and diffuseColor to 0.4708,0.477,0.2397. Sometimes it takes a bit of playing around to get exactly what you want. cheers, gryff PS hi @dbawel : good to see you again - I've sent you a PM. gryff
  10. @mak11 : Hi and welcome to the forum Sorry for the slow response - I've been on vacation which will continue for a week or more. (Busy time of the year for me - friends and family reunions/gatherings ) Anyway, I took a look at your wyvern file which I got from OpenGameArt.Org (I hope that is the file you are using.) The issue seems to be one of the animations - "SpotAction". When I load it in the Action Editor I get the mess that is in the image below. I have no idea what it is doing or trying to do ?? It has to be deleted. Here is the process I would use: 1. Create a blank empty file in Blender - just a light (I use a Hemi), a camera looking down the Y-Axis and put the cursor at 0,0,0 (Shift C) 2. Now go File->Append-> and navigate to the file "wyvern.blend" on your computer and select it 3. Now, select Object->wyvern (not the wyvern Armature!) - and click the Append Button. This will add the mesh, armature and one animation (in my case "Hover") Now start adding more animations : 4. File->Append->Action->Fly Repeat for all the animations EXCEPT the "SpotAction" !! Now try exporting . Take a look at the wyvern flying One other thing you should note, in Blender turn on "backfaceculling" and the inside of the wings will disappear in the 3D window. The skin between the ribs of the wings are just one-sided so you will have to turn off back face culling with BJS. with code like this: var theSkin = newScene.getMaterialByName("wyvern1.WyvernSkin"); theSkin.backFaceCulling = false; Hope that helps. cheers, gryff
  11. @Bricktheworld : Agree with @V!nc3r and @Wingnut - that negative scale is an issue. Go with V!inc3r's suggested methods but let me add a couple of additional suggestions 1. The animations, if they are meant to be applied to just one object rather then instead of, for example, Seat.000Action use Seat.0000-Action. Note the added hyphen. It means that the animation will only be applied to the object named Seat.0000 and you won;'t see this in your .babylon file : "ranges":[{"name":"CanopyInterior.000Action","from":0,"to":3},{"name":"Fuselage.002Action","from":10,"to":13},{"name":"Greeble.001Action","from":20,"to":23},{"name":"Seat.000Action","from":30,"to":33},{"name":"TopWing.000Action","from":40,"to":43}] All animations applied to all objects. 2. And this is a suggestion until you have it solved use a Hemi lamp getting the meshes right will not be complicated by light and dark side of meshes good luck. cheers, gryff
  12. @Chrislistens : I gather you still are having problems. Can you post your .babylon file, and if you created the scene at .clara.io can you export it as a .blend file and post that too (if it does not cost you money) cheers, gryff
  13. @JCPalmer : Nice Jeff. As for the close up view - a skull cap the same as hair colour, or maybe just a different material on the mesh where the hair is. One day I must look at this QI closely and try and understand it cheers, gryff
  14. @Sophie C Thanks for the file She is a big lady!! I will take a look at a couple of possibilities to see how we might fix her. As I said before, the issue is going to be with the translation of the hip bone in the animation. I have a couple of ideas - but no guarantees. cheers, gryff
  15. @Chrislistens Hi and welcome to the forum I tested your HTML code with a simple sphere and plane I created with Blender and it worked fine - just changed the script for BJS to one I have on my local server. Did you include a camera and light? If I remove the camera from my Blender scene then it hangs at the line below when I try to load that with your script: newScene.activeCamera.attachControl(canvas); cheers, gryff
  16. @Sophie C : that is why I wanted to look at your .blend file. There can be other issues and further scale reduction is one of them. It won't cause "spaghetti" but you can see weirdness in the animation where there are translations involved (walk animations for example). They won't get scaled with the rig and the mesh. If you could post your .blend file (fixed) here ... or if you want through a private message ... so much easier to have an actual case to work with. cheers, gryff
  17. @Sophie C : Ahh the "Spaghetti Monster". First saw this over three years ago The image below is of a free Mixamo mesh(Zed) and rig imported into Blender. Upper part of the image highlights the Armature(Rig), the lower part the mesh. Three things to point out: A. the origins of the mesh and rig are different B. the rotations of mesh and rig are different C. the scales of mesh and rig are different. This needs to be fixed otherwise you will get the kind of result you are getting. Zed is one of the worst examples I have seen. Rather than try to give general instructions, could you post your blend file so that I can suggest fixes for your particular case. cheers, gryff
  18. @aponty : No offense taken - as I said I am not in the same coding league as a lot of people around here I'm glad you are progressing with Wingy's ideas @Wingnut : And yeah, the jump is not exciting or parabolic. However, if I was trying to build a "Commander Keen" game I would probably play with animations, and the value of gravity etc. By the way the little "Iggy" that I'm using for an icon under my name - you should that dog jump - almost straight up cheers, gryff
  19. @aponty : I I'm curious about whether you need to use physics. Will it be part of something more complex? Or could you just use gravity and collisions with normal BJS functionality? Jump Example Spacebar to jump. And I was also curious about your nic - but I had to look after some dogs for the day so my response is delayed I'm a crap coder so I'm sure it can be improved - with the ActionManager maybe? @Wingnut: Ok so what is with this I can't find any reference in the docs cheers, gryff
  20. @Deltakosh, @Dad72, and @satguru Well here is Vincent again using the latest preview version of BJS ( which I have renamed to "babylon.3.1-alpha1.js" to avoid overwriting my previous version which I know worked fine) New Vincent I also checked the .log file for vertex influencers (bones I assume) Avg # of influencers per vertex: 1.1592 Highest # of influencers observed: 2, num vertices with this: 776 exported as 2 influencers Nothing extraordinary there. cheers, gryff
  21. Ahh Wingy, but looking at my local test server, which has problems and fixes by poster, there are names I have never see since there first couple of posts. Students maybe? cheers, gryff
  22. @satguru and @Deltakosh : hmm the version I posted above Vincent uses BJS 3.1 that I downloaded about a week ago. So maybe changes since then ?? cheers, gryff
  23. @mecanicus : What version of the exporter are you using? And posting your.blend file would help, so that it is possible to see what you are trying to accomplish. cheers, gryff
  24. @phaselock : I don't know if you are still interested in using Blender but here is an example I created using Blender and some simple javascript code (I'm not a very good coder ) : Hexagons1 Using the array modifier is going to create a single mesh (as you found), so I used Blender's particle system to layout the hexagons on a plane. Then I "baked" out the meshes as instances.- so they all have the same material In the javascript code I then replaced some of the instances with new instances with a different material, then repeated this procedure by creating more new instances with another new material taking care not to overwrite the instances from the first replacement. It works fine. There are 4 drawcalls - three for the tree groups of hexagons and one for a tiny cube that is used as the target for the arcRotate camera (look underneath the hexagons). cheers, gryff
  25. @phaselock : Hi and welcome to the forum. Well here are a couple of ways you might get your tiles. I'm using an example of six meshes - 5 "rocks" and a cube exported from Blender. The white cube, which you can just under the rock at the centre, is the parent to the five rocks (for the animation). But if your tiles have no parent and there are no other meshes to confuse the issue then : PlayGround 1 The important lines are 27-35. The "action" I take on these meshes is to print out each mesh name to the browser console (line 34) you can add one or more lines of code to set your tile properties. Now if you have other meshes beside the "tiles", in Blender you can create a parent just for the tile meshes. I created a cube but you can use an "empty". Then when the file loads into BJS get that parent mesh (in my case the cube) and then get its children (line 25 - 39). Again replace the line (37)where I print out the mesh name with your code to set the mesh properties. PlayGround2 Others may have different ways - I tend to use these. Hope that helps. cheers, gryff