fumanshoo Posted November 24, 2012 Share Posted November 24, 2012 so I made this in Blender really quick and it only has one bone but when I play the animation in the model viewer, the bone moves but the mesh does not. I can assure you that the mesh is parented in Blender. That's why the mesh is red. But I don't see why my mesh is not moving forward... The animation is simple by the way. The mesh SHOULD move back and forth between 0-31 frames. Here's a pic to give you guys a better look at it... Quote Link to comment Share on other sites More sharing options...
Josh Posted November 24, 2012 Share Posted November 24, 2012 http://www.leadwerks.com/werkspace/page/tutorials/_/programming/introduction-to-animation-r11 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
fumanshoo Posted November 24, 2012 Author Share Posted November 24, 2012 Ahhh thank you. Wish I had found this source earlier. I never put skinning into account. I didn't think it would matter so much, but now I understand why. gonna test this out immediately. Quote Link to comment Share on other sites More sharing options...
fumanshoo Posted November 24, 2012 Author Share Posted November 24, 2012 Ok, I don't see what i'm doing wrong here. I have imported an .obj into the Leadwerks which of course doesn't have animation but it works fine with normal maps and everything. I import the .fbx with the required texture, shader and shadowshader but I still come up with wieghts as textures and no animation. The bones still move though. I went through the same process for both of them when I added textures, materials, ect. Here's an image of what i've done to give you a better look at it... I did notice that the .fbx animation failure was not named Mesh at the top of the side panel but rather Mesh:SKIN_MESH. Does this mean that I have applied the skinning properly? I don't see how i'm not getting this right... Quote Link to comment Share on other sites More sharing options...
macklebee Posted November 24, 2012 Share Posted November 24, 2012 The brick anim.gmf does not have a material assigned. You need to have dirtied bricks.mat listed - means you are not exporting as a FBX correctly I would imagine. And when you get that working then you have to use a skin shader, like you have been told before to use and what is also shown in the link above from Josh. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
fumanshoo Posted November 24, 2012 Author Share Posted November 24, 2012 Well that's the thing! As I said, I'm exporting the .fbx and the .obj with the same materials/procedures and it should be there, but it's just not showing up. I applied the dirtied bricks.mat to the brick in blender and then exported it as .fbx. The proper .mat files are listed in the same folder as the .fbx and the .fbx has been converted into a .gmf. I don't see what i'm doing wrong here... Quote Link to comment Share on other sites More sharing options...
macklebee Posted November 24, 2012 Share Posted November 24, 2012 Could be a problem with the blender fbx exporter or with the way you are doing it... dunno because i dont use blender. You can try another format as there are other available converters in the Tools folder. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
fumanshoo Posted November 24, 2012 Author Share Posted November 24, 2012 I just exported it fine in .fbx with textures, but the bones are missing along with the animation. This is frustrating. In that case, which do you recommend other than .fbx and .obj? 3dw and 3dsx are not supported in Blender by default and plugins are usually more confusing than they should be with Blender. Does 3dw and edsx support animation? I'm not doing .obj because it doesn't support animation... I've got the .fbx with textures but without animation or even bones but the weird thing was that I used the EXACT same procedure. I think you're right. The .fbx converter could be screwed. I cant wait for my check so I can get UU3D. I don't know how much it'll help, but at least i'll be able to see what the hell i'm exporting. Quote Link to comment Share on other sites More sharing options...
fumanshoo Posted November 24, 2012 Author Share Posted November 24, 2012 maybe if i export .dae then to .fbx. That way I don't have to use Blender's .fbx converter... but I don't know if Blender supports .dae yet. Guess it's time to find out... Quote Link to comment Share on other sites More sharing options...
fumanshoo Posted November 24, 2012 Author Share Posted November 24, 2012 ok, so I tried that. I exported the brick from Blender as a .dae file and when I tried to use the dae2fbx converter, it sort of just did nothing... It pulled up a window like it was about to do something, but the window quickly went away and didn't convert anything... Quote Link to comment Share on other sites More sharing options...
Wchris Posted November 24, 2012 Share Posted November 24, 2012 That's why the mesh is red. But I don't see why my mesh is not moving forward... Hello, I'll try to take 5min to help because you look motivated and I like motivated people, it's good for my own motivation that sometimes falls down. Usually red skin indicates wrong shader. first :modelviewer show you have bones and frames so this is ok, but you did not activate View - Hierarchy so we don"t see them and the screenshot and don"t know if they are still well positioned ans sized. second : you don't need to parent anything, animation is done by a skin shader that simply makes the mesh follow the closest bone. Open surface1 and surface2 in modelviewer then get the corresponding mat file name and open it to post the content here. it should look like this : texture0="abstract::naf73_occlusion.dds" clamp0=0,0,0 texture1="abstract::naf73_normalsdot3.dds" clamp1=0,0,0 blend=0 depthmask=1 depthtest=1 overlay=0 zsort=0 cullface=1 castshadows=1 specular=0.30000000 bumpscale=1.00000000 gloss=0.500000000 shader="abstract::mesh_diffuse_bumpmap_skin.vert","abstract::mesh_diffuse_bumpmap_specular.frag" shadowshader="abstract::mesh_shadow_skin.vert","" with _skin in the shader name Cheers. 1 Quote Windows 7 home - 32 bits Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM Link to comment Share on other sites More sharing options...
Canardia Posted November 24, 2012 Share Posted November 24, 2012 I just tested Blender 2.64a and made a moving animated cube with a texture, and it works fine in LE2.5. Here are the steps I did: 1) Create cube in Blender, and animate it a bit, and assign UVmap, material and texture to it. 2) Export as fbx from Blender (export selected cube only, other options default). 3) Create animcube.mat file: texture0="abstract::animcube.dds" shader="abstract::mesh_diffuse_bumpmap_skin.vert","abstract::mesh_diffuse.frag" 4) Drag animcube.fbx with the mouse over fbx2gmf.exe. 5) Drag animcube.gmf with the mouse over ModelViewer.exe Now I can see a textured and animated cube in ModelViewer: Here are the files I made: le2blenderanimfbx.7z.zip Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
fumanshoo Posted November 24, 2012 Author Share Posted November 24, 2012 @ Metatron: you're ONLY exporting the cube? Not the bone that you assigned to the cube? This could have been where I was mistaken. Quote Link to comment Share on other sites More sharing options...
Canardia Posted November 24, 2012 Share Posted November 24, 2012 Blender has not much options in the fbx export, like I said above, I only used the default settings, except I selected the "export only selected" option. Blender makes the bones automatically when you click on the red record button and the bone button. Then you just move and rotate your cube how you want, and click on the timeline to assign it to the animation sequence. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
fumanshoo Posted November 24, 2012 Author Share Posted November 24, 2012 ahh, you didn't have a bone... But what if you have a mesh that uses bones such as the one in the first picture that I send? Would it still work? Quote Link to comment Share on other sites More sharing options...
fumanshoo Posted November 24, 2012 Author Share Posted November 24, 2012 Ok, I'm following the same exact procedures that you're doing. I'll make a video to prove it and If i'm screwing up, please explain what i've done wrong... Quote Link to comment Share on other sites More sharing options...
Canardia Posted November 25, 2012 Share Posted November 25, 2012 Remember, UVmap assignmet in Blender is the most imporant, because else the fbx file will have no material, and without material LE 2.5 can not load your .mat file automatically (you could still do it by code). Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
fumanshoo Posted November 25, 2012 Author Share Posted November 25, 2012 this video is gonna suck because Cam Studio just decided to stop working, so I'm using my iPhone. I don't have a tripod of any sort so I'm using one hand to do a two hand job haha. Ummm here's the video. If i'm doing anything wrong here, please tell me. This is one method I used to export the box/cube and it seems to work the best although it seems that if I select the box last in Blender, the outcome is that I also get materials... http://www.youtube.com/watch?v=3qfCfJ1C5xo&feature=plcp once again, sorry for the quality. I couldn't get my old software to work and I wasn't going for quality in the first place. I just wanted to show that I'm pretty sure that i'm doing it right... Quote Link to comment Share on other sites More sharing options...
Canardia Posted November 25, 2012 Share Posted November 25, 2012 You must start with Unwrap, which brings up the UV editor and then create the material and texture, else Blender doesn't assign the material to the cube, although it looks in Blender like if it was textured correctly. Your mat file also is missing the *skin shader. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
fumanshoo Posted November 26, 2012 Author Share Posted November 26, 2012 I did the unwrap before and after applying the texture and you're right. The texture comes up in the model viewer but the model it's self is still pretty red... It's progress but still imperfect. Now with the skin shader... What I do is I take my texture, which is 1024x1024 and convert it to DDS with MakeDDS. Then I use GenMat to create a MAT file... I come up with: texture0="abstract::dirtied bricks.dds" shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse.frag" Is this not how I get a skin shader? Quote Link to comment Share on other sites More sharing options...
fumanshoo Posted November 26, 2012 Author Share Posted November 26, 2012 oh, I see, I'm missing a shadowshader... Quote Link to comment Share on other sites More sharing options...
fumanshoo Posted November 26, 2012 Author Share Posted November 26, 2012 the link that Josh sent me was very insightful and I now understand a lot more about it but I just can't get the shadowshader... Quote Link to comment Share on other sites More sharing options...
macklebee Posted November 26, 2012 Share Posted November 26, 2012 texture0="abstract::dirtied bricks.dds" shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse.frag" Is this not how I get a skin shader? no. the material file needs the skin shader as shown in josh's link on animation, wchris' post, metatron's post, and the example that has been sent to you previously. the material file should look like this: texture0="abstract::dirtied bricks.dds" shader="abstract::mesh_skin_diffuse.vert","abstract::mesh_diffuse.frag" shadowshader="abstract::mesh_shadow_skin.vert","" Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
fumanshoo Posted November 26, 2012 Author Share Posted November 26, 2012 well that's what I mean. How do I get the shadowshader? I assume that you just use the texture ( dirtied bricks.jpg ) and then convert it to DDS and then into MAT Does it not automatically have the shadowshader when I do that? oh and sorry, I should have asked differently. When I asked that, I was referring to the line above it when I explained what I did in order to get that MAT file... Quote Link to comment Share on other sites More sharing options...
macklebee Posted November 26, 2012 Share Posted November 26, 2012 The material file is just a text file that the engine uses to assign textures and shaders to a mesh. All you need to do is to copy what I posted above into your dirtied bricks.mat file. i suggest you read this: Leadwerks User Guide as for how you created the mat file originally, the genmat.exe just creates generic material files for non-animated models. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.