Jump to content

McDev

Registered Member
  • Posts

    41
  • Joined

  • Last visited

Profile Information

  • First Name
    Kevin
  • Last Name
    Scheitler
  • Location
    Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

McDev's Achievements

Newbie

Newbie (1/14)

  • First Post Rare
  • Collaborator Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

12

Reputation

  1. I was able to continue with this and making quite some progress. Also I switched over to Python now, this really is easier! EDIT: Found the soultion: shader.CheckType(1029508) Currently I try to convert an Octane Material. The issue is now that I need to check the textures. I ask for the BaseShader object and want to know if it is an (Octane) Texture Shader. The Property says this: print mat[c4d.OCT_MATERIAL_DIFFUSE_LINK] <c4d.BaseShader object called 'Name/ImageTexture' with ID 1029508 at 0x0000020CAEDABE10> Now how do I check if the property is this object, how can I access the ID "1029508"?
  2. Well I have to learn a lot, makes me question if I should switch to python 🙂 First I had to change the GETACTIVEOBJECTFLAGS to ::CHILDREN as ::NONE would only give the root objects. I though that this would select all the children of selected objects as well. I tried to do that but obviously this is not working. Can someone point out to a noob how this can be done? Or should this even work as expected? I am only getting "Tags found: " not "Tags found: 0" int tagcount = tagList->GetCount(); ApplicationOutput("Tags found: " + tagcount); EDIT: I don't want UVW Tags, I want TextureTags of course... So this is semantically wrong. Also I tried getting a list of tags but I failed. As I don't even know yet how to use dynamic arrays (but I will soon) I choose the AtomArray, but it doesn't seem to take the tags that I append (very bottom and yes it is called). I wonder why? Also what kind of List would be ideal to store tags or other objects? Is AtomArray common or rather some specific Tag list? Do I make a fundamental mistake here? Well my current goal is: 1. Get all UWV Tags of selected objects. 2. Filter these tags by some rules (if offset and scale are not normalized) 3. Select these tags in C4D (deselect everything else) 4. Optionally change some of their values. I just ask dummy questions, if someone helps that is great, if not I keep digging 🙂
  3. Alright this is getting better! I hate the documentation but I was able to find out how GetActiveObjects can be used. I also managed to get Debugging working, apparently I was not having the correct project set to be run in VS... This code now deletes all TextureTags except the right hand side one of all selected objects.
  4. I wasn't sure if you should do that per Tag or rather per Operation. Because say you delete 200 Tags of 100 objects, do you add 200 Undo entries? Wouldn't you want just one for the whole operation? Like say Remove unused materials. Thanks for the extra tips, makes total sense. I still had trouble with the Debugging, that is something else but I don't have the code until Monday. It is I guess still trying to find some lib file within the Project-SDK folder.
  5. Thanks, I got this working for C++ as I rather hate python. Still I need to learn more C++ fundamentals. For now I miss how to get selected or all objects how to debug (start debug fails, no valid Win32 Application) or write a console log And yes the Octane Materials work with the regular TextureTag. class RemoveTextureTagsButLast : public CommandData { public: virtual Bool Execute(BaseDocument* doc) { doc->StartUndo(); BaseObject* const object = doc->SearchObject("Cube"_s); if (object == nullptr) return false; int count = GetTagCount(object); RemoveTagsFromLeft(object, count); doc->AddUndo(UNDOTYPE::DELETEOBJ, object); doc->EndUndo(); //Does a refresh of the editor windows EventAdd(); return true; } int GetTagCount(BaseObject* object) { int count = 0; while (object->GetTag(Ttexture, count)) { count++; } return count; } void RemoveTagsFromLeft(BaseObject* object, int count) { for (int i = 0; i < count - 1; i++) { object->KillTag(Ttexture, 0); } } };
  6. Hello, I have this situation that we mainly do offline rendering using Octane but often I am assigned to make Realtime apps based on these models. It is absolute horror sometimes to convert these scenes, with mixer materials inside mixer materials and multiple assigned material stacks (although only the last one is rendered). Currently we only run R20 btw. Here are reocurring tasks that I do: Strip away all the material tags except the last one. Reassign materials (if a material is assigned to a null-parent, I want it to be assigned to the mesh below unless it has a texture-tag already) Normalize UV coordinates (sometimes offset is set to 100% but I need it to be 0%, otherwise the engine importer/fbx exporter will generate another material instance... Same is for scaling. Bonus: Apply Texture-Tag offset and scale to the actual UVW tag and normalize the texture-tag this way. Converting Octane materials to C4D materials (Diffuse color and texture would be enough). So can someone give me any hints on how to approach this, if things can't be done (especially regarding octane) and if I should stick to C++ or python? I messed around a little bit with c4d plugin development but I simply have no starting point currently. I always feel so lost when I see a new API and I don't want to do mistakes, especially as a C# dev C++ is a bit new. Maybe I simply post my progress and code here and get some feedback or maybe someone can help me out to maybe get started with the first point in the list? It basically should be iterating all the nodes and removing all Material tags except the right hand side one. Shouldn't be that complicated... Any other wishes that come to your mind? Well I already bookmarked this one, I should start with this for now 🙂
  7. Hello. I got a plane of spheres that I want to react to an audio source. My idea is that the audio file generates an impulse that shall travel through the spheres, for example along the Z axis. One way of doing so could be a delay, say that the first row of spheres always samples the current frame of the audio source, while the n-th row samples the audio from -1 second or so. I already think about making only one Row of dots that I use in another CLoner Object and use X-Presso to apply delay the position of each dot, I only have no idea how to 🙂 What I have currently are two shader Effectors with noise that use a Sound Field a Falloff. But that looks pretty bad, the sound field only scales the noise but it doesn't look dynamic enough. What does the Delay Effector/Field actually do? I tried to smooth out the sound effect and it kinda works but at some point I still get some sudden jumps.
  8. Just tried it, didn't seem to work and it seems that I need one shader field for each material? All this is more of a burden and I need a quick workflow before I export, especially when I may want to make changes to the meshes and materials. I'd rather have the source to be materials, the vertex colors I only need for export. But I learned now that disconnection isn't necessary if the vertex mode set to Polygon Points. Maybe I can try to just use vertex colors from the beginning, the main downside is that they do not show up in the editor unless the tag is selected. The downside would be that there is no clear connection across multiple meshes, the color needs to be the same and a material guarantees that. Otherwise I need to do some color picking that can be wrong on occasion.
  9. In order to bake highpoly models vertex colors are the best way to define material IDs across multiple meshes. I could not find a way to set that up easily, other tools like Modo seem to have such a feature. So what I need is a tool that draws the vertex color based on the material diffuse color. The tool should also disconnect the mesh selections as otherwise there are no hard edges and in some situations the colors can not be applied correctly like shown below. The command should apply to the current selection of meshes. If there is no solution and you think that you can do that may PM me.
  10. We get R20 soon hopefully, this shall fix it ^^
  11. Does not help, in fact it seems to be worse, in new files it is now also 2 cuts, even after deleting preferences again :(
  12. Deleting prefs fodlers worked. I tried the middle mouse button but it did not change the settings permanently. It makes sense if I hit it accidently and it chagned the setting somehow. But yes the setting is greyed out when you have not clicked. EDIT: OK, it seems that this issue is persistent in the file, when I create a new file it works as intended.
  13. Whatever I did, when I select the loop cut the numbers of cuts is set to 2 by default. Very annoying. using R19.
  14. Not sure if it has been said, but the most important feature for me I just found out by accident. It's quite simple but the Create Point Tool now does not destroy the UV on a Polygon! So you can Add points on textured models. This was a feature request of mine. Also with the R18 knife tool this works great. It is great for working with Textured models or using a Texture to mesh modelling technique, which would have been possible only with frontal or projection mapping before.
  15. I just tried it again and it actually works! Not sure what didn't work at the first try of mine. OK those are some nice improvements then. I am also diggin deeper into PlugIn creation and the C++ examples are a nice to learn from, not that hard to go through as I was thinking.
×
×
  • Create New...

Copyright Core 4D © 2023 Powered by Invision Community