How to delete object during animation

santaclous
Enthusiast
Enthusiast

How to delete object during animation

santaclous
Enthusiast
Enthusiast

Hello. 
I have animation. Time line is  0-200. 
I want to delete object in 100 key frame. 
DELETE no HIDE ! 

@RobH2   @MartinBeh 

0 Likes
Reply
425 Views
8 Replies
Replies (8)

MartinBeh
Collaborator
Collaborator

I don't think that is possible. A scene object (proper term is "node") is either present or not. 

 

You can change its visibility, the mesh itself (e.g. you could delete all faces at frame 100), you move it to a position very far away, and many other things, but the object/node will still be present in the scene.

 

Can you explain why do you need to delete instead of hide?

Martin B   EESignature
→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.
0 Likes

santaclous
Enthusiast
Enthusiast

@MartinBeh wrote:

Can you explain why do you need to delete instead of hide?


I try to add Visibility Track  and I export to fbx  but it is still visible in Lumion. 

0 Likes

MartinBeh
Collaborator
Collaborator

Sounds like you need to animate the visibility in Lumion then.

Or: how about scaling the object down to 0% on frame 100?

Martin B   EESignature
→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.
0 Likes

santaclous
Enthusiast
Enthusiast

@MartinBeh wrote:

Sounds like you need to animate the visibility in Lumion then.

 


It is not possible to select objects that are in one file. All animation is done in 3DS Max. 
Scaling does not solve the theme problem.

Maby script but An error occurs

deleteTime = 1360


fn deleteObjectAfterTime obj time =
(
    if currentTime == time then
    (
        delete obj
    )
)


obj = $Box 
when animate on time change do
(
    deleteObjectAfterTime obj deleteTime
)



0 Likes

MartinBeh
Collaborator
Collaborator

What "theme" problem?

Martin B   EESignature
→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.
0 Likes

RobH2
Advisor
Advisor

You might have luck if you post your script in the '3ds Max Programming' forum. There may just be a small syntax error in the script. It would help if you showed what the error is as that often gives a clue as to why the script fails. 

 

Other than that, Martin is correct in options to use to make it disappear. Make is '0.0' in size, have it just instantly move far away on the next frame, 'visibility' track, etc. 

 

Also, you could have two files, one file is frame 0-99 and the other file is frame 100-200. In the 100-200 file, delete the object but keep the others. 

 

Send the 0-99 file to Lumion and then add the 100-200 file after it in Lumion. Now with the two pieces, you have a 0-200 file in Lumion. 


Rob Holmes

EESignature

------------------------------------------------------------------------------------------------------------------------------------------
3ds Max (2023-2025), V-Ray 6.2, Ryzen 9 3950-X Processor, DDR 4 128MB, Gigabyte Aorus X570 Master motherboard, Sabrent Rocket NVMe 4.0 M.2 drives, NVidia RTX 4090, Space Pilot Pro, Windows 11 Pro x64, Tri-Monitor, Cintiq 13HD, Windows 11 x64
------------------------------------------------------------------------------------------------------------------------------------------
0 Likes

santaclous
Enthusiast
Enthusiast

@RobH2 wrote:

You might have luck if you post your script in the '3ds Max Programming' forum. There may just be a small syntax error in the script. It would help if you showed what the error is as that often gives a clue as to why the script fails. 

 

Other than that, Martin is correct in options to use to make it disappear. Make is '0.0' in size, have it just instantly move far away on the next frame, 'visibility' track, etc. 

 

Also, you could have two files, one file is frame 0-99 and the other file is frame 100-200. In the 100-200 file, delete the object but keep the others. 

 

Send the 0-99 file to Lumion and then add the 100-200 file after it in Lumion. Now with the two pieces, you have a 0-200 file in Lumion. 


Anyone can run it and see what the problem is.
You can see it in the animation when it scales even when it is 100 >101
Must be 1 file 1 animation in 3Ds Max. 

@MartinBeh 
Delete problem 

 

0 Likes

RobH2
Advisor
Advisor

Yes, that is true that "anyone can see the error" but it's why I suggested you post this in the 'Programming' forum so someone who's good with code can fix the syntax error for you. 

 

I don't have Lumion so I can't test anything but what if your object passes through a 'slice' modifier? Will Lumion respect that? I've attached a file. 

 

Finally, have you posted this question on the Lumion forum? This is really not a failure of Max's functionality. It's a failure of Lumion to respect the stack properly. A user on Lumion's forum may have figured out a way to get Lumion to behave. 

 


Rob Holmes

EESignature

------------------------------------------------------------------------------------------------------------------------------------------
3ds Max (2023-2025), V-Ray 6.2, Ryzen 9 3950-X Processor, DDR 4 128MB, Gigabyte Aorus X570 Master motherboard, Sabrent Rocket NVMe 4.0 M.2 drives, NVidia RTX 4090, Space Pilot Pro, Windows 11 Pro x64, Tri-Monitor, Cintiq 13HD, Windows 11 x64
------------------------------------------------------------------------------------------------------------------------------------------
0 Likes