General Blender 2.8 + instruments = I am loosing my mind

Dirk Steffen

Porsche Factory Jackass™
Premium
Could anyone who is familiar with building instruments and animations with Blender help a lost one out please?


Since about a week I am stubbornly trying to figure out how to build working instruments with Blender v2.8.


Too keep it simply I am just trying to build a tachometer for now.

I have my mesh sorted and have the proper dummies in place (big thanks to @AccAkut for sharing your empty dummy Blender project - that was massive help for a beginner in Blender!).


Issue #1:

- whenever I assign a parent (ARROW_RPM) to a child (NEEDLE_RPM) my carefully aligned child object will flip into space and has its carefully aligned position in the tachometer gauge smashed to pieces

I have not the slightest idea how to fix this and could only find hints that this may be buggy behavior of Blender not keeping object position persistent when parenting a child - is there any solution to this?


Issue #2:
- sometimes (all the time ???) when exporting the Blender project to FBX (with my painstakingly aligned instrument dummies and objects that I have built with hours of work, sweating, bleeding, cursing ...) the FBX export will mess up object position and orientation of the child and orientation of the dummy completely.
The result is a tach needle that points in all kinds of directions just not the one I saw on the screen in Blender after aligning it !@#$%


... also the Blender UI is a punch in the dick.
 
For #1 what's easiest is
1. remove parent, keep transformation (alt-p menu), this dumps it into the top level of the hierarchy without moving it.
2. assign new parent

The problem is the hidden 'parent inverse transformation' matrix, it automatically generates this when you assign a parent to an object so that the object's transformation matrix won't change, and when you swap parents it recalculates it incorrectly. But the only tool you have for editing it in-place is "clear inverse parent transformation" which sets it to 0 without adjusting the object transformation to compensate. Removing the parent with keep transformation corrects the object transform.

on #2, stuff in kseditor should always be identical to how it was in Blender, at least with the recommended exporter settings. Ingame it moves them based on the ini files so of course you can have them thrown way off.


One other gotcha to keep in mind is, if you're using kseditor to generate the analog instrument scripts, do not export the kn5 during the same session. It'll export the needles in different positions than they were imported, which stops them from working the way the scripts it just generated say to. Close the editor, reopen the fbx, then export a kn5.
 
I just now re-read the last part of your post:


... if you're using kseditor to generate the analog instrument scripts, do not export the kn5 during the same session.

I do not understand "instrument scripts".
I am using an analog_instruments.ini from a known working car as a template and planned to go from there as a first experiment.

Is this the wrong approach?
I assumed the analog_instruments.ini only defines starting position of an object rotating around its dummy and steps to rotate at.

I could not find any tool inside KSeditor to produce these scripts.

Just to be sure:
I have aligned the ARROW_RPM dummy's XY-plane parallel to my tachometer face so that the dummy's Z-axis points out of the tachometer's center and the RPM_NEEDLE could rotate around that Z-axis.

Perhaps this is what I made wrong?
I got to the point where the RPM_NEEDLE looks now exactly (sitting still) as I left it in Blender before exporting (good) but the movement is wrong (it does not stay on the tachometer's plane but rotates in the air) and it rotates sort of counter clockwise - Aston Martin style ;-)

I had aligned the ARROW_RPM dummy with it's Z+ pointing towards the driver (perpendicular to the tachometer face of course = coaxial to the tachometers axle)


Sorry for the many questions, ... this is absolutely new territory to me.

On a good note - I got the steering wheel working just fine following your hints re. Blender ;-)
That's a big victory already but I guess steering wheels are easy as no analog_instruments.ini is involved!?
 
Not generally anything in analog_instruments.ini you can reuse unless it's an identical instrument cluster, with the models pointing to the same positions in Blender.

5NtlDz8.jpg

Z points into the cluster, same as on the steering wheel.

ksEditor scripts are the last tab in the bottom panel, "Data Scripts", you pick where the needle starts and ends and copy to clipboard, then paste into your analog_instruments.ini.
 
Thank you so much for explaining this!
Your post is super helpful!

I am currently still very much in limbo as to a proper workflow (I ran into a lot of FBX conversion issues between the apps I would like to use and the apps I found now I should use).

Do I understand it correctly that I can actually use Blender as the very last app before conversion from FBX to KN5 and essentially what I see in Blender (materials, textures, animations) is what I will get in AC ?

Is there anything that does not translate from Blender to AC I should be aware of - like do not do this in Blender ?

I ask because until now I do:

- 3D modelling in Rhino3D (a CAD system I use amongst others for work since the 90's)
- 3DsimEd - file conversion, signing of material properties, fixing textures assigned, setting shaders
- KSeditor - file conversion, setting shaders, troubleshooting FBX problems
- Content Manager - file export, texture, shader adjustments

If I could do everything (except 3D modeling as I am much faster in Rhino) in Blender (especially textures and shaders) I could loose the inconvenient UI and quirks of 3DsimEd and KSeditor (and only use one or the other for simple conversion to KN5.

Do I have the wrong idea here?
 
Well all I use are Blender, Gimp and the KSEditor. Plus CM to check on others' cars shaders if needed. 3Dsimed isn't needed.

With Blender I make base AO exports, with Gimp I make them into proper textures, and the material settings are then done in the KSEditor. Those don't copy over from Blender, only the material name.
 
Good stuff! Thanks for the info.

I just found out the hard way having spent some time sorting through a bulk of material settings in Blender and then finding out that none of that arrives through the FBX file into AC :-(

One issue I have is that with every time I export a new revision out of Blender I have to set the shadows flags for every single object new in 3DsimED (the shadow flag seems not to be transferred into Blender and back out of Blender - Rhino3D I remember at least does carry the shadow flag so all that work doesn't have to be done again).

How do you guys do shadows on your objects - make them at last together with shader settings after everything else is finished or is there a way with Blender?
 
There's something wrong with 3dsimed's part of that transaction if you're having issues with shadows, everything exported from Blender, by default, has a shadow. I think it'd be best to just go from rhino3d to Blender to kseditor.
 
Perhaps this is what I made wrong?
I got to the point where the RPM_NEEDLE looks now exactly (sitting still) as I left it in Blender before exporting (good) but the movement is wrong (it does not stay on the tachometer's plane but rotates in the air) and it rotates sort of counter clockwise - Aston Martin style ;-)

I had aligned the ARROW_RPM dummy with it's Z+ pointing towards the driver (perpendicular to the tachometer face of course = coaxial to the tachometers axle)

Ignore me if you've figured it out already but in case you haven't some of your issues sound like object origins, normals and rogue vertices potentially. I had this issue with my pop up headlights and it lead to the objects being misaligned once I loaded the model into the editor. In the end I had a misaligned object origin due to a 'rogue' vertice sitting across the x axis and part of my object which lead to the editor misaligning the object.

Especially in the absence of animation (which the instruments shouldn't have) it may be well a good idea to check that again.

As for rotation of the needles they should spin in the right direction around the z axis with it pointing forward or as you say through the gauge face regardless of the limits set in the .ini as long as you have the object names and parenting correct.

If you do get to animation feel free to pm me as I've just been through that episode and probably did everything wrong before I got it right :).
 
There's something wrong with 3dsimed's part of that transaction if you're having issues with shadows, everything exported from Blender, by default, has a shadow. I think it'd be best to just go from rhino3d to Blender to kseditor.

Mmmh ...
For some reason shadows seem to remain an issue on my end.

1)
Can I set and more importantly check in Blender if the shadow tags are properly activated or are these tags completely unknown to Blender?
Ideally I fix the shadow tags and double check them in Blender BEFORE FBX export.
I could not find anywhere in Blender any information in the material for a shadow tag.
I know Rhino does have it but doing it in Rhino is unfortunately not possible at this point (Rhino has massive issue carrying material information through its FBX I/O)

I could not figure out if I can easily assign the shadow tags to multiple objects / groups / materials either in KSeditor or KSeditor V6.

2)
Do you have any hints as to how to use the interface in KSeditor to assign shadows over the entire project (much easier to do this and then selectively disable shadows on objects I don't want them) ?


Ignore me if you've figured it out already but in case you haven't some of your issues sound like object origins, normals and rogue vertices potentially. I had this issue with my pop up headlights and it lead to the objects being misaligned once I loaded the model into the editor. In the end I had a misaligned object origin due to a 'rogue' vertice sitting across the x axis and part of my object which lead to the editor misaligning the object.

Especially in the absence of animation (which the instruments shouldn't have) it may be well a good idea to check that again.

As for rotation of the needles they should spin in the right direction around the z axis with it pointing forward or as you say through the gauge face regardless of the limits set in the .ini as long as you have the object names and parenting correct.

If you do get to animation feel free to pm me as I've just been through that episode and probably did everything wrong before I got it right :).

Thanks a lot for the tips ;-)
I double checked and I believe I have figured out what caused the issue of misaligned objects during parenting / export.
@Stereo hinted spot on what saved my day regarding child / parent issues.
I have rebuilt the objects following his tips religiously and all is beautifully aligned now and sticks where I want it ;-) That was awesome !

There is another two bits I stumbled across accidentally while getting more familiar with Blender:

a)
Make sure THIS is set "Affect Only Parents" in the properties panel (lower right UI element):
2020-07-08 151031 screenshot.jpg


This does actually prevent the awful child objects flipping out into space the moment you assign them a new parent (should be standard behavior if you ask me).


b)
When re-ordering objects / layers / groups to properly organize your file structure or deliberately parenting by drag and drop in the layer tree (they call it "Outliner") - make sure while you drag an object to a new layer to keep SHIFT+ALT pressed when dropping an object into a new layer / parent.

It seems though that moving complex structures this way you will loose the child parent relationships on some (not all ?) of these and parents you drag over will end up empty with their children scattered loosely within the new parent layer.

I did a lot of experimenting and cursing and incremental saving and starting over when experimenting with this.


For now I try to stay away from animations until I am absolutely firm with the crazy Blender UI.
At some point I definitely want to animate wipers, cockpit objects and doors but for now this has to wait.

Cheers
 
I don't know the answer to the shadow question because the default behaviour (100% of objects exported from Blender cast shadows) works for me. If there's a way to disable shadowcasting in blender, I don't know of it. All material/object settings like that and transparency should definitely be handled in kseditor though, in Blender it's fine if they're just a rainbow of matte materials without textures.
 
I'll check my settings later when I'm at home.

But regarding your Rhino -> Blender routine, do you add any mesh in Blender? I've seen people have weird issues when they used Blender just to convert, something about the internal fbx structure (over on the ACM forum). He fixed it by simply adding a cube, save as blend, then delete the cube again and export to fbx.
 
Last edited:
Are these FBX export settings what you are using or have I perhaps a bug in here that could cause the missing shadow flag?

View attachment 386531

Looks good to me. As Stereo said, there are no export options influencing that.

I recommend ticking the 'selected objects' box though, at some point you will have more objects than you care to export in your scene/project.

For animations you only export the empties with the animation as a separate fbx, leave 'bake animation' ticked and remove all other checkmarks. You then load that fbx separately into the editor.
 
I'll check my settings later when I'm at home.

But regarding your Rhino -> Blender routine, do you add any mesh in Blender? I've seen people have weird issues when they used Blender just to convert, something about the internal fbx structure (over on the ACM forum). He fixed it by simply adding a cube, save as blend, then delete the cube again and export to fbx.
Looks good to me. As Stereo said, there are no export options influencing that.

I recommend ticking the 'selected objects' box though, at some point you will have more objects than you care to export in your scene/project.

For animations you only export the empties with the animation as a separate fbx, leave 'bake animation' ticked and remove all other checkmarks. You then load that fbx separately into the editor.


Thanks for the input guys ;-)

I have not so far imported piecemeal into Blender or added parts into Blender but only have prepared a whole car in Rhino, exported to FBX, imported into Blender and worked through the car with materials and most importantly sorted the project into the correct structure with empties (something Rhino does not directly support - as a normal CAD system Rhino "only knows" geometries, layers and blocks of data - it translates "empties" or "dummies" as blocks or layers but does not properly keep track of them, hence Rhino is not ideal as an only solution).

I played with trying to merge data in Blender, import 3D assets into a project and miserably failed.
Not only is Blender extremely difficult to handle in terms of coordinate systems and placing objects it also addis itsown impossibly convoluted and illogical UI and occasionally even SCALES (!!!) objects on import without any understandable reason whatsoever.

I made a bad mistake, having unknowingly accidentally deleted an object from my latest project save only to find out about it a day later.
I had to go back to an earlier backup file to retrieve the object and it took me the better part of 2 (!!!) hours to scale the object (approximately) and place it (approximately).

In any professional CAD system this would have been at most a 1 minute affair.

Anyway.
I am learning my bit how to best use Blender slowly.
@Stereo Thanks to your tips I have now COMPLETELY solved my shadow issues ;-)
Many thanks for that.
I adhere now strictly to your advice and go straight: Rhino (3D) -> Blender (structure and material class and texture assignment) -> KSeditor v6 (shaders and export to KN5) -> CM (shader adjustments, car function testing and ini files).

The workflow slowly becomes tangible, …now it's off to create something ;-)
 
Thanks for the input guys ;-)

I played with trying to merge data in Blender, import 3D assets into a project and miserably failed.

In any professional CAD system this would have been at most a 1 minute affair.

The workflow slowly becomes tangible, …now it's off to create something ;-)

Blender is not ideal for this type of thing. I went through this with an LMP1 project years ago (never saw the light of day) and had CAD data from onshape which I imported to Blender. It turned out rebuilding everything was about 10 times easier than working with the CAD data. Also Blender is inherently incapable of a clean collapse. One of the model's tires had 200k tris and so on.

Good luck with your project! Also i recommend a modded ks editor in case you're not using it already, it saves persistence and has a useful materials library function.

 
Yes I do use the modded KSeditor (I like its UI just a little bit better and its added functions seem useful (I am much too early into this to make any use of the extended shaders it offers though).

One thing seems to be needed mentioning - the modded KSeditor does seem to completely lack the data script function Stereo has explained earlier in this thread.

After having used the data script function to get my instruments to work I must say it is invaluable (yes, I know one can just as well live without it and setup and calibrate instruments in manual fashion (more tedious but doable) but the quickness and precision of the feature in the original KSeditor definitely makes it a tool to have.


I am in no means qualified to make a judgement re Blendervs any other software regarding mesh modeling for gaming (I just about started to model in meshes for game engines but come from an industrial manufacturing background having grown up on just about any major CAD system since PCs still had 14" monochrome CRTs - Blender is … very weird and I wouldn't dream to have to model anything with it.
Rhino in that regard is super fast, efficient and seems to have all needed tools to produce anything in 3D mesh (I am basically design in solids / surfaces -> transform to mesh (Rhino has plenty of control variables dedicated to meshing) -> tweak/optimize the mesh -> Blender, …)

Rhino also has the big advantage of being simply dirt cheap for what it is capable of + some truly great developers and a great user community who help each other very actively.

Blender seems to be great as it is open source and cost free and as such seems to have a healthy constant development of the app. It also seems to be extremely feature rich and powerful in what it is capable of … if it only had a more … logical approach to UI.
So far I see it only useful as a tool to organize the file structure and "get the assets into shape".

It's extensive material and shader features are very, very interesting and it is a lot of fun to prepare a car model to photorealistic render in Blender but sadly almost none of the material data is translated into Assetto Corsa :-(

Sadly 3Dsimed turned out to be just too buggy to be useful in the workflow (especially it's shadow flag issues are just annoying but it also seems to have issues with object naming (massively bloating the file with creating new entities every time you look at the file a different way).

KSeditor therefore is the tool to use (I would never have known if not for the great tips in this thread).
 

Latest News

What would make you race in our Club events

  • Special events

    Votes: 19 25.7%
  • More leagues

    Votes: 18 24.3%
  • Prizes

    Votes: 16 21.6%
  • Trophies

    Votes: 7 9.5%
  • Forum trophies

    Votes: 5 6.8%
  • Livestreams

    Votes: 14 18.9%
  • Easier access

    Votes: 46 62.2%
  • Other? post your reason

    Votes: 8 10.8%
Back
Top