Jump to content

McDev

Registered Member
  • Posts

    41
  • Joined

  • Last visited

Everything posted by McDev

  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.
  16. Thanks for the input, Seamilar II looks very interesting! That Align Edges tool is exaclty what I had in mind for points at least. Also UV vonc seems quite advanced, I will check them out! I am also looking into some resources by MAXON right now to see where I can get. But if I don't even have to do that stuff even better
  17. Cinemas UV Tools I think haven't been touched in a decade. Even though I didn't expect anything I just opened up R19 and I saw a single yellow entry (new features) which is the Select Tab in the toolbar, which is at least something. I demand an improvement! So I had this idea for some UV tools a while ago and now in this Forum maybe I can find help. Eiher there is something around already or I can figure out how to do it on my own or maybe even find somebody who is interested in collaboration. That said I have no idea where to start, I made a simple Python script and it was a mess. I know C# quite well so C++ would be fine but I really have to get into that. Can you point me in the right direction? Where should I start and what can I even expect. I maybe have to make my own window that you would put next to the UV Tools and maybe some extra buttons that you can add in the UV Toolbar. Would it be possible to extend tabs or eve ncontent inside of the UV Mapping Window? E.g. the Transform Tab? So anyway here is a few things that I want to have, what do you like to see? Make Vertex positioning easier It is not possible to set the position of a UV point directly, I am only able to move it relatively. I want to set a point exactly on X=1? Impossible, or am I missing something? Line up and even out Especially helpful when working with modified regular geometry like curved strips or extruded and beveld cylinders. Then I want to have a regular UV but mostly I end up with distorted UVs when I use auto tools. This mostly is a task where I iteratively line up edges, lock these points and do another relax. After some clicking you end up with the result in the middle, then you go over each line inside and ideally both directions. The result then isn't perfect but to work with. (Sure for this example I could just use a cylinder mapping as the right image shows). Helpfull (one click) tools: Flatten: (scale x or y to 0). Line up: scale x/y to 0 and make a regular distance for each selected point on the other axis. Optionally select an existing point which will be chossen as a reference. Gizmos for moving or another way to move only in one direction with the mouse. Snap UV to grid / Texture resolution Say you want to bake textures like lightmaps or you work on tillable textures this feature is helpful. Because if you refer to pixel 1, instead of 0,93 the result can be very different, especially when baking and working with tiling textures. Make Layouting easier E.g. sometimes I want to stack UV Shells evenly in a row or simply move and scale a piece to a specific location. So imagine atlassing, I have my UV setup in full size but I want it to move to the upper left corner and divide the UV in 2x2 cells. This all requires some nested transform calls and weird calculations, especially when we talk about uneven numbers and non quadratic textures. Remember this is because I need exact numbers, not just approximately moving by hand. Support Atlases and multi object UV Edit Now this is way more complex but that is something I am confronted with so often. The only solution to work with multiple objects on one UV layout is to draw their edges in a texture. As layouting requires some trial and error I have to redo the whole map at least 2 times. So having a solution which draws UVs of other objects inside the window would be great. If it was even possible to apply alignment algorithms to multiple objects that would be amazing. I even have some ideas here. That said, I know how to do stuff in theory, but not practically in Cinemas API :) I worked on Unity Editor scripts so I have a grasp on how it could look like. As long as I get lists of UV points and we speak of simple Vector2 Coordinates at the end, that should be doable.
  18. It has been a while now but I finally got some time to continue to work on that project, no much has changed but I thought I give an update. I focus to avoid HighPoly baking for this and do textures in photoshop if I can. For the modelling I use of what I call midpoly modelling by chamfering edges and using the advantage of the Vertex Normal Editing Plugin. You can then have a highpoly appeal by a simple one level chamfered edge. I also use this project so see with how many triangles I end up for the whole scene and if it is still feasible for the lightmapper and how performance is once it runs in Unity. I start to model object by object. In the first step I will do the modelling of each object and the texture blockout. As you can see for the desk I figure out the UV layout and then grab parts from pictures. Later I will replace that with an actual texture and add specular and normal maps. I try to minimize Texture usage and repead as much as I can combined with variation shader techniques, e.g. VertexColor to overlay or second texture maps. For cinema I use X-Ref objects for that. I take my blockout model and convert that into an xref. So I turn my blockout scene step by step into the final scene, using incremental saving of course. Also I try to use genrators and non destructive techniques until I got my final result, then I merge anything down to as few objects as possible. That desk for instance was heavily using the array generator, but now consists of 3 objects and materials (Red shelf, marble plate and the outside). I try to get an accurate model of the environment so I try to count the number of things and guess their size, especially for the building elements. Otherwise you will run into problems later where certain things may not fit exactly. But I only do that on the very broad view and I am not going to focus on any tiny detail. If people watch it for the first or second time and they think this is an accurate replication that is all I want. Also I think the set designers have been very kind and made things repeat and mirror a lot :P
  19. Those are some very nice additions! I like the Poly reducer tool. Will it work with baked Normals? That would be great. Also one question, will the LOD System work in the render or is it only usable for the viewport?
  20. That is pretty straight forward, you have to setup your renderer for the scale you want to use it. One example is AO and the Raylength settings. These pretty much define how the AO will look like and which details it will cover. AO can either cover the oclusion of Skyscrapers in a street or the tiny edge between your mug but can not provide both unless you have a second layer of AO with different settings. This is one reason why GI is a better solution as it can suit you for both scenarios but is of course much more expensive. I agree that raytraced and physical based renderers are able to handle more without specific adjustments right out of the box. What will be different is the material definition as for instance the thickness and depth of your liquid layer as a 2m layer of liquid absorbs more light than a 2cm layer of liquid.
  21. That is great news. I still have my 7 Year old AMD X6 which I plan to replace soon. Good timing AMD :) I wonder is there any inbetween solution like 8 Cores? The price difference is big between the 4 and 12 cores.
  22. I currently have the issue that I need to export my model into another axis system. It is right handed, not left handed as C4D and has different orientations. The only proper solution I found so far is the obj. exporter which allows Axes swapping and this does works great. The downside is that Normals are broken (with the vertex normal tag), materials are off and all groups and pivots are gone. My question is if there is any other way of doing this inside Cinema or if you know another tool which can do that (Maya, Motion Builder, MAX?). I searched the web but I didn't really find anything. This sounds like the most trivial thing to do but is currently drinving me crazy. The issue is that I cannot just tweak the root node of the model, an axis transformation has to be applied properly on all objects. Tweaking the root node will leave the child nodes unaffected.
  23. Don't have a lot of time, new job and new home but from July I should be able to continue. So far I did a test in Unity and I am quite happy with the pillars. Yet I wonder how the whole scene will look like. Light baking and color grading will be the major challenges I project to achieve a similar look of the original. In those shots I used downsampling so the image was rendered in 2-3 times of the resolution.
  24. Here is the final model with a tail, it was quite hard to make.
  25. Just a quick model from The Lego Movie. Rendered in C4D Physical Renderer.
×
×
  • Create New...

Copyright Core 4D © 2024 Powered by Invision Community