travnick / cryblend Goto Github PK
View Code? Open in Web Editor NEWCryEngine3 Utilities and Exporter for Blender
Home Page: http://travnick.github.io/CryBlend/
CryEngine3 Utilities and Exporter for Blender
Home Page: http://travnick.github.io/CryBlend/
I think the paths in mtl should be realtive but now its something like this:
D:\Prace\Dropbox\Grafika\Modele\GC....\Tekstury\metal\blachy_powtarzalne\blacha_powtarzalna_12.dds
Should be only:
....\Tekstury\metal\blachy_powtarzalne\blacha_powtarzalna_12.dds
blender 2.67a cryblend 4.8.3 cryengine 3.4.5
Just a general rework of the conventions/procedures followed by CryBlend currently. This will include fakebone removal, a new animation management system, a mesh cleanup system, a warnings/error log, new UI, consolidated/improved tools, and better support for items like FPS/CHR/Vehicles/Entities/etc.
I am going to upload what I have so far but it is not finished so it is not fully functional yet. Before I continue work on this I intend to finish up v4.13.
Code that handles configuration should be improved.
This is small, but I've noticed that CryBlend errors/warnings can be easy to overlook, in the console, because they are interwoven with CryBlend output. They should be placed at the bottom of the console for easy viewing.
What do you guys think?
Tiff was planed to delete after export. I suggest to add button to save them in export directory, because sometimes they are needed.
Thought I'd throw this up here too. I will start a list and post the link here once I do. Please, feel free to contribute your own errors and solutions. I ask only that the same formatting is used throughout and that if you have an error, you of course also have a solution. If you do not have a solution but would like to get to the root of it, post it here for everyone to view and we can investigate. Thanks guys!
Materials in Blender are composed of 4 parts: diffuse, specular, ambient, and emit. Diffuse and Specular both use RGB coordinates. But there is also an "intensity" option underneath the color, which allows you to lighten/darken the material. CryBlend currently doesn't consider the intensity of the color. Should I add this in as a factor. In other words, if the intensity is .5 and the RGB coordinates are (1, 0, 0) shouldn't CryBlend export (.5, 0, 0) to factor in the intensity?
bpy.ops.mesh.uv_texture_add executes on currently active/selected object instead of object_ that is inspected in code.
Try to improve CryBlend UI.
I'm not sure why this is but I have tested it and it has been reported on the forums that the following error message (see image) is the result of the following bone naming scheme:
Bone --> Bone.001 --> Bone.002 ------ This does not work for some reason.
Bone.001 --> Bone.002 --> Bone.003 ------ But this does.
What is weird about this is I just successfully exported a .chr that generated no errors with a bone naming scheme along the lines of:
hips, chest, hand.L, hand.R, etc.
I don't know too much about how CryBlend handle's bones so I thought I would put it out there as a possible error to correct.
Stardidi might be interested in this.
Now we have something like this: ../../../Textures/(...)
and it doesn't workfor Cry.
Should be Textures/(...)
CryBlend could take an educated guess at what you are aiming to export based on what it finds in the scene graph. This should not override current UI which allows the export type to be manually selected.
When converting images to DDS, CryBlend should automatically check if there is any *_ddn.tif file, so that it can invert the green channel.
Hi guys I thought I'd post this here in case anyone had any requests/suggestions or helpful information. When I start I will post links here and anyone is free to review/edit my work and criticize/comment. The tutorials will contain type and images and be step-by-step.
When you export you object there are many check boxes and it's not clear if they interact each other.
I thought I'd make a separate issue for this as it doesn't really fall under ground alignment / FP weapons. I am currently working on redoing the animation system, and I will post my updates and other things I find out here.
I may have figured out a way to remove the need for fakebones, so I'll give that a shot, as it will decrease both code and user complexity.
Some things that I have come across:
If you want to have a space in a bone name, you need to use this syntax as the name if the name is "Bone Name":
The name used in the scene node's
"id"/"name"=Bone_Name--PRprops_name=Bone_Name__
Animation's
target="Bone_Name--PRprops_name=Bone_Name__/translation.Y"
The object's geometry
id="Bone_Name"
In the visual scene, all transforms are relative to the origin, whereas in an animation they are relative to the parent bone.
TBC
Now add material physics options are available from the drop down "Material Specials" menu, which can be found in the "Materials" tab. This was done for ease of use. Before, you had to add material physics through the CryBlend menu, which was not very convenient but now you can add it directly from the Materials tab. Screenshot:
Instead of appending strings by '+=' use lists to join strings.
There are some tests: http://www.skymind.com/~ocrow/python_string/
This is a work in progress. I currently have the capabilities of exporting a character, without fakebones, to the engine and which is running animation. The skeleton loads in fine, however the animation is still a bit messed up. I think this is a space issue and shouldn't be too bad to fix.
This will mean no fakebones necessary whatsoever and no fakebone keyframing. It also opens the door to scale animation support and f-curve/interpolation support.
It also means that you can create an animation and not have to worry about exporting the base skeleton first since it can be exported at any point without getting messed up. Unfortunately, the system I am using still does not support multiple animations in one .blend file, but it is a solid start! :)
Exporting files using the 3.5.3 rc.exe does not work. The rc.exe crashes during the export and does not return any resultant files.
However, the same file exported with the 3.4.5 rc.exe returns a working file compatible with the CryEngine 3.5.3 (suggesting either the model files have not changed or the CryEngine 3.5.3 has legacy support).
The problem is therefore with the format of the .dae files. Seen as switching the CryPhysics.dll files (between 3.5.3 and 3.4.5) or exporting an object with no materials removes the problem, the problem clearly lies with the material physics extensions i.e. __physDefault, __physNone, __physObstruct, etc.
Seen as these extensions are written directly into the .dae file, all we need to do is tell the community what new extensions to use (unless the problem is something else entirely).
If file does not exist user has to be warned.
Cryengine cannot read
<Texture Map="NormalMap" File="
It should be like this to work properly:
<Texture Map="Bumpmap" File="...
blender 2.67a cryblend 4.8.3 cryengine 3.4.5
While i trying to save .dae and .cgf into exported blender file location i have no mtl file. In any other location it is ok.
blender 2.67a cryblend 4.8.3 cryengine 3.4.5
While I accidently uses 2 diffuses i get no info about it and mtl have no textures or in another try only one diffuse.
I think it should be any warning in this case.
Blender uses PEP 8 for python code.
http://www.python.org/dev/peps/pep-0008/
http://www.blender.org/documentation/blender_python_api_2_69_7/info_best_practice.html
Code has to be cleaned up and refactored.
Long functions should be split up names must be reviewed and changed.
A lot of people have been complaining about this...CryBlend can list overweight and underweight vertices but provides no method for eliminating them. I apologize, I'm not familiar with the procedures for proposing new code so I thought I would post my suggested method in place of the two existing methods:
class Correct_Weights(bpy.types.Operator):
bl_label = "Correct Overweight Vertices"
bl_idname = "mesh_rep.overweight"
def execute(self, context):
obj = bpy.context.active_object
if obj.type == 'MESH':
for v in obj.data.vertices:
v.select = False
totalWeight = 0
for g in v.groups:
totalWeight += g.weight
#If overweight...
if totalWeight > 1:
cbPrint("Vertex at " + str(v.co) + " has a weight of "
+ str(totalWeight))
#If underweight...
elif totalWeight < 1:
cbPrint("Vertex at " + str(v.co) + " has a weight of "
+ str(totalWeight))
#Weight Correction:
#First Pass
num_groups = len(v.groups)
difference = 1 - totalWeight
factor = difference / num_groups
newTotalWeight = 0
for g in v.groups:
g.weight += factor
newTotalWeight += g.weight
#Second Pass - to eliminate possible precision error
newDifference = 1 - newTotalWeight
newFactor = newDifference / num_groups
v.groups[0].weight += factor
cbPrint("Corrections administered.")
return {'FINISHED'}
Currently to add fake bone key frames you have to manually select each key frame and choose the tool option 'Add Fakebone Keyframe'. This is inconvenient if you have a large amount of key frames. Why not remove this tool and add another tool, which automatically adds a fake bone key frame for each key frame in the animation?
CryEngine gets DDS so if you have other format (png, jpg etc.) as a texture in blender then you have to convert them manually to DDS and after that modify mtl file.
This feature will convert images automatically so after exporting object will work without any additional work.
Currently lack of UVs are automagically fixed but this may cause unwanted behavior for user: 0012de0506b92e2ea7f4373493042d5a3bfb203/io_export_cryblend/export.py#L1264
What about displaying error/warning for user?
We cal also use smartuv operator instead of that simple one.
Is the Latest version compatible with Blender 2.7?
I'm trying to get it working (I prefer to not run multiple versions of Blender if at all possible). It doesn't seem to appear in the addons list, so I am just curious if I am wasting my time with this. I read that fbx can be converted directly with rc.exe but I have had no success with that either.
Thank you for your time.
RC from cryengine 3.5.4 can not handle tiff files and convert them to dds.
Current solution is to use RC from cryengine 3.4.5.
Issue thread at CryDev forum: http://www.crydev.net/viewtopic.php?p=1164327
Need feature/tutorial please!
There are many options without tooltips but they should have them.
For example "Find the Resource Compiler" or "Find textures directory".
Btw any button should have uppercases (exception is "with", "a", etc.) like in Blender.
Ground Alignment requires that bones:
But while exporting names with spaces RC crashes.
For dae reference please visit wiki
Doc: http://freesdk.crydev.net/display/SDKDOC3/Ground+Alignment#GroundAlignment-Setup
Make new/updated tutorials for v5.0 and up (video and/or wiki) including tutorials on popular topics like:
Work on obtaining showcase images for the CryBlend website and content.
matrix_to_string has unnecessary self argument that needs to be removed.
'Anicl' should not be generated due to empty animation blocks. Blender does not provide a way to remove empty animation blocks cluttering the scene graph and should therefore be ignored by CryBlend on export.
There should be a method to identify whether an animation block is empty and if so, to ignore it/delete it on export.
Meaningful information from first post and write it clearly on the wiki at GitHub in section for users.
There is also topic with tutorials
Thought I would make this a separate issue. I'm not sure...would this be considered a feature or a bug as it is not functional?
Steps to reproduce:
Enable CryBlend -> Disable -> Enable (you can not enable it again until restart Blender)
currently all (most of them) operators have different names. E.g.:
"cb.find_rc_for_texture_conversion"
"select_textures.dir"
and so one. They should be named similar to blender convention:
cb.with_type.do_sth
where
cb
stands for CryBlend (maybe better would be cryblend
instead of cb
)
with_type
stands for what are you working with: textures, objects, vertices, config or so
do_sth
stands for what are you going to do with one
A CryBlend user has reported issues with using 10+ materials. When attempting to select a material of one name, CryEngine selects the wrong portion. It could be that material numbers over 10 cause issues.
It would be nice to improve error handling.
Average users should only see error message instead of stack trace if wild bug appear.
Pressets in export checkboxes could be very useful. I suggest to add them ;)
What's more - ready perssets could be more than good idea.
Proposals:
Complete Object - meshes and textures
Only textures - as it was named ;) (without mesh export)
Complete Character - character and textures
CryBlend should be able to run RC within wine.
Possible solution:
Create wrapper 'rc.wine.exe':
!/bin/bash
wine /path/to/CryEngine/Bin32/rc/rc.exe $@
and point that file as rc in cryblend.
But we need to adjust dae filepath that is passed to rc.exe now it's like /my/path but should be z:/my/path (depends on your wine configuration, but 'z:' is default)
In export.py there are functions named extract_aniXX and all of them seem to by developed in methodology copy&paste&little_change.
They have to be merged to get rid of code duplication.
As far as I can see they differ ONLY variable names (for eg. inty, intx) so my suggestion for that:
open WinMerge, Meld or another favorite diff tool, paste pairs of them side by side and fix that code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.