Jump to content

Blender exporter available


Josh
 Share

Recommended Posts

Hi guys,

 

I have received a release candidate of the Leadwerks exporter for Blender:

https://github.com/alrusdi/leadwerks-blender-exporter

 

Please put this through the wringer and let me know if you have any problems. This should work with animated and static models, and will export materials automatically.

  • Upvote 6

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

No problems in the Linux version of Blender 2.70A. I add the folder titled "io_scene_leadwerks" under Blender's Scripts / Addon folder.

The Leadwerks exporter is there in the export options.

 

Test tommorrow on how it works...

post-11675-0-42239200-1402094676.png

Link to comment
Share on other sites

alrusdi : default material produced with expot.

Default material in blender is white - so result is correct. The reason why default cube in blender viewport looks gray is lighting. But Leadwerks is not supporting lights to be defined in .mdl so they are not exported. You can ensure it by comparing the color you choosen as diffuse in materail editor and its color in viewport. Viewport color is little bit darker and depends on light energy.

Link to comment
Share on other sites

2.70A Blender Linux version, 64 bit.

Default Blender Render (not Cycles)

 

Everthing appears to be working correctly in the exporter as far as exporting the model and texture files. I included a image of the files that are exported (bottom image). I left the texture names at Blender's default.

 

What appears not to be work correctly is that the exporter only sees the default model folders under "My Game\Models" Any added user model folders do not appear. You can not export directly to a user created model folder created under Leadwerks. This could be working in Windows but does not seem to be working in the Linux version. I included a image showing only the default "My Game" folders, my user created model folders do not appear in the list when using the Blender exporter.

 

Also I included a image of my user created My Game\ Models\ Creature folder after importing the model and textures by copying and pasting the said exported files into my Leadwerks Creature folder. All the necessary files are created.

 

Another small test>>> Choosing " Export only Selected Objects " in the Exporter options works correctly.

 

It was an overall simple test...

post-11675-0-27025200-1402162228.png

post-11675-0-76147100-1402162246.png

post-11675-0-21884000-1402162262.png

Link to comment
Share on other sites

Test 2:

I noticed in the exported material file when using the Blender exporter, that the exporter puts the specular map in Texture slot 4 after the displacement slot instead of slot 2 which is the specular texture slot in Leadwerks.

 

In order to test this I renamed the texture files to Color \ Normal \ Specular in Blender. In Blender the files are setup correctly. Blender sees them as color, normal and specular maps respectively.

Image included of the material mat file created by the exporter.

 

I also included the blend file with the textures packed into the blend file. Let me know if they are not.

Very simple model from 3DCoat used to test. I created a normal map but did not add any details but it still a normal map.

 

EDIT::: Ah I found the problem the material mat file uses just the "diffuse+normal shader instead of the diffuse+normal+ specular shader. I had seen that but just did not connect the dots...blink.png So it appears for now the exporter does not recognize the specular map in Blender as being a spec map and add the correct shader in the exported material mat file.

post-11675-0-27282700-1402165968.png

creature.blend.zip

Link to comment
Share on other sites

Thank you for detailed report digman!

 

About texture placemant:

I can not reproduce this bug. Model from your creature.blend is exported perfectly to any folder i wish on my linux system (if writing to it is allowed of course). Can you provide more depth explanation of what you do and what expecting to achieve?

 

About Specular map:

I found that you are use Intencity checkbox to mark texture to mark texture as Specular. Is it correct? Exporter is using Color checkbox instead of Intencity. It's probably correct way will be to test both checkboxes and it is will be fixed.

Link to comment
Share on other sites

Thank you for detailed report digman!

 

About texture placemant:

I can not reproduce this bug. Model from your creature.blend is exported perfectly to any folder i wish on my linux system (if writing to it is allowed of course). Can you provide more depth explanation of what you do and what expecting to achieve?

 

About Specular map:

I found that you are use Intencity checkbox to mark texture to mark texture as Specular. Is it correct? Exporter is using Color checkbox instead of Intencity. It's probably correct way will be to test both checkboxes and it is will be fixed.

 

First, thanks for replying to these reports...

 

About texture placement

This was a user error on my part. My user created files appear when I navigate to the Documents / Leadwerks / MyGame / Models folder.

I was by mistake navigating to the install folder of Leadwerks instead. Leadwerks writes to the Documents folder your user created folders and not the install folder. Your relpy made cause me to think ok what is going on here, I knew about the documents folder but had a memory lapse... blink.pngrolleyes.gif

 

"About Specularmap"

I am not quite sure what you are asking here... I uploaded an image to show you that the specular map is correctly set in Blender under the influence tab. The color and normal map are correctly checked as well under the influence tab (not shown in the picture). Check the 3 textures yourself under the influence tab in my blend file and you will see all three textures are correctly set.

 

Edit: Ok, I think I understand now and will check color as well as intensity for the specular map under the influence tab and then report back here...

 

Edit 2: If I also check color for the specular texture under the influence tab then the specular is put in texture slot 2 in the material mat file. This is correct.

 

By default Blender adds the intensity check mark for imported models that have a specular texture. The creature model was imported from 3DCoat with a diffuse, normal and specular map. I had assumed the exporter would recognize the intensity channel as well for a specular map...

 

The color channel under the influence tab affects the influence of specular color on glossy surfaces by the scene lamps (lights). This I do not think would have any effect in leadwerks as you are just trying to export the specular map as is. As long as the the specular map is correctly exported either by the specular intensity or color channel, then I do not think it matters but the user would need to know that he has to check the color channel and the intensity channel would be the incorrect choice as far as the exporter is concerned. This though would cause you to have to check the color channel on all imported models that have a specular texture map. If the exporter can also just recognize the intensity channel that would be helpful and save time for the Blender user.

post-11675-0-18166800-1402242234_thumb.png

Link to comment
Share on other sites

What is animation steps on export option ?

 

It is an optimization. Because we can't use real keyframes (format limit) it's required to write full matrix info for each bone for each single frame in animation. In most cases it is overhead and just enought not to write frames with some reasonable step. If you have very long animation it's good to increase this step. For very short animations step=1 can be used.

Link to comment
Share on other sites

Linux Blender version 2.70A.

 

I am aware as you stated that real keyframes are not being written. I am going by the animated sequence numbers in the model editor.

When I use step=1 the sequence numbers are the same as my animation keyframes.

When I use step=2 the sequence numbers are halve.

 

Question... Does that mean that every other keyframe in my animation is not being written to the bone matrix info or is it just an internal optimizing of the keyframes for the full matrix info for each bone or in other words a form of interpolation to reduce overhead.

 

What do you consider a long animation. A walk cycle can be about 24 frames but you will have lots of character animations in the same Leadwerks model file. You will call each animation sequence range as needed from the script. I am not a programmer but I know you call for the sequence number range in a script.

------------------------------------------------------------

I am having a few problems exporting some animations out of Blender but will make sure It is not user error before posting here tomorrow.

 

Also right now with the Leadwerks linux model editor not rendering the entire model but only part of the animated model depending upon which sequence number is being playing, it's hard to see what is really going on. I really do hope that is fixed in the next update.

 

By the way, a big thanks for the implementing the specular Intensity channel in the exporter without having to select the color channel as well in the influence tab. biggrin.png

Link to comment
Share on other sites

What do you consider a long animation. A walk cycle can be about 24 frames but you will have lots of character animations in the same Leadwerks model file. You will call each animation sequence range as needed from the script. I am not a programmer but I know you call for the sequence number range in a script.

 

 

I would also need more info on that. FBX export worked pretty well, all my animation keys, were exported could the total track lenght be 200 or 400 length steps for example. What is the difference with standard FBX exporter ?

Why there should be a limit , it's only keyframes info ?

Stop toying and make games

Link to comment
Share on other sites

 

Question... Does that mean that every other keyframe in my animation is not being written to the bone matrix info or is it just an internal optimizing of the keyframes for the full matrix info for each bone or in other words a form of interpolation to reduce overhead.

 

What do you consider a long animation. A walk cycle can be about 24 frames but you will have lots of character animations in the same Leadwerks model file. You will call each animation sequence range as needed from the script. I am not a programmer but I know you call for the sequence number range in a script.

 

Long animation is animation with big amount of frames between first and last frame. As you know Blender is automaticaly interpolating flames between keyframes.You can have just two keyframes in animation which is starts at frame 1 and ending at 1500, so with step=1 you will have 1500 frames. This will take an ages to export and then load to Leadwerks. But with step=100 you will have just 1500/100=150 frames doing almost the same.

 

If your walk cycle animation have 24 keyframes and starts at frame=1 and ending at frame=240 - best step is probably step=10 but you can try to set step=20 - as result you will have 12 frames after export and can visually detect if animation is smooth enought to reflect your requirements.

 

 

I am having a few problems exporting some animations out of Blender but will make sure It is not user error before posting here tomorrow.

 

Can't wait for report.

Link to comment
Share on other sites

Why there should be a limit , it's only keyframes info ?

 

There no limit of how much animation frames you can save. If you want each frame to be written - just pass Animation step=1, but it will be an overhead which can be significant on complex rigs(skeletons/armatures)

Link to comment
Share on other sites

just pass Animation step=1, but it will be an overhead which can be significant on complex rigs(skeletons/armatures)

 

 

Generaly if i have 240 frames for examples, a lot are used, for example i can have some 15 keyframes in the intervall 1-60 for walk animation, , i must keep 1-60 to be able to work clearly, sometimes i can have 5 keyframes on intervall 70-90 for example.

Putting 5 keyframes on intervall 1-500 for example is people that don't know how to work with animation.

 

With simple FBX export i exported each time all animations, and didn't had any problem of overhead ot whatever.

People will have to be aware that using this reduction option can downgrade their animation quality, anyway good we can keep it at value 1.

Stop toying and make games

Link to comment
Share on other sites

Linux Blender 64 bit, 2.70A

 

First, I got the animations working correctly but then at times exporting the same animation to a different folder the animation is not exported. Also I have to reapply the material mat before the model picks up on the scene lighting.

 

I can not though make this an official bug report as Linux Leadwerks has a a few possible bugs that have been reported.

 

When the new Linux update is ready I will retest to see if is a leadwerks problem or a exporter problem. I think by that time the addon will be released but testing can still happen of course.

 

FBX animation works perfectly everytime just to give you a heads up.

 

I will include the blend file and FBX file if you care to test. The FBX file needs it textures to be set up manually in the material editor.

In the blend file I forgot to set the step to "step=1" it is set on 5. Be sure to change it back before exporting the animation. I was just testing and forgot to make the change before saving the blend file. Also you can open up the action editor to see the animation line with keyframes.

 

Very simple 4 bone animation for testing purposes, 24 frames and only 2 keyframes. I like to keep things simple first, solve problems there and then move on to more complex testing. I found most times that a simple test can help solve a problem without having all the overhead of a complex test first.

 

If your testing has no problems then I would think that is possible that my Leadwerks is not functioning properly. I will do a complete clean install when the new update is released.

---------------------------------------------------------------------------------------------------------------------

 

Last topic...

 

Since Keyframes are set on extremes, passing positions and inbetweens, Those are your major keyframes that are the underlying base of your animations. Other keyframes are added of course.

 

Question... Does the Steppng ignore set keyframes and only interpolate the frames between the keyframes of your animation. This is important to know.

Desktop.zip

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