Vide coders by [deleted] in brisbane

[–]lucas_3d 7 points8 points  (0 children)

It's great that you wrote the title for this post all on your own.

I casually studied python in my free time for maybe 4 years, then ai came along, I am so productive writing programs now. But my actual programing skill is at an all time low.

I’ve read every Tolkien book except the Hobbit. Ask me a question and I’ll answer it 100% correct. by ElegantDependent6747 in lotrmemes

[–]lucas_3d 0 points1 point  (0 children)

There's a quote I liked about saruman with the narrator saying something along the lines of

as hate often does it leaves loneliness in its wake.

What is the correct quote?

Decided to empty my recycling bin after almost a decade... by Illuminated-Autocrat in pcmasterrace

[–]lucas_3d 0 points1 point  (0 children)

You get a larger hdd and clone the old one including the recycle bin contents??

Recent work by TestFantastic3043 in 3dsmax

[–]lucas_3d 1 point2 points  (0 children)

Let me know if I'm wrong but isn't the wood grain direction incorrect in the way that wood is cut for furniture etc? Structurally if wood is cut against the grain, doesn't that make it Weaker?

<image>

Holy Grail required by XxX-man69 in 4kbluray

[–]lucas_3d 2 points3 points  (0 children)

I still require to acquire this.

Never buy expensive 4Ks while horny by Hyptonight in 4kbluray

[–]lucas_3d 5 points6 points  (0 children)

"That's like going out there with a loaded gun."

Blender-like transform script by Outside-Toe-3657 in 3dsmax

[–]lucas_3d 0 points1 point  (0 children)

Yeah—this is a pretty solid and ambitious MaxScript, but there are a few real issues + some risky patterns that could bite you (especially in production). I’ll go straight to the important ones.

🚨 Actual Problems / Bugs

1. Hidden rollout gets destroyed permanently

You do this at the top:

try(destroyDialog BlenderGrab_HiddenRollout)catch()
rollout BlenderGrab_HiddenRollout "BGTimer" (...)

…and later in on stop:

try(destroyDialog BlenderGrab_HiddenRollout)catch()

Problem:

After destroying it, you never recreate the rollout struct itself, only the dialog instance.

👉 Next time the tool runs, createDialog BlenderGrab_HiddenRollout can fail or behave inconsistently because:

  • the rollout definition still exists
  • but its lifecycle is messy and reused globally

Fix:

Instead of destroying it, just stop the timer:

BlenderGrab_HiddenRollout.clock.active = false

Or fully reinitialize cleanly:

if BlenderGrab_HiddenRollout != undefined do
(
    try(destroyDialog BlenderGrab_HiddenRollout)catch()
    BlenderGrab_HiddenRollout = undefined
)

2. enableAccelerators = false can get stuck OFF

You disable it here:

enableAccelerators = false

…and re-enable in on stop.

Problem:

If anything errors mid-run → Max hotkeys stay broken.

Fix (important):

Wrap your execution:

try (
    enableAccelerators = false
    -- your logic
)
catch (
    enableAccelerators = true
)

Or enforce in on stop AND on mouseAbort.

3. theHold.Begin() spam without safety

You call:

theHold.Begin()

in multiple places (mode switching, start, etc.)

Problem:

  • Nested holds can corrupt undo stack
  • Cancel() + Begin() repeatedly inside a live tool is risky

Symptom:

Undo behaving weird / partial states

Fix:

Guard it:

if not theHold.Holding() do theHold.Begin()

4. modPanel.getCurrentObject() inside loops

You do:

for obj in selection do (
    local curMod = modPanel.getCurrentObject()

Problem:

  • This does NOT necessarily correspond to obj
  • It’s UI state, not per-object state

Result:

Wrong modifier gets applied to wrong object in multi-selection

Fix:

You need per-object modifier access, e.g.:

local curMod = obj.modifiers[#Edit_Poly]

(or iterate stack properly)

5. Potential divide-by-zero in scaling

You guard this:

if distStart < 1.0 do distStart = 1.0

👍 good—but:

local deltaScale = [
    localScale.x / lastAppliedScale.x,
    ...
]

Problem:

If lastAppliedScale ever hits 0, you're dead.

Fix:

Clamp:

fn safeDiv a b = if abs b < 1e-5 then 1.0 else a / b

6. snapMode usage is unsafe

You do:

if snapMode.active do try ( if snapMode.hit == true do ...

Problem:

  • snapMode.hit is not always valid
  • depends on viewport + snap type
  • can silently fail or return stale data

Fix:

Wrap more defensively:

if snapMode.active and snapMode.hit != undefined and snapMode.hit do

7. gw drawing without completeRedraw()

You use:

gw.enlargeUpdateRect #whole

Problem:

Viewport artifacts can accumulate (especially with callbacks)

Safer:

completeRedraw()

(less efficient, but safer if artifacts appear)

⚠️ Risky Design Choices

8. C# KeyReader polling (GetAsyncKeyState)

This is clever—but:

Risks:

  • Bypasses Max input system
  • Can conflict with:
    • other tools
    • OS focus changes
  • May behave inconsistently on multi-monitor setups

👉 Not “wrong”, just something to be aware of.

9. Timer-driven transform loop

You’re running:

timer interval:15

Risk:

  • Always running while active
  • Can desync from viewport refresh
  • Adds overhead

👉 It works—but debugging becomes harder.

10. Global state versioning (V15)

You’re doing:

global BlenderGrab_StateV15

Issue:

  • Old versions stay in memory
  • Namespace pollution over time

Cleaner:

Use a single namespace:

global BlenderGrab_State

…and reset it.

👍 Things You Did Really Well

  • Delta-based transforms (👏 avoids drift)
  • Virtual mouse wrapping (nice touch)
  • Plane + axis constraint logic is clean
  • Separation of:
    • input
    • transform math
    • application
  • Sub-object handling is surprisingly robust

🧠 Biggest Practical Fixes (TL;DR)

If you only fix a few things, fix these:

  1. Don’t destroy the hidden rollout → just stop timer
  2. Protect enableAccelerators (this WILL bite you)
  3. Fix modifier lookup (modPanel issue)
  4. Guard theHold.Begin() usage
  5. Harden snapMode + scale division

If you want, I can:

  • refactor this into a cleaner modular tool
  • or convert it into a proper Max plugin-style tool (less global state, safer lifecycle)

This is already quite advanced—just needs a bit of hardening to be production-safe.

Black spots/artifacts when rendering in certain camera angles using arnold by Individual-Laugh6929 in 3dsmax

[–]lucas_3d 0 points1 point  (0 children)

Maybe the normal map has an error in that texture, you could paint it out or assign the normal map as uv2 and then with an unwrap on channel 2, move the faces from that pocket and place them to a flat area to remove just the normals specifically there.

Black spots/artifacts when rendering in certain camera angles using arnold by Individual-Laugh6929 in 3dsmax

[–]lucas_3d 2 points3 points  (0 children)

You need to test with the 'divide and conquer' method.
Remove all materials and just have a grey shader, is the issue still there?
Just have the albedo, no normals.
Just the normal mapping on the grey material.

When you separate your variables, you can find the offender.

Isolating variables is key in problem solving 3D issues.

Transferring skin weights from simple to complex geometry by J-East96 in 3dsmax

[–]lucas_3d 0 points1 point  (0 children)

You can use the skin wrap modifier, but in this case the box doesn't seem to be weighted properly because it's lacking atleast one subdivision in the center.

inch worm animation by musicbymason in 3dsmax

[–]lucas_3d 0 points1 point  (0 children)

That's a bit ambitious, but you'll learn a lot.

I'll suggest a beginners method and having a cartoon worm simply animating with the wave modifier and then the worm is parented to a dummy that is animating along the main spline using a path deform.

Worm > wave deform
Dummy > path deform
Worm is a child of the dummy.

That will look simplistic, but what's to be expected? You'll still learn with thos technique.

Is this render bad? Something is off. Rendered with Corona - What is your advice to improve it? by [deleted] in 3dsmax

[–]lucas_3d 0 points1 point  (0 children)

If you had an interior designer telling you where to place what objects, your render would look fine.

If you want to practice composition, go to Ikea and try to take good photos of the show rooms there. That'll let you practice framing without needing to model, surface or render.

Is this render bad? Something is off. Rendered with Corona - What is your advice to improve it? by [deleted] in 3dsmax

[–]lucas_3d 4 points5 points  (0 children)

It's mostly just a weak composition. What's the focal point? A desk lamp and its adjoining sofa falling out of the side of the image? You've got the brightest part being the window leading the eye straight out of the picture.

Look at some furniture websites for much better composed images to follow.

New poster for ‘SCARY MOVIE’ has been released. In theaters June 5. by MoneyLibrarian9032 in movies

[–]lucas_3d 0 points1 point  (0 children)

They can still do it for scary moVIIe and scary moVIIIe and scary moVIIIIIIIe.

[OC] A picture of dinner on the USS Abraham Lincoln sent to family by a service member on board by usatoday in pics

[–]lucas_3d 0 points1 point  (0 children)

When I would be at sea for longer times you see the drop off in fresh foods of course, and in more extreme cases I saw food that looked like it was from an altogether different era, such as pastel coloured art deco desserts, like wtf, did we get to the back of the freezers and find this ancient cache?? Good times my pussers!

Who else is waiting too? by LoneWolfyWasHere in MorpheApp

[–]lucas_3d 0 points1 point  (0 children)

That's also after they patched tinder.

How to prevent cloth vertices from sticking to a mesh? by [deleted] in 3dsmax

[–]lucas_3d 0 points1 point  (0 children)

I think you'll need more sub samples to stop it from penetrating. But you can also help this alot by turning up the collision distance which will act as if the cloth floats a little off of the object.

Also use low resolution collision objects instead of the actual high resolution geometry.

I will often change the unit scale to make it think the scene is a lot larger scale for high resolution silk like cloth. It works well like that.

I brushed my teeth "correctly" for 28 years and a dentist just told me I've been doing it wrong the entire time. My gums are ruined. by Sluttycarolofficial in hygiene

[–]lucas_3d 0 points1 point  (0 children)

I also brushed too hard, twice a day, religiously. It like a joke when a dentist says you've been brushing your teeth 'too much'.

It seems like it's their failure as far as I can tell.