Jump to content

Parenting the Bone? I think?


fumanshoo
 Share

Recommended Posts

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...

 

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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.

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

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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 smile.png 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.

post-44-0-88944200-1353748768_thumb.jpg

 

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.

  • Upvote 1

Windows 7 home - 32 bits

Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM

Link to comment
Share on other sites

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:

post-2-0-12411600-1353758405_thumb.png

 

Here are the files I made:

le2blenderanimfbx.7z.zip

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

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.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

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).

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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",""

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

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...

Link to comment
Share on other sites

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.

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...