I can't download the Cineware sdk via the link below, is there any other way to download it?
https://developers.maxon.net/forum/topic/15234/cineware-22-downloads/1
Thank,
AiMiDi
I can't download the Cineware sdk via the link below, is there any other way to download it?
https://developers.maxon.net/forum/topic/15234/cineware-22-downloads/1
Thank,
AiMiDi
@ferdinand Could you please check this out? This is quite important for me! Appreciation for your time!
Thank,
AiMiD
For only x-axis, there are two points defined (0,0) with right tangent(14.49, 0) and (60,47.869) with left tangent(-39, -1.532), and It is clear that the value at frame 23 is 31.49
But After I use these information to try to recreate the curve with Bezier algorithm myself, I somehow get the value 26.379:
And I have tried Hermite algorithm, but it's still wrong 26.5:
Can you reveal your way of interpolation?
Thank,
AiMiD
Hi @m_adam , thanks for your apply. I have solved this problem. The reason is I used maxon::BaseArray
to store tree node data. When I append the array, the address of node may change, but the next pointer in node remain unchanged. And this cause the crash.
I'm going to set a tree view as shown below. After adding items into the tree view for several times, it suddenly crashed in DrawText. This issue happens stably.
struct MyItem
{
enum
{
MATERIAL,
MESH,
CAMERA,
LIGTH
};
enum
{
OK,
WARNING,
ERROR
};
Int32 state = OK;
Int32 type = MATERIAL;
BaseList2D* element;
String parameter;
String problem;
};
struct MyItem
{
Int32 state = OK;
Int32 type = MATERIAL;
BaseList2D* element;
String parameter;
String problem;
};
struct MyItemNode
{
MyItem item; //data
MyItemNode* down = nullptr;
MyItemNode* next = nullptr;
};
using MyItemArray = maxon::BaseArray<MyItemNode>;
class MyTreeViewFunctions final : public TreeViewFunctions
{
void* m_selected_node = nullptr;
public:
static MyTreeViewFunctions& GetFunction()
{
static MyTreeViewFunctions func;
return func;
}
void* GetFirst(void* root, void* userdata) override
{
return static_cast<MyItemArray*>(root)->GetFirst();
}
void* GetDown(void* root, void* userdata, void* obj) override
{
return nullptr;
}
void* GetNext(void* root, void* userdata, void* obj) override
{
if (const auto node = static_cast<MyItemNode*>(obj))
return node->next;
return nullptr;
}
Bool IsSelected(void* root, void* userdata, void* obj) override
{
return m_selected_node == obj;
}
Int32 GetLineHeight(void* root, void* userdata, void* obj, Int32 col, GeUserArea* area) override
{
return 20;
}
Int32 GetColumnWidth(void* root, void* userdata, void* obj, Int32 col, GeUserArea* area) override
{
return 65;
}
void DrawCell(void* root, void* userdata, void* obj, const Int32 col, DrawInfo* drawinfo, const GeData& bgColor) override
{
if(!obj)
return;
const auto& item = static_cast<MyItemNode*>(obj)->item;
switch (col)
{
case MyDialog::LIST_COL_TYPE:
{
BaseBitmap* bm = nullptr;
switch (item.type)
{
case MyItem::MATERIAL:
bm = m_material_bitmap;
break;
case MyItem::MESH:
bm = m_mesh_bitmap;
break;
case MyItem::CAMERA:
bm = m_camera_bitmap;
break;
case MyItem::LIGTH:
bm = m_light_bitmap;
break;
default:;
}
drawinfo->frame->DrawBitmap(bm, drawinfo->xpos + drawinfo->width / 4, drawinfo->ypos + 2, ICON_SIZE, ICON_SIZE, 0, 0, bm->GetBw(), bm->GetBh(), BMP_NORMALSCALED);
break;
}
case MyDialog::LIST_COL_ELEMENT:
{
if (item.type == MyItem::MATERIAL)
{
if (auto* mat = reinterpret_cast<BaseMaterial*>(item.element); mat)
{
if (BaseBitmap* bm = mat->GetPreview(0); bm)
{
drawinfo->frame->DrawBitmap(bm, drawinfo->xpos, drawinfo->ypos + 2, ICON_SIZE, ICON_SIZE, 0, 0, bm->GetBw(), bm->GetBh(), BMP_NORMALSCALED);
}
}
}
drawinfo->frame->DrawSetTextCol(IsSelected(root, userdata, obj) ? COLOR_TEXT_SELECTED : COLOR_TEXT, COLOR_TRANS);
drawinfo->frame->DrawText(item.GetName(), drawinfo->xpos + ICON_SIZE + 2,drawinfo->ypos + drawinfo->height / 2, DRAWTEXT_VALIGN_CENTER);
break;
}
case MyDialog::LIST_COL_PARAMETER:
{
drawinfo->frame->DrawSetTextCol(IsSelected(root, userdata, obj) ? COLOR_TEXT_SELECTED : COLOR_TEXT, COLOR_TRANS);
drawinfo->frame->DrawText(item.parameter, drawinfo->xpos + 2,
drawinfo->ypos + (drawinfo->height - drawinfo->frame->DrawGetFontHeight()) / 2 + 2);
break;
}
case MyDialog::LIST_COL_PROBLEM:
{
drawinfo->frame->DrawSetTextCol(IsSelected(root, userdata, obj) ? COLOR_TEXT_SELECTED : COLOR_TEXT, COLOR_TRANS);
drawinfo->frame->DrawText(item.problem, drawinfo->xpos + 2, drawinfo->ypos + drawinfo->height / 2, DRAWTEXT_VALIGN_CENTER);
break;
}
default:;
}
}
Bool IsOpened(void* root, void* userdata, void* obj) override
{
return true;
}
String GetName(void* root, void* userdata, void* obj) override
{
return {};
}
Int GetId(void* root, void* userdata, void* obj) override
{
return 0;
}
Int32 GetDragType(void* root, void* userdata, void* obj) override
{
return NOTOK;
}
void Select(void* root, void* userdata, void* obj, Int32 mode) override
{
if(mode == SELECTION_SUB)
m_selected_node = nullptr;
else
m_selected_node = obj;
}
};
@kbar and @m_magalhaes, Thank you for your reply.
I know that parameter changes can be determined by overriding SetDParameter()
.
But I don't know how to override SetDParameter()
to know whether the user has added / deleted keyframes, or changed the value of keyframes (whether the small button next to the parameter is pressed). Thank you again for your help.
Thank,
AiMiD
As I demonstrated above, how to track the user's changes to the parameter animation in a custom ObjectPlugin
, or receive a message when the user changes the animation. Do I need to listen to the above events in ObjectData::Message()
?Can someone help me?
Thank,
AiMiD
@ferdinand Thank you for your reply.
My plugin is written in C++. Is there a way to call redshift.GetRSMaterialNodeMaster()
in C++ 's existing sdk? (or call the python code through C++)
Thank,
AiMiD
I need to get the node information on the Redshift material for a plugin that automatically adds maps, reads maps, and converts Redshift materials to default materials.
I don't know how to get the XPresso stored on the Redshift material. Can someone help me?
Thank,
AiMiD
I use ZipFile::CopyInFileInZip()
to compress the file into a zip package. However, when the file name contains non ASCII characters, the file name is replaced with an underscore. Is there a way to use non ASCII file names in zip without using external libraries?
AutoAlloc<ZipFile> zf;
if (zf == nullptr)
return maxon::OutOfMemoryError(MAXON_SOURCE_LOCATION);
if (!zf->Open(fnZip, false, ZIP_APPEND_CREATE))
return maxon::UnknownError(MAXON_SOURCE_LOCATION);
Filename fnCopy;
while (fnCopy.FileSelect(FILESELECTTYPE::ANYTHING, FILESELECT::LOAD, "Select file to add to Zip File"_s))
{
zf->CopyInFileInZip(fnCopy, "textures/" + fnCopy.GetFileString());
}
Thank,
AiMiDi
@m_magalhaes Thank you for your advice.
Is the dynamics engine in Cinema4D called in a thread?
How does it update the location of the object?
Can you provide a general reference for my project?
Thank,
AiMiDi
@ferdinand @fwilleke80 Thank you for your reply.
I'm writing an IPR (Interactive Photorealistic Rendering) rendering plugin like octane
or redshift
. I need to send scene polygons and materials to the outside through IPC (Inter-Process Communication).
BaseDocument.Polygonize()
solved my problem very well.
I need further optimization, and I need to check whether the scene (tags, objects, et cetera) has been changed.
Does BaseDocument.Polygonize()
copy the Dirty
and HDirty
of the object?
Thank,
AiMiDi
@m_magalhaes Thank you for your reply, I'm sorry I didn't make it clear.
I wanted to create my own implementation of Bullet Engine. Because the dynamic systems of MMD and Cinema4D are different, the transformation is complicated.
I need to do is:
stepSimulation()
to let the engine world update.Thank,
AiMiDi
Hi everybody.
I need to introduce the Bullet Physics engine into C4D to build the Physics system of MMD, AND I need to update objects just like the dynamics system of C4D.
Is there any information that was sent out before the calculation of dynamics?
Is there a more efficient update method?
Thank,
AiMiDi
Hi everybody.
I need to get the final polygon of the current active scene, lights and other objects for synchronization to the external renderer.
I learned that VolumeData can do this. I don't know how a dialog plugin gets the final VolumeData for synchronization.
If you knows how to get the right API, pls leave a comment. That would be really appriciated!
Thank,
AiMiDi
Please use the curve->SetTangents(index, &curveTleftX, &curveTRightX, &curveTleftY, &curveTRightY);
.
Detailed see:
https://developers.maxon.net/forum/topic/13352/ccurve-gettangents-broken
https://developers.maxon.net/forum/topic/13344/ckey-auto-tangents
@ferdinand Wow,thank you so much ferdinand!
@ferdinand
Hello, sir. Recently I also have questions about object axis. I tried to use my keyboard WASD to move the camera along it's own axis, so camera will works like UE4 or a in game flying camera.
Cinema 4d originally provide a way to navigate as a flying camera, which is using 3D Connexion's Space mouse.
If Cinema 4d official can also make c4d support keyboard and gamepad, it would be super helpful for creating huge map and interior, and people can animate camera movement with gamepad by real time recording, like people recording cinematic camera motion by using a iphone with blender.
edit: This posting has been moved by @ferdinand from its original topic
@m_magalhaes Thank you mister, for the solutions! Actually there is real time recording in cinema 4d which is cappuccino in Animate bar.
And there is key smooth function called Key reducer, the algarithm is same to smooth the spline,
adaptively reduce key points and adjust the bezier on F-curve. Blender has same function called Decimate.
But there is no way to smooth the key position on F-curve without delete keys. Such function exists in Blender which called smooth keys.
Now I'm thinking only controlling camera with keyboard.There is actually way to fly the camera like in FPS game which is using 3D connexion's Space mouse.
So I think it's actually easy for cinema 4d official to support both keyboard and gamepad.Then c4d users who are also gamers would all cheers!!!
And thank you agian for offering ideas!
@kbar Thank you so much Mr.Barber, I'm watching your tutorial these days. It's very helpful.
There is already real time recording which is called cappuccino in Animate bar.
All I have to do is the camera control.
Directly modify the position data seems not a good idea, cuz there is input rate limit.
However when people hold middle mouse to move camera, or hold LMB to move object, they move smoothly.
I'm thinking if I can remap this behavior of the mouse to keyboard, and move along Object local axis, not view space.
Thank you again.