Git Product home page Git Product logo

i3d-blender-addon's People

Contributors

jtsage avatar kbrandwijk avatar lkaminco avatar nmc-tbone avatar ssnd292 avatar stjerneidioten avatar sugurugt avatar tallion-07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

i3d-blender-addon's Issues

Import I3D Files

Is your feature request related to a problem? Please describe.
It would be nice if the plugin had the possibility of importing I3D-files to fx. rework old projects without having to start from scratch etc.

Merge groups

Describe the solution you'd like
Support for merge groups.

Wopster's explanation:

You select an object.. set an attribute that defines the identifier of the merge group e.g. 1 (merge group 1)
And an option to select if it's root or not. (bool)
Then you select all the childs that belong to the group (which is within the same material) that you just identified with '1' and also add the identifier to those objects.

Another note is that the merge group should all be using the same material. Or it could cause performance issues. Maya throws a warning.

Additional Context
Here is an i3d, where a merge group has been setup in maya.
nonBinaryCubes.zip

Instancing not working properly, and too many verts

If I use 'duplicate linked' in Blender to create multiple instances of an object, the export result is not the same as in Giants exporter for 2.79 (or the NLD community exporter for 2.80). The translation is not applied succesfully, so all instances appear in the location of the original one.

image

As you can see in the screenshot, the triangle count is 12 (the same as a single cube), as well as the vert count, but the cubes are overlapping.

image

This is an export from the official Giants exporter. Tris 12, Verts 8, and the translateZ is in there like it should, showing the instanced second cube in the right position.

These two screenshots show something else. When I export a cube in 2.79, it is exported with 8 verts. If I export the same cube in 2.80 with your exporter, it uses 24 verts. On a big model, that becomes a problem quickly. Although I do not use sharp edges a lot for 'hero' parts of my model, they are used plenty in less visible parts, so that adds up.

Unfortunately, I use instancing a lot in the model I'm working on, and this means that I cannot use your exporter currently, so I hope there's an easy fix. I have attached both exports for comparison, if you need anything else, please let me know.

i3d.zip

Support for relative paths

Export paths that point to the FS data directory as relative paths. Also perhaps add options for relative paths and maybe export of files (primarily for materials) with regard to the blend file itself.

Support for vertex weights

Is your feature request related to a problem? Please describe.
The old exporter had a checkbox 'Skin Weights', although I never actually got that to work. Either way, it would be nice to have support for exporting vertex weights.

Describe the solution you'd like
Include blendweights in the export file

Describe alternatives you've considered
x

Additional context
I'll add an example when I can find it again :)

Explicit texture properties for use with custom shaders

Is your feature request related to a problem? Please describe.
It's impossible to effectively export materials that use a different shader in Blender than Principled.

Describe the solution you'd like
Ideally, I'd like to be able to manually specify the texture paths specifically for export. Can be part of #3 to be able to specify this. That way, if I use a custom shader, the exporter wouldn't try to 'find' the textures in the shader, but just use whatever I specify. I took inspiration for this FR from the SCS tools, where there's also a custom shader, but at the same time custom property fields for the standard texture properties (albedo, specular, normal).

Describe alternatives you've considered

Additional context
image
In the screenshot, you see both the shader selection (similar), the material attributes (things similar to bump depth, albedo color etc. in GE in the material panel, and the textures.

Add failsafe to export when other nodes than color are connected to albedo input of Principled BSDF

The exports shits itself when another node (like MixRGB) is connected to Albedo input of the Principled BSDF.

Since it doesnt make any sense that the exporter is supposed to read and export mixed input data for Giants Editor anyway, a failsafe should be added to prevent the error from popping up.

2020-02-01 00_12_21-

Exporting Albedo Color information is more than enough. I guess you can just add a failsafe if any node other than image texture or RGB is connected to albedo input.

Problem with FillVolume

Describe the bug
The game gives lua errors when there is a fillVolume exported with the plugin. I've been testing, exporting a fillVolume from the game, importing it into blender and exporting it again and it also gives error. However, I tried to export the same object from Maya and it doesn't give any problem. All this without making any changes in the object.

Log file
1_export_log.txt
log.txt

Screenshots
If applicable, add screenshots to help explain your problem.

Unittests for python module

Is your feature request related to a problem? Please describe.
There is no testing whether or not a new feature update breaks any of the existing functionality before creating automatically creating a new build on github.

Describe the solution you'd like
Blender supports running through the commandline without gui, this means that unittesting is possible, which could be integrated with the CI that creates the builds on the buildserver.

Additional context
Blender in commandline

Restrucure UI code files

The UI files are non very organized, could do with a makeover similar to what is done for the different node classes, to make it a bit more obvious what goes where and affects which part of the interface.

Move settings to be accessed only through the i3d object

Currently some of the node object classes reference specific settings through accessing a named property on the current scene, but the i3d file already loads all of these settings into a dictionary. Basically the whole export settings stuff needs a bit of a rework.

Some attributes enabled by default

Is your feature request related to a problem? Please describe.
The attributes cast Shadowmap and receive Shadomap should be enabled by default as 90% of the objects have shadows and if you have a project with many pieces and have to go one by one activating those attributes is a bit boring

Describe the solution you'd like
Having the cast Shadowmap and receive Shadomap attributes enabled by default

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

After export UV area gets streched on weird places

I am making a building in Blender.
Inside blender the UV and the textures on the building look great.
after export i open it up in GE and there some textures look great as in Blender but a few spots there are stretch and deformation going on in the texture.

I added my export log and a pic from blender and GE.

I hope you can fix this.
Love your version of the plugin so far.
Cant wait what else you come up with to do on the plugin.

best regards,

Herman
Distillery Factory Main 1_export_log.txt
Schermafdruk 2020-04-17 15 44 48
Schermafdruk 2020-04-17 15 45 19

Per object i3d properties

Add a possibility to set most of the i3d properties inside of blender. Preferably in the properties panel within the 'object' category as a subpanel called i3d or something similar.

This would of course depend on object type so a camera would only show relevant properties for a camera and the same goes for mesh, light and so on.

Code Refactor

Is your feature request related to a problem? Please describe.
Code refactor. The code is under-utilizing object oriented programming, which would make a lot of the node exporting easier.

Verbose option for debugging

Add an option for verbose output when exporting. To help catch error and for people to produce error reports.

Splines/Paths/Curves should be converted to mesh objects upon export

Me personally like to keep as many objects as possible easily editable.

That is why I rarely convert splines or paths into actual geometry, since its not needed if they are setup correctly (array and curve modifier for example)

One feature very late down the road I would like to see is the exporter to handle those splines and paths as meshes, so that they are automatically converted into meshes for export.

Property Presets for common mod types

Is your feature request related to a problem? Please describe.
It is annoying to setup all of the properties every time for common scenarios.

Describe the solution you'd like
A solution similar to the way the maya addon does it with presets for different mod types

Additional context
image

image

image

Export progress bar

Is your feature request related to a problem? Please describe.
For bigger projects it is hard to see if the exporter has stopped or if it is just hard at work.

Describe the solution you'd like
Some form of progress bar in the blender view

Describe alternatives you've considered
A text output somewhere inside of blender that updates live with the exported nodes.

Support for user attributes

Is your feature request related to a problem? Please describe.
Currently, there's no way to set user attributes on objects in Blender, they can only be set in GE

Describe the solution you'd like
The same ability as in GE (key, type, value).

Describe alternatives you've considered
None

Additional context
For reference:
image

Vertex color?

Describe the bug
I switched from the original version this one was forked from to his version, and I noticed vertex colors are no longer exported. Is there an ETA for this feature? Thank you!

Duplicate transform groups

Describe the bug
When exporting, everything inside an empty is duplicated. Everything inside the transform group moving parts and hydraulics (the yellow underline) is duplicated. Everything that is not underlined is a duplicate of the moving parts and hydraulics transform group

Log file
Please generate a logfile by checking 'Output logfile' in the exporter and attach it to the issue.

Screenshots
Captura

Object selection mode

Describe the solution you'd like
Another option in the selection box in the exporter for selection an object/selection of objects to export. Instead of only collections.

Cleanup code and write comments

Cleanup the code fx. by removing random print statements and write comments to all the code to ease readability for others as well as my future self.

Determining Object Visibility

Determining object visibility in blender is sort of a mess at this point since there are four ways to toggle/inspect the visibility of an object and one of them isn't available to the python API (the viewport eye aka the 'h' shortcut)
It is further compounded by the fact that object visibility depends on being disabled in all collections and so on.
Current implementation is to just check for "hide_viewport", but should probably be enhanced to incorporate more, maybe even make it user selectable in the exporter.

Useful discussions:
https://blenderartists.org/t/show-hide-collection-blender-beta-2-80/1141768/4
https://devtalk.blender.org/t/hide-in-viewport-for-collections-in-python-api/8210/3

Exporter ignores normals and always exports fully smoothed model

When exporting custom meshes, the exporter ignores the smoothing set in Blender (be it custom weighted vertex normals via modifier, auto smoothing in data properties, manual smoothing via hard and soft edges or even hard edges set by HardOps addon)

Desired effect is that the exporter keeps the normal information and treats it as is, see attached picture.

2020-02-01 00_09_14-GIANTS Editor 64bit 8 1 0 - E__Modding_FS19_EFGC195_i3d_MulcherEFGCSeries_GEExpo

Skinned meshes

Describe the solution you'd like
Support exporting bones/armatures as skinned meshes.

Problem with MergeGroups

Describe the bug
The plugin does not export when exporting a model with empty (transform group) using the mergegroups. Without using the mergegroup it exports without problems and if I remove the empty and put the mergegroup also exports without problems.

Log file
i3dio.exporter:export_blend_to_i3d:INFO: Blender version is: 2.83.2
i3dio.exporter:export_blend_to_i3d:INFO: I3D Exporter version is: (1, 0, 0)
i3dio.exporter:export_blend_to_i3d:INFO: Exporting to C:\Users\fuent\Documents\My Games\FarmingSimulator2019\mods\Man\1.i3d
i3dio.exporter:_export_selected_objects:INFO: 'Selected Objects' export is selected'
i3dio.exporter:_add_object_to_i3d:DEBUG: [backDoor] is of type 'MESH'
i3dio.i3d.I3D:add_merge_group_node:DEBUG: [1] Adding merge group node
i3dio.i3d.I3D:add_merge_group_node:DEBUG: [1] New merge group
i3dio.node_classes.merge_group.MergeGroup:init:DEBUG: [MergedMesh_1] Initialized merge group
i3dio.node_classes.node.MergeGroupChild:_create_xml_element:DEBUG: [backDoor] Filling out basic attributes, {name='backDoor', nodeId='1'}
i3dio.xml_i3d:write_property_group:INFO: Writing non-default properties from propertygroup: 'I3DNodeObjectAttributes'
i3dio.xml_i3d:write_property_group:INFO: Wrote '0' properties
i3dio.xml_i3d:write_property_group:INFO: Writing non-default properties from propertygroup: 'I3DNodeShapeAttributes'
i3dio.xml_i3d:write_property_group:INFO: Wrote '0' properties
i3dio.node_classes.node.MergeGroupChild:_add_transform_to_xml_element:DEBUG: [backDoor] transforming to new transform-basis with <Matrix 4x4 (1.0000, 0.0000, 0.0000, 0.0000)
(0.0000, -0.0000, -1.0000, 3.4021)
(0.0000, 1.0000, -0.0000, -6.1182)
(0.0000, 0.0000, 0.0000, 1.0000)>
i3dio.node_classes.node.MergeGroupChild:_add_transform_to_xml_element:DEBUG: [backDoor] translation is <Vector (0.0000, 3.4021, -6.1182)>
i3dio.node_classes.node.MergeGroupChild:_add_transform_to_xml_element:DEBUG: [backDoor] has translation: [7.55411e-16 3.40207 -6.11817]
i3dio.node_classes.node.MergeGroupChild:_add_transform_to_xml_element:DEBUG: [backDoor] has rotation(degrees): [90 -0 0]
i3dio.node_classes.node.MergeGroupChild:init:DEBUG: [backDoor] Initialized as a 'MergeGroupChild'
i3dio.exporter:_add_object_to_i3d:DEBUG: [backDoor] processing objects children
i3dio.exporter:export_blend_to_i3d:ERROR: Exception that stopped the exporter
Traceback (most recent call last):
File "C:\Program Files (x86)\Blender\blender-2.83.2-windows64\2.83\scripts\addons\i3dio\exporter.py", line 58, in export_blend_to_i3d
_export_selected_objects(i3d)
File "C:\Program Files (x86)\Blender\blender-2.83.2-windows64\2.83\scripts\addons\i3dio\exporter.py", line 98, in _export_selected_objects
_export(i3d, bpy.context.selected_objects)
File "C:\Program Files (x86)\Blender\blender-2.83.2-windows64\2.83\scripts\addons\i3dio\exporter.py", line 105, in _export
_add_object_to_i3d(i3d, blender_object)
File "C:\Program Files (x86)\Blender\blender-2.83.2-windows64\2.83\scripts\addons\i3dio\exporter.py", line 150, in _add_object_to_i3d
_add_object_to_i3d(i3d, child, node)
UnboundLocalError: local variable 'node' referenced before assignment
i3dio.exporter:export_blend_to_i3d:INFO: Export took 0.014 seconds
Screenshots
If applicable, add screenshots to help explain your problem.

Integrate buildin FS prefab visualization

Describe the solution you'd like
A system where you can add premade components (i3d) from the fs $data directly in your blendfile to visualize the final model.

Describe alternatives you've considered
Either importing the i3d and have it directly as a normal object or in a different scene. And maybe keep a reference to the i3d file so it can just be linked on export without converting it back to i3d, since that ressource is already available.

Plugin doesn't work in Blender 2.83.2

Describe the bug
A clear and concise description of what the bug is.
The plugin doesn't work in Blender 2.83.2

Log file
Please generate a logfile by checking 'Output logfile' in the exporter and attach it to the issue.
i3dio::INFO: Initialized logging for i3dio addon
Traceback (most recent call last):
File "C:\Program Files (x86)\Blender\blender-2.83.2-windows64\2.83\scripts\modules\addon_utils.py", line 351, in enable
mod = import(module_name)
File "C:\Program Files (x86)\Blender\blender-2.83.2-windows64\2.83\scripts\addons\i3dio_init_.py", line 23, in
from . import (
File "C:\Program Files (x86)\Blender\blender-2.83.2-windows64\2.83\scripts\addons\i3dio\ui_export.py", line 16, in
from . import (
File "C:\Program Files (x86)\Blender\blender-2.83.2-windows64\2.83\scripts\addons\i3dio\exporter.py", line 18, in
from .i3d import I3D
File "C:\Program Files (x86)\Blender\blender-2.83.2-windows64\2.83\scripts\addons\i3dio\i3d.py", line 213, in
from i3dio.node_classes.skinned_mesh import *
ModuleNotFoundError: No module named 'i3dio.node_classes.skinned_mesh'

Screenshots
If applicable, add screenshots to help explain your problem.

Convert connected non-*.dds textures and into *.dds at export

To always have uptodate textures, and automatic DDS conversion of connected non-DDS textures could be added later down the road.

Wopster made a conversion tool that could be supplied with the toolset eventually

The lookup to know which texture needs which compression could be based on a suffix system
_decals = DXT5
_spec = DXT1
_normal = DXT1
... eca

Path to material Shader and Variation should be editable in Blender

Currently when exporting you have to set the shader and its variation type per material, which can become timeconsumin if you have several different materials per object, since you have to redo that step everytime you re-export the i3d file.

It would be more convenient to give materials parameters like "Shader Type" and "Shader Variation" so that the task of doing it by hand everytime after export is skipped.

For that, a relative pathing from the users Game library is needed to find the correct shader in the /data/shared/shaders folder

Update i3d mappings in supplied vehicle xml files

Is your feature request related to a problem? Please describe.
It is annoying that the i3dmappings has to be set manually every time something changes in the model.

Describe the solution you'd like
It should be possible to supply an id for the node, which then gets used to map to a position in the node tree.

Additional context

    <i3dMappings>
        <i3dMapping id="pgII25m_main_component1" node="0>" />

id should be set inside of blender on a per node basis. The node field should be updated depending on its place in the scenegraph. And the xml file of the mod should be suppliable somewhere in blender as well

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.