Jump to content
3DCoat Forums

wendallhitherd

Member
  • Posts

    18
  • Joined

  • Last visited

Everything posted by wendallhitherd

  1. Hello! I've tried changing most settings on the move brush and I can't seem to get around this issue where you get a pinch on the opposite side of your sculpt when using move brush with alpha. How do I work around this?
  2. Hello! I have been using stencils to get sculpted detail on meshes, it works great! However there is some weirdness I have noticed between different brush modes: An overview: Cube Mapping with a box or lasso selection works great. But when using smooth shading on a matcap, for some reason the resulting normals look clipped and do not represent the geometry. Stamp works but only picks one projection angle, and stroke works but only with smaller brush sizes or you get the same streaking effect as stamp. Step by step: It appears the clipping issue is specific to smooth shading. This can be fixed by switching to flat shading, but I was misdiagnosing the issue because I was assuming wrongly that the heightmap alpha value range was getting clamped (I'm using 32 bit exr). normals update when you use another brush I wonder if there is a way to get all bushes to use the stencil the same way the lasso tool does to avoid those long streaks?
  3. and here are the 3dcpacks decimate_subtree_half.3dcpack ReduceSubtreePolycountHalf.3dcpack
  4. Here is some core api scripts I have been using: if you have feedback please upgrade my scripts I don't know C++ thatdecimate_subtree_half.cpp well, the syntax seems quite arcane compared to python (so many []%~*'s)ReduceSubtreePolycountHalf.cpp First decimates the subtree by half after converting to surface mode, the second simply resamples to half. Thinking about making a git repo for these scripts?
  5. I am feeling very dumb... Played around with the script a bunch to try and get it to work, played with the math on paper, seems out polycount = in_polycount * scaleFactor^2 but this thing gives wrong results, and gets wrongerer with each iteration. Makes me feel like a value in the loop is not being reset properly? #include <CoreAPI.h> EXPORT int main() { { auto active = coat::Scene::current(); float base_square_size; float base_polycount; float cur_square_size; float cur_polys; float scale_factor; float target_polys; float resample_scale = 1.0f; coat::Volume vol; if (active.isSculptObject()) { coat::Volume active_vol = active.Volume(); base_square_size = active_vol.getSquare(); base_polycount = (float)active_vol.getPolycount(); } else { return false; } active.iterateSubtree( [&](coat::SceneElement el) -> bool { if (el.isSculptObject()) { el.selectOne(); vol = el.Volume(); vol.toSurface(); coat::ui::cmd("$ToGlobalSpace"); coat::ui::cmd("$ToUniformSpace"); cur_square_size = vol.getSquare(); cur_polys = (float)vol.getPolycount(); scale_factor = sqrt(cur_square_size / base_square_size); target_polys = pow(scale_factor, 2) * base_polycount; resample_scale = (target_polys / cur_polys); coat::ui::cmd("$Resample", [resample_scale, target_polys] { coat::ui::setSliderValue("$ResampleParams::ResamplingScale", resample_scale); coat::ui::setEditBoxValue("$ResampleParams::RequiredPolycount", target_polys); coat::ui::cmd("$DialogButton#1"); } ); } return false; } ); } return 0; }
  6. Just discovered a pretty good workflow that seems like the best of both worlds and preserves uv edges about as well as can be done. It has the advantage of autopo's simple topology and decimation's accurate shape preservation: Use an autopo mesh for the UV proxy source, this is sort of like a cage: Send this to Blender. Also, send out a decimated sculpt to Blender. The decimated sculpt can be arbitrarily highres, up to millions of polygons. In Blender, use the transfer attributes modifier to project the UVs and seams from the proxy autopo to the decimated sculpt. After transfer to decimated: not perfect, but close enough? Will have to try taking it through baking stage and seeing if there are any serious issues
  7. Hi there! The export displaced high is super cool and I didn't know it exists, but a couple things: - Blender does not support "preserve UV borders" in its decimation algorithm, which means I can't export the high into blender to decimate the high. @AbnRanger The zigzag uv borders might be tolerable but make me a bit sad! To be honest it seems "mostly OK" except when I decimate too much it gets a bit sketchy. This workflow might be usable as long as the decimation is subtle, but I will have to watch out for torn / warped UV borders. @Carlosan Unfortunately I don't really consider auto UV to be super usable for games, since for games anyway texture size is limited and each island incurs a debt to wasted uv space. Autouv on decimated models results in "shattered" uvs with tons of islands, and this winds up performing very poorly in terms of coverage. Here is the results of "decimate, automap, export" For games anyway, fewer islands with a bit more stretching is preferable to more islands and less stretching. Esp. since most texture data in engines for detail maps / tileables must also be carried on the UV. So I consider that option off the table for production, at least for now, sorry! One thing I did hit upon is that using point-to-point mode makes UVmapping decimated models not that horrible? And as long as its around 500k or less tris it seems to be reasonably interactive when unfolding. And it shouldbe possible to transfer uvs from a lower poly to a higher poly decimation, should I need to bring the mesh down to like 100k and then use transfer attributes modifier to copy the uvs over to a higher rez mesh. IMO this is still less optimal than the zbrush method but it does work and means I don't need to hop between apps which might be enough to win me over since I'm primarily using Coat for environment sculpts
  8. Hello! I am trying to use 3DCoat more for an A-Z asset production pipeline and occasionally run into hitches that mean I have to kick the asset over into ZBrush for finishing. One such thing is the ClayPolish mesh filter. This is very useful for prepping a sculpt for autopo or removing surface noise from scandata. or even enhancing a sculpt to have nice sharp features. It is also very good for eliminating small "gooby" shapes from a sculpt that accumulate over the sculpting process, especially for hard surface. I have not found an adequate substitute in 3DC so far Before & after single iteration of ClayPolish The mesh on the right, after a voxelization, is much cleaner for input for autopo, as autopo will not be "confused" by the surface noise present in the input mesh. I know 3DC already has tangent smooth, but it seems to be used for relaxing geometry without changing the shape at all. I also know Angulator exists, but it seems to cause strange divots on flat areas of the model. It seems 3DC has no method of removing surface noise across an entire mesh without also smoothing corners, and this is a super useful tool in ZB when handling scandata! "Cyte" on the Houdini forum has implemented the same thing from scratch and I have rebuild his OTL for myself and use it all the time in Houdini; it's a really awesome way to remove or exaggerate forms while preserving shapes and removing unnecessary detail -- finding the "essence" of the shape. From what I remember the method is a couple existing 3DC functions strung together. First you calculate the tangents of the mesh, then you displace each vertex along its own tangent -- but the vectors are first blurred across the mesh. The larger the blur kernel the larger the shapes are preserved, and the larger the details are eaten. Conversely the smaller the blur on the tangent vectors, the smaller the details are preserved and exaggerated. Then, after the mesh is displaced along its blurred tangents, a simple mesh smooth is applied to relax the self intersections and details -- because the mesh was exaggerated to begin with, smoothing returns it back to an approximated but simplified version of its original shape. The method, put simpler: 1) calculate tangents of mesh 2) blur tangent vectors 3) displace vertices along tangents 4) smooth result https://www.sidefx.com/forum/topic/69286/ The forum post for the interested ^ Generically, there are a few small ui improvements which would help a lot as well. For one thing I think the sharpen, smooth all, angulator, and noise tools could be consolidated into one single "mesh filter" tool, which could handle all mesh fx that do not actually change topology The 3DC tool could either be a docker like this, or even one single tool with mesh filter types! - Another thing I think it needs is a "strength" -- EG what if I only want to add a little bit of angulator? - Lastly, I think the automask settings that show up under angulator (for mask edges) should be in a generic "Mask Generator" tool rather than hidden away in the settings of the angulator. One common thing I do is use edge masking from angulator and then invert the mask to apply smoothing. Anyway, I love the development of 3DC so far but am really itching to reduce the amount of apps I use, and consolidate everything into one, but there are a few critical tools that mean I am still firing up ZB and exporting big highpoly OBJs to final models and it would be really great if 3DC did those things so I wouldn't even need to open ZB! All the best!
  9. Hello! For static environment objects that require "simple" uv patches to maximise texel density I have found that the best workflow is one similar to the way Maria Panfilova does her textured sculpts for presentation. In this case, the workflow is - Make sculpt - ZRemesh & project to get semi reasonable loops - UV Remeshed low - Pose - Decimate posed mesh with UV preservation on - Take into texturing app for texturing, render This matches very closely to the workflow developed by the Coalition for creating environment props for Nanite in some of their recent tech demos, and is generally a great method for producing decimated meshes that preserve the simplicity of uv shells and also makes unfolding much faster, since you're working with way fewer polygons. Coalition did a lot of proxy mesh projection to bring simple UVs over to their nanite lod0. I will demonstrate briefly: So far 3DC decimates, supports autopo + uv, etc, but I am a bit stuck at the subdivide / project / decimate with uv preservation step. Does 3DC support this kind of workflow, and if it does, what am I missing?
  10. I almost finished a script that would make all layers in a subtree a consistent polygon density, but this is giving janky results, I think it's because GetVolume is not doing what I think it is (size x * size y * size z)... In any case once it works it will be super handy to be able to get rid of wildly different topo densities in a subtree without having to vox merge but it looks like the BBX / BBY of a sculpt layer is tucked away in the VoxelObject, which can only be retrieved by a pointer, and I have no idea how to use pointers. Here's the WIP script anyway. Also one thing I'm noticing, there seems to be no way in the API to check if an object is selected or not, or iterate over selected objects :B I found "active" but I think that's a setter and not a getter EXPORT int main() { { // get the sculpt root //auto root = coat::Scene::sculptRoot(); auto active = coat::Scene::current(); float polys_per_unit_size; float resample_scale = 1.0f; coat::Volume vol; if (active.isSculptObject()) { coat::Volume active_vol = active.Volume(); polys_per_unit_size = (float)active_vol.getPolycount() / active_vol.getVolume(); } else { return false; } //coat::ui::toRoom("Sculpt"); // iterate through all sculpt objects active.iterateSubtree ( [&](coat::SceneElement el) -> bool { if (el.isSculptObject()) { el.selectOne(); vol = el.Volume(); vol.toVoxels(); coat::ui::cmd("$ToGlobalSpace"); coat::ui::cmd("$ToUniformSpace"); int target_polys = (int)(polys_per_unit_size * vol.getSquare()); float resample_scale = (float)target_polys / (float)vol.getVolume(); coat::ui::cmd("$Resample", [resample_scale, target_polys] { coat::ui::setSliderValue("$ResampleParams::ResamplingScale", resample_scale); //coat::ui::setEditBoxValue("$ResampleParams::RequiredPolycount", target_polys); coat::ui::cmd("$DialogButton#1"); } ); } return false; } ); } return 0; }
  11. EXPORT int main() { { // get the sculpt root auto root = coat::Scene::sculptRoot(); auto active = coat::Scene::current(); //coat::ui::toRoom("Sculpt"); // iterate through all sculpt objects active.iterateSubtree ( [&](coat::SceneElement el) -> bool { if (el.isSculptObject()) { coat::Volume vol = el.Volume(); vol.toSurface(); int cur_polycount = vol.getPolycount(); //vol.toVoxels(); el.selectOne(); coat::ui::cmd("$Resample", [cur_polycount] { //coat::ui::setEditBoxValue("$ResampleParams::RequiredPolycount", tgt_polycount); float scale = 0.5f; coat::ui::setSliderValue("$ResampleParams::ResamplingScale", scale); coat::ui::cmd("$DialogButton#1"); //coat::ui::apply(); } ); } return false; } ); } return 0; } This will reduce the polycount of the subtree of the currently active object by half. it leverages both core api scene commands as well as sending commands to the 3DC UI to "click buttons". Super excited about the potential for automating 3DC here!!
  12. I have made a box for putting commands in! This iterates over the entire root subtree and sets it to surface and then back to voxel again int main(){ { // get the sculpt root auto r = coat::Scene::sculptRoot(); auto active = coat::Scene::current(); coat::ui::toRoom("Sculpt"); // iterate through all sculpt objects r.iterateSubtree ( [&](coat::SceneElement el) -> bool { if (el.isSculptObject()) { coat::Volume vol = el.Volume(); vol.toSurface(); int cur_polycount = vol.getPolycount(); vol.toVoxels(); } return false; } ); } return 0; } now to proceed with my dumb questions: - How would I test for if the scene element is "selected" using quick pick +? - coat::mat4 is referenced in the docs as being identical to cMat4. In practice they seem to do different things, cMat4 raises errors when run in 3DC despite being "fine" according to the linter, and coat::mat4 m = coat::mat4:Identity gets picked up as an error in the linter but runs fine in 3DC. (I'm using the default settings from the VS install 3DC triggers automatically) - What if I wanted to apply transforms on everything and resample volumes in global space? I can seem to set transforms and transform voxlayers in the core api but I don't see a way to apply transform to the layer. I suppose this is where calling more UI comes in?
  13. I don't think so! You might have some permissions issues or an antivirus blocking 3DC / blender producing folders? TBH I don't know how it works under the hood
  14. Oh, and a big one is multiple parenting. So far with the angelscript stuff and also the 3DC GUI I haven't found a way to parent multiple selected objects at the same time, I have always had to go one by one. if I can use shift-H to select many voxlayers and then parent multiple of them to another voxlayer at the same time that would be amazing!
  15. Hello! I am fairly unfamiliar with the syntax of C++ but I can mostly read it, however many of the example core scripts are a bit beyond my comprehension on first look. I wonder if it would be possible to have some more scripting examples that do simpler things but act as frameworks for extension so that me (and others like me just picking up the API) can make useful tools out of the examples while learning? A few example templates that could be useful, just brainstorming: - A script that performs an action on the current voxlayer - a script that performs an action on all selected voxlayers - a script that iterates over the child voxlayers, from parents to children or children to parents and does an action - a script that matches voxlayers with a particular name pattern and performs an action if their name matches - A script that batch renames stuff The many template scripts and simple five-liners one can get for free off the internet and adapt is a great way to get familiar with an API! For non-coders starting from scratch can be a struggle
  16. Hello! I was asked to mirror the process I found for un-borking my 3DCoat applink. Hopefully someone will find this helpful! Original post found here: From the jump: """ Hey there! I just finally got the applink to work, after a whole bunch of struggling. The main issue is that old versions of 3dcoat interfere with new ones. The secret is: - Delete every applink related folder out of my docs. both the app link and 3DC seems to write text files which contain path strings -- if any of these files contain a reference to an old directory either 3DC or blender will automatically recreate that old folder. In my case, every time I would launch Blender a "3DCoatV4" folder would be spawned - Deleting every applink folder includes, in my case: C:\Users\16042\Documents\3DC2Blender C:\Users\16042\Documents\3DCoat-2021\Exchange (I renamed 3dcoat-2021 to 3dcoat-2021_old) C:\Users\16042\Documents\3DCoat\Exchange - Open 3DCoat and close it. This will respawn the 3DC exchange folder. (C:\Users\16042\Documents\3DCoat\Exchange) - Open Blender and plug in the freshly spawned exchange folder to Blender plugin exchange path. I was able to leave the object / texture empty - Send a Voxel object to 3DC. This will spawn C:\Users\16042\Documents\3DC2Blender folder. - In 3DC, autopo, automap, and use "export to -> blender". As far as I can tell this will cause 3DC to spawn the C:\Users\16042\Documents\AppLinks\3D-Coat\Exchange\Blender folder. Choose any fbx name you want. - Export preset should be either Blender Cycles or BlenderAppLink. I used BlenderAppLink - Back in Blender, click the "GetBack" button. This will spawn the object exported from 3DC and hook up the PBR shader! As a side note I think the applink code on the blender side is hardcoded to spawn 3D-CoatV4 folder, as it keeps popping up after I delete it when I use "get back" out of blender. Luckily it doesn't seem to interfere with anything so long as the initial setup is clean. """
  17. Hey there! I just finally got the applink to work, after a whole bunch of struggling. The main issue is that old versions of 3dcoat interfere with new ones. The secret is: - Delete every applink related folder out of my docs. both the app link and 3DC seems to write text files which contain path strings -- if any of these files contain a reference to an old directory either 3DC or blender will automatically recreate that old folder. In my case, every time I would launch Blender a "3DCoatV4" folder would be spawned - Deleting every applink folder includes, in my case: C:\Users\16042\Documents\3DC2Blender C:\Users\16042\Documents\3DCoat-2021\Exchange (I renamed 3dcoat-2021 to 3dcoat-2021_old) C:\Users\16042\Documents\3DCoat\Exchange - Open 3DCoat and close it. This will respawn the 3DC exchange folder. (C:\Users\16042\Documents\3DCoat\Exchange) - Open Blender and plug in the freshly spawned exchange folder to Blender plugin exchange path. I was able to leave the object / texture empty - Send a Voxel object to 3DC. This will spawn C:\Users\16042\Documents\3DC2Blender folder. - In 3DC, autopo, automap, and use "export to -> blender". As far as I can tell this will cause 3DC to spawn the C:\Users\16042\Documents\AppLinks\3D-Coat\Exchange\Blender folder. Choose any fbx name you want. - Export preset should be either Blender Cycles or BlenderAppLink. I used BlenderAppLink - Back in Blender, click the "GetBack" button. This will spawn the object exported from 3DC and hook up the PBR shader! As a side note I think the applink code on the blender side is hardcoded to spawn 3D-CoatV4 folder, as it keeps popping up after I delete it when I use "get back" out of blender. Luckily it doesn't seem to interfere with anything so long as the initial setup is clean.
  18. Hi there! I'm "LKS" on the 3DC discord. I've been trying to learn scripting in angelscript since the recent 3DC api overhaul and I figured I'd post the results of my efforts here. Keep in mind, I'm somewhat of a turbo-noob to coding, but many of the most useful scripts I've made for other apps are just a few lines long anyway, so maybe someone will find some use! First script reduces the polycount of the selected voxlayer by half. I mapped it to alt-D. Second takes all children of the selected voxlayer and parents them to a new root. I made this to deal with the issue of deeply nested voxlayer hierarchies being created as a result of using the split tool. It may or may not work in all circumstances, but it seems to so far! I'll add updates as I do more. decrease_resolution_by_half.as reparent_children_to_root.as
×
×
  • Create New...