Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import animation channels #37

Open
bezo97 opened this issue May 23, 2024 · 9 comments
Open

Import animation channels #37

bezo97 opened this issue May 23, 2024 · 9 comments
Assignees
Labels
feature request New ideas and feature requests

Comments

@bezo97
Copy link
Owner

bezo97 commented May 23, 2024

This would enable the integration of IFSRenderer into existing animation pipelines. The goal would be importing a CSV file containing various animation channels, primarily for camera parameters.

The request comes from @vitos1k in this forum discussion.

@bezo97 bezo97 added the feature request New ideas and feature requests label May 23, 2024
@bezo97 bezo97 self-assigned this May 23, 2024
@vitos1k
Copy link
Contributor

vitos1k commented May 30, 2024

Do you need some help with it? Or maybe can guide me where in the code to look for?

@bezo97
Copy link
Owner Author

bezo97 commented May 30, 2024

@vitos1k Don't worry I'm on it, been busy the last few days. Hoping to have a working version by end of week.

@bezo97
Copy link
Owner Author

bezo97 commented Jun 1, 2024

I have solution that can be tested on the dev branch. I added an Import button to the bottom of the channel list:
image

The way I implemented it is that the column names are the channel paths, so any channel can be imported, not just the camera object. @vitos1k this means you'll need to adjust your script a bit, or modify the csv before importing it. Here's a test file example3.csv that shows the correct way (with values based off of your example).

Let me know if this works for you.

@vitos1k
Copy link
Contributor

vitos1k commented Jun 1, 2024

It works, as in it imports data and animation is playing. BUT! It seems that some rotations are inverted??.

  1. Camera is looking the oposite (180degree) way from exported camera. So i rotated TilitY offset 180 degrees and now it matches.
  2. Then it looked like Cameras are pointing the same direction at the begining of the animation, but now it rotates Clockwise in IFSRenderer, while it rotates CounterClockwise in my animation. I made a video comparison from the output from IFSRenderer and Blender(keep in mind that IFSRenderers camera is rotated 180 degrees via TiltY parameter) See video
comaprison.mp4
  1. I thought that all the angles would be inverted, but from the looks of it only rotation around vertical axis is inverted. Because i've flipped video from IFSRenderer in horizontal axis and they matched spot on with blenders render
composite.mp4

Also a question how one can find out Full chanel name? for example if i want to synchronize Affine Translate animation with animation of a slider in blender? Is there any tooltip ?

@bezo97
Copy link
Owner Author

bezo97 commented Jun 2, 2024

The problem with the camera orientation is probably caused by the different coordinates systems used in Blender and IFSRenderer. This is what Blender uses. And this is how it works in IFSRenderer:

X axis: Left / Right
Y axis: Top / Bottom
Z axis: Front / Back

In other words, Blender uses right-handed coordinate system, and IFSRenderer uses left-handed coordinate system. This is something your conversion script could handle, not the import feature of IFSR. Found a thread that should help you add this conversion to the script. Ideally you won't need to add any tilting to work correctly.
Also, I know there's an option in Blender to select the correct axis when exporting objects, maybe you can find a way to reuse the functionality:
image

As for the channel paths, you are right they aren't shown anywhere. But instead of tooltips I'll try to figure out a way to be able to copy-paste them. In the meantime you can also peek at the saved fractal file to see them.

@bezo97
Copy link
Owner Author

bezo97 commented Jun 2, 2024

I made the channel paths visible in these two places: the context menu of the sliders, and the channel editor panel. They are read-only textboxes.
image

@vitos1k
Copy link
Contributor

vitos1k commented Jun 4, 2024

Thanks alot! I'll try it tomorrow when will be near my machine. And i'll modify my script to take into account left-handedness. Will report back here

@vitos1k
Copy link
Contributor

vitos1k commented Jun 6, 2024

Yep works as expected! i've updated my scrip for blender here https://github.com/vitos1k/pipelinetools/blob/master/io_export_anim.py

Also as a request is it possible add function to export animation in csv file? For example Create interesting pattern in IFSRenderer, create few keypoints for camera animation, export it to blender, polish animation, add aditional graphics. And then reimport new polished animation into IFSRenderer for final render.

@bezo97
Copy link
Owner Author

bezo97 commented Jun 6, 2024

@vitos1k Awesome, thanks for testing it out. The feature will be available in the next release 👍

As for the CSV export, I feel its a bit out-of-scope but I'll think about it. Feel free to open another Issue or send a PR for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New ideas and feature requests
Projects
None yet
Development

No branches or pull requests

2 participants