PDA

View Full Version : Winchester FX Tool


JHaywood
01-15-2007, 10:33 PM
Thought I'd start my own thread on this so as not to highjack the initial Impact Tool thread. This is a script I'm working on inspired by the great work of Daniel Ferreira while he was working at Blur. Basically, it makes the process of setting up explosions and bullet impacts faster and easier. To see the original thread and have a look at Daniel's impact tool, go here (http://forums.cgsociety.org/showthread.php?f=183&t=438007).

And now, on to Winchester. I'm posting the first beta version for people to try out.

http://jhaywood.com/stuff/winchester_001_rollout.jpg

Instructions:
- Define the "gun" and "target" using the pick buttons at the top. Optionally define the "ground" for particles to come to rest on.
- Define the type of tesselation to use for the target. "Tesselate" is localized around the impact point and results in a lower poly count, but "Turbosmooth" works better for organic objects like the curvy wall in my sample movie.
- Select the type of fragments you want. "Pyramid" is good for testing, or long shots where you don't need detailed meshes. "Custom" lets you choose one or more objects to use as instances in the particle system.
- "Hit Radius" defines the size of the hole left by the gun shot.
- "Randomize +/-" randomizes the size of the hole so they're not all exactly the same.
- "Particles Per Hit" does what it says, defines the number of particle fragments for each hit on the target.
- "Begin/End Shooting" defines the time range to calculate the hits.
- "Random Shot Every" randomizes the frames that the gun fires. Choose a range that you want the shots to occur at.
- "DO IT!" does it.

Notes:
- The gun shoots from the +Z axis. Rotate it accordingly. The best way to visualize this is to create a pyramid object on the ground plane. The point of the pyramid shows where the gun will shoot. You can use the pyramid as the Winchester gun object, and link your real gun to it if you like.
- When you've defined both the gun and target, a green line will project out from the gun to the surface of the target when it's pointing the right way. Use this as a guide when animating the gun shooting across the target.
- When you can see the green aiming line, adjusting the hit radius spinner will bring up a circle of the same size so you can visually see an approximation of how big the hole will be.
- VERY IMPORTANT! When the setup is complete, there are still two steps you need to manually do. One is to define the ground node for the ground deflector object. It will be selected, so just hit the pick object button and select the ground mesh. This is a limitation in MaxScript and there's nothing I can do about it. The second is that you need to manually delete the link in the pFlow system between the parent box to the first event, called, "particle seeds", and then relink them. This is a bug and hopefully I can find a way to get it eventually.

That's it. Let me know what you think. Report any bugs you find. This is still a work in progress, so I'll be adding to it over time.

Planned upgrades:
- smoke
- bullet and muzzle flash animation
- support for mulitple targets
- additional displacement maps for bullet holes
- anything else I can think of or sounds good

Winchester v0.1 script (http://jhaywood.com/stuff/winchester_001.ms)
Sample movie clip (http://jhaywood.com/stuff/winchester_001b.avi)

MayaV
01-16-2007, 03:14 AM
Simply Awesome......

SoLiTuDe
01-16-2007, 03:18 AM
Looking great so far James! Good work.

So far the displacement seems to be working well... is there a way to increase depth of the dent without increasing radius? That would be neat to have control over as well, so you can punch stronger holes without needing a bigger radius..? and to have a randomization on this as well would be cool.

I haven't tried custom shapes yet, but when i first tried the script the fragments seemed to work ok, but then after a few more tries they just wouldn't show up for some reason. I'll keep playing with it and see what happens before I say it's a bug... just played with it again and it's working fine... maybe it was just me? :)

Smoke should be an easy add with the way you have it set up already... I'm glad you made it with pflow so we can add or remove as we wish to it.

Can't wait to see more! You rule! :thumbsup:

Massemannen
01-16-2007, 05:53 AM
Fantastic JH!
I will definitly try this one out...

PsychoSilence
01-16-2007, 07:13 AM
Such a great and usefull tool ! gonna use it in the upcoming production (a full cg Advertisment).

i will comment on that later on when iīm at work!



kind regards and respect

anselm

scrimski
01-16-2007, 09:03 AM
Whoa, this is nice.

When you can see the green aiming line, adjusting the hit radius spinner will bring up a circle of the same size so you can visually see an approximation of how big the hole will be.

Entering numeric values by hand brings up an error message

MAXscript Rollout Handler Exception

--unknown property:"radius" in undefined

bealobo
01-16-2007, 09:04 AM
wow JH... awesome!
:thumbsup:

PsychoSilence
01-16-2007, 10:11 AM
i really look foreward to the upcoming functions itīs going to have!!!

the haywood tools are a basic script collection in the soulpix pipeline. so much time saving!

i will defnietly post some of my results fireing the winchester ;)


kind regards

anselm

JHaywood
01-16-2007, 01:14 PM
Thanks everyone, I'm glad you all like it. I wish I could take full credit for the idea, but I'm doing what I can to go beyond the original inspiration. :)

scrimski: Thanks for catching that. It'll be fixed in the next release.

PsychoSilence: Can't wait to see what you do with this, I'm sure it'll be cool.

Ian: Right now, you can always make adjustments manually by unhiding the displace warp objects, but I do have some ideas on how to make it easier to change settings like the displacement depth, or particle speed and size, etc., after everything's been set up. Maybe a second rollout that comes up with various adjustment settings so you never really have to manually get into the pFlow system or unhide all the different objects if you don't want to.

And I can't think of why particles wouldn't show up sometimes except for the pFlow scripting bug I already pointed out. If you figure out what's going on, let me know.


And just to let everyone know, you can change the displacement map by unhiding one of the displace objects and dragging the map to the material editor as an instance. And then updating that will update all the bullet holes. The default map isn't that great, but there's another maxScript limitation that won't let me add flags to a gradient ramp, I'm stuck with the default three. So I can't build really nice maps on the fly through scripting. I'll probably end up providing a material library to draw from in the future. If anyone comes up with some good displacement maps, post them here and I'll include them as options in future releases.

And if anyone has other ideas for improvements, let me know too.

mir-vadim
01-17-2007, 11:34 AM
Hi JHaywood, looks greate.
Five days ago I decide create something like Blur`s Impact system tool too, in few days I post a little presentation somewhere here.

bardur
01-17-2007, 09:42 PM
The fragments dont show... or they just aret created.. its weird...
just like "SoLiTuDe" sayd... but mine never show.. their missing
and also the scene becomes "black" but thats nothing thou...

any solution for the "dissapearing"?

But an awsome tool non the less :D !!

Regards

JHaywood
01-18-2007, 05:56 AM
The fragments dont show... or they just aret created.. its weird...
just like "SoLiTuDe" sayd... but mine never show.. their missing
and also the scene becomes "black" but thats nothing thou...

any solution for the "dissapearing"?

But an awsome tool non the less :D !!

Regards

Did you delete and then reconnect the first wire in PFlow that connects the main box to the first event? There's a bug when scripting PFlow systems that I mentioned that forces you to manually do that before the particles will show up in the scene. There should be a message box that pops up at the end that says this also. If that's not the problem then I don't know what's going on. If you get send me the scene I can take a look.

And the scene becomes black because you started with no lights before you ran the script, and then the script added some lights that are all set to zero for most of the animation. They're the lights that flash on at impact. In a real scene with lighting already set up this isn't an issue, but for tests it can be strange to have your scene go black. You can turn default lighting on in the viewport if you don't want to add lights and you don't want it to be black. I have a script on my site that lets you make a "default viewport lighting" toggle hotkey or button to make this easier.

Edit:
Oh, and by the way, I should have another update in a day or two. I've almost got multiple target objects working. Just a little more to do before its ready.

bardur
01-18-2007, 09:15 AM
I have tried everything...
and in NO scene does it work... i have tried to restart max several times... but without luck..
and yeah.. i know about the lights ;)

i have unlinked the wire between the 1 event... (and also tried to re wire all the events once) and relinked... nope.. done this every time with no results..

the deflector stuff there is no problem with... its just that it makes no fractures...
i use Max 9 BTW... i can send you a scene if needed...

AND btw.. i started to get wierd results when using the script yesterday... even when i chose all the right "objects" eg. gun - target - ground..
it made all the "particles"/"effects" on 0, 0, 0 in world space... and it did it every time the last 10 times i tried it... i did everything known to me... except restaring the computer..

Well... ill give it a go once more...

Regards

yuriythebest
01-18-2007, 12:13 PM
thanks for the great script, however I'm experiencing the same problem as bardur.
I'm using 3ds max 9. I pick all the objects-ground, target and gun, create a few omnis and hit "DO IT!!". It does some calculating after which it displayes the message about the 2 manual to-do's. first thing I delete and recreate the link between myTarget_fragementParticles, the next step confuses me- how to "define the ground node for the ground deflector object" do I have to create a deflector in addition to the ground object by hand? Or do I have to define it in PFlow? Here is a screenshot:
http://img99.imageshack.us/img99/3731/shootef5.th.jpg (http://img99.imageshack.us/my.php?image=shootef5.jpg)

please elaborate because I'm totally lost.

JHaywood
01-18-2007, 01:15 PM
About defining the "ground". If you select a ground object in the setup panel, when the script is done, after the warning message, a deflector space warp object will be already selected. All you have to do is look over at the modify panel, click on the button that says, "Pick Object", and then pick the ground mesh. Here's a picture:

http://jhaywood.com/stuff/winchester_selectGround.jpg

It's really just a UDeflector space warp that lets you use a mesh object as a deflector. In a perfect world, I could set the mesh node on the UDeflector through scripting, but according to the MaxScript help file, "There is no way to set the Deflector object using MAXScript." To me, this is just dumb, but it's the way it is.

About the particles not working, it would really help if someone who is having this problem could send me the scene so I can look at it. I'm using Max 9 to create this, so I don't think that's the problem. One thing to keep in mind is that the target mesh needs to be pre-tesselated to a certain extent. If you just make a big box, or whatever, with no segments, the seed particles will be placed too far away from each other to get hit by the deflectors that trigger them. Here's a picture of a test scene to show how the target is still low-poly, but there is still some extra geometry to work with and the squares are about as big as the Hit Radius circle:

http://jhaywood.com/stuff/winchester_testScene.jpg


And just be perfectly clear about which wire to relink in the PFlow system, here's a picture of that:

http://jhaywood.com/stuff/winchester_deleteThis.jpg


When this is more final, I'll do a video tutorial on the whole process. But hopefully, for now, this clears it up.

yuriythebest
01-18-2007, 02:01 PM
thanks now it works!

http://img262.imageshack.us/img262/9364/worksaj0.th.jpg (http://img262.imageshack.us/my.php?image=worksaj0.jpg)

also can you add an object density option, so that one can shoot through walls?? Atm one cannot:) :

http://img135.imageshack.us/img135/1130/shootwalljc5.jpg (http://imageshack.us)

awsome script- I'l use it in my next animation

bardur
01-18-2007, 02:21 PM
Not working
ok.. i have tested it several time now... but still not working
and i have also tested it on another PC.. without luck
I have uploaded the scene and a video of the weird stuff
http://www.megaupload.com/?d=J6LQJZZN (8mb)
NOTE: i had the "gun" object selected... hence the searchin for the deflector.. so dont pay attention to that... ;) )

i get the same result on both pc,s.... dunno why.... take a look

Regards

bealobo
01-18-2007, 02:42 PM
Hi JH,

I find it strange to have light at impacts, wouldn't it be better to have those flashes at the gun?
what do you think?

Cheers,

JohnnyRandom
01-18-2007, 04:12 PM
Wonderful, thanks for all your hard work James! :) Fun script!:D

I agree it would be nice to "blow holes" at random through the mesh as already stated.


EDIT:

@Barbur, does your target object have enough subdivisions, I noticed if I made a target object with only 1,1,1 segments the script would not work, when I boosted the target segments to say 1,20,40 no problems at all, it becomes a little more obvious when you see the script run...:shrug:

yuriythebest
01-18-2007, 04:50 PM
been playing around with it- please add support for multiple target objects, for intance if a tank is being shot at, the tank being composed of multiple moving parts, it would be inconvenient to use different 'guns' for every tank segment.

j0gge
01-18-2007, 06:14 PM
Wonderful, thanks for all your hard work James! :) Fun script!:D
@Bardur, does your target object have enough subdivisions, I noticed if I made a target object with only 1,1,1 segments the script would not work, when I boosted the target segments to say 1,20,40 no problems at all, it becomes a little more obvious when you see the script run...:shrug:

I know that... but it doesnt work AT ALL now... first times i tried the script it worked... but no fractures were made .. and that is obviosly because of low segements (1,1,1) ..
but since late yesterday... the script started to f**k with me... it doesnt work AT ALL
.. it makes all the stuff at 0,0,0 in world space... no lights... no displacements ... no nothing..
just an uncomplete particle flow... its very wierd.... and i get the same problem on two VERY different PCs (Desktop and Laptop)

EDIT: This is me Bardur ... and not jogge... sorry for the "mixed user" .. hehe
its just that i forgot to log out as jogge... a class mate of mine ;)

Regards
Bardur

bardur
01-18-2007, 06:42 PM
Sorry for the mixup above ;)

But i just got to informe that i had the same problem on YET another computer..
the problem that you see in the video.. wich i posted earlier

Regards

PsychoSilence
01-18-2007, 06:42 PM
Edit:
Oh, and by the way, I should have another update in a day or two. I've almost got multiple target objects working. Just a little more to do before its ready.

that would be awesome! just working on an mocap guy running from gunfire...currently only the wall behind him reacts on "winchester" obviously :(

maybe you might be able to choose if the target is animated or a non moving object like a wall. if so certain options checked e.g. animated shape or subframe sampling...


kind regards

anselm

Steve Green
01-18-2007, 07:15 PM
I noticed that Laszlo (meshtools) Sebo has written a Maxscript extension which allows some extra stuff with Deflectors and Maxscript.

http://www.maxplugins.de/r9_files/laszlo/deflMxs_10.zip

Not sure if this is helpful for your tool, which is looking awesome BTW.

Cheers,

Steve

slime
01-18-2007, 08:36 PM
Cool stuff!
When you have all the basic features working, I think it would be cool to try to break holes through geometry. Hopefully the booleans in Max work now better than a couple years ago. :)

JohnnyRandom
01-18-2007, 09:04 PM
Barbur,I attached the first test scene I did, I guess see if it works, it should the script has already been run, but maybe helpful to debug???...


BTW I looked at your file (when I first post I didn't have access to depostfiles it is blocked by our network :( )
You have two instances in your flow of "small fragments" for some reason? The particle seed also does not have a Collision emitter object. No deflector was created, really strange. Something wierd going on for sure.

I tried rebuilding you scene by deleting all associations and leaving just the base objects, and rerunning the script, no luck.

The script didn't like your primitive as the "gun" object. I used your scene and built a new gun, reran the script and well it worked.? Maybe something in your copy of the script is buggered up?

bardur
01-18-2007, 10:13 PM
Thanks *JohnnyRandom for you "helpness"
but.. i havent had the moment to test the file you sent... because i am running a simulation... but ill test it in a moment :D

What i dont get is that i have even tried to download the script several times... also using different primitiv's such as Box, Cylinder, sphere, pyramid etc etc..
no luck...

Regards

JHaywood
01-18-2007, 10:25 PM
I know that... but it doesnt work AT ALL now... first times i tried the script it worked... but no fractures were made .. and that is obviosly because of low segements (1,1,1) ..
but since late yesterday... the script started to f**k with me... it doesnt work AT ALL
.. it makes all the stuff at 0,0,0 in world space... no lights... no displacements ... no nothing..
just an uncomplete particle flow... its very wierd.... and i get the same problem on two VERY different PCs (Desktop and Laptop)

Regards
Bardur
The problem is that the Z axis on your "gun" is facing out the back of the pyramid instead of the front. I have no idea how that happened, but change the coordinate system to local and you'll see what I mean. If you rotate the pyramid around 180 degress it works fine.

So, for anyone else using this, once you define the gun and target, you should see a green line going between the two whenever the gun's pointed at the target. If you don't, there's a problem and you should check the local axis on the gun object.

Steve: Yeah, he sent me the maxScript extension earlier today. It works great and will remove one manual step from the process.

Everyone else: Thanks for all the suggestions for improvements. I'm adding them all to the wish list.

PsychoSilence
01-19-2007, 09:45 AM
a checkbox if afterburn should be added would be nice too! if checked the script then simply adds a PFlow-ABurn node to the impact event and uses the debrils for further AB calculation or something like that... :)

kind regards

anselm

JHaywood
01-21-2007, 07:36 AM
New version ready.

Script: winchester_002.ms (http://jhaywood.com/stuff/winchester_002.ms)
Movie: winchester_002.mov (http://jhaywood.com/stuff/winchester_002.mov)

Updates:
- Multiple targets
- Gun projectiles, pick either bullets or laser beam
- Gun recoil, define how far back it goes and how long it takes to recover
- A couple check boxes to turn off the warning messages and to either show or hide the set up process (more interesting than useful)
- Redesigned the layout slightly.
- Some behind the scenes code changes

Also removed the Tesselate or Turbosmooth option. It now just uses a Meshsmooth modifier. The stack is not collapsed on the target objects so you can modify the meshsmooth settings to get more detail in the displacement areas if you want.

As Steve mentioned earlier, there's a maxScript extension now that removes the necessity to manually add the ground object to the deflector space warp. Download the zip file, and copy the appropriate version of the plugin to your Max plugins folder. Here's the link: UDeflectorMXS (http://jhaywood.com/stuff/UDeflectorMxs.zip)

But you still need to reconnect the PFlow wire. I'll deal with getting rid of that step later.

Enjoy. I'll start working on some of the other suggestions next.

SoLiTuDe
01-21-2007, 08:22 AM
Hey James... looking good... however....

>> MAXScript Rollout Handler Exception: -- Unknown property: "wireFrame" in $Plane:Plane02 @ [0.000000,0.000000,0.000000] <<

Changing that line to emitObj.wirecolor seems to work. That's what happens when you stay up late! :)

...for an addition: the ability to deselect targets as well would be nice.
Also.. the Cylinder aim shows in the render when bullets are selected...

Lovin' the laser beam btw. :thumbsup: Keep it up!

yuriythebest
01-21-2007, 08:59 AM
Hey James... looking good... however....

>> MAXScript Rollout Handler Exception: -- Unknown property: "wireFrame" in $Plane:Plane02 @ [0.000000,0.000000,0.000000] <<

Changing that line to emitObj.wirecolor seems to work. That's what happens when you stay up late! :)

...for an addition: the ability to deselect targets as well would be nice.
Also.. the Cylinder aim shows in the render when bullets are selected...

Lovin' the laser beam btw. :thumbsup: Keep it up!


after modifying the code as SoLiTuDe suggested it works perfectly. SoLiTuDe- to deselect objects if all else fails create a simple cube or dummy and select that:)

PsychoSilence
01-21-2007, 12:01 PM
amazing update!

so i have to replace "emitObj.wireframe" with "emitObj.wirecolor" in the only line it appears?

maybe i will use winchester in connection with thinking particles for the next production! from monday on i will have to set up serveral particle effects for a comemrcial :) one shot will include shooting. actually Explosive-Arrows shooting at a character who explodes a few seconds after he got hit...hell lotta fracturing work ahead :D :D

kind regards

anselm

JHaywood
01-21-2007, 04:12 PM
Oops, you caught me. Guess I should have run it one last time. :)

I updated the file so you can re-download it for the fix. Plus, I made one quick change. Since PsychoSilence mentioned arrows, I thought someone might want to change the mesh on the bullets. So they're all instances now. You can just add an edit mesh modifier, or whatever, on one and they will all update with the change.

PsychoSilence
01-21-2007, 04:38 PM
Oops, you caught me. Guess I should have run it one last time. :)

I updated the file so you can re-download it for the fix. Plus, I made one quick change. Since PsychoSilence mentioned arrows, I thought someone might want to change the mesh on the bullets. So they're all instances now. You can just add an edit mesh modifier, or whatever, on one and they will all update with the change.

:bounce::love::buttrock::applause::thumbsup: well, no hugging button available :D

JHaywood
01-21-2007, 05:11 PM
:) Thanks.

Oh, and about deselecting target objects, do you mean if you accidentally selected objects you didn't want? You can always click on the pick button again and select different objects before you run the simulation.

StratusFarm
01-21-2007, 05:57 PM
Hiya.
Cool tool...coming along nicely.

One thing I noticed, possible bug:
If I add my own omni light in the scene after running winchester, that light's effects will not be shown in the viewport.
Cycling with ctrl-L only switches between Max's default viewport "lighting" and the scene being black.

If on the other hand, I create my Omni before running the script, the viewport will continue to display my light's effect on the scene.

When picking the target(s) in this version, a dialoge comes up (the select dialoge, not the pick one)
It works fine, no biggie, but I was just wondering why it can't still use the standard picker and just pick them out from the viewport.
Because of being able to make multiple target selections, I presume? And therefore you would need to turn off the pick target somehow? Just curious.

Also, with the current version, I am not getting particles breaking away from the target as I did in the first version. My target mesh is very well tesselated to begin with, and yes I am unlinking and relinking the PFlow.
I'm still playing with it though.

SoLiTuDe
01-21-2007, 07:10 PM
:) Thanks.

Oh, and about deselecting target objects, do you mean if you accidentally selected objects you didn't want? You can always click on the pick button again and select different objects before you run the simulation.


Oh! Sweet! Thx

JHaywood
01-21-2007, 11:34 PM
If I add my own omni light in the scene after running winchester, that light's effects will not be shown in the viewport.
Cycling with ctrl-L only switches between Max's default viewport "lighting" and the scene being black.

If on the other hand, I create my Omni before running the script, the viewport will continue to display my light's effect on the scene.
You're right. There's a hardware limit of 8 lights that can affect a viewport at one time, and it depends on the order they were created. Bobo has a script that lets you change the order of lights on his page, Max 4 section: http://www.scriptspot.com/bobo/

When picking the target(s) in this version, a dialoge comes up (the select dialoge, not the pick one)
It works fine, no biggie, but I was just wondering why it can't still use the standard picker and just pick them out from the viewport.
Because of being able to make multiple target selections, I presume? And therefore you would need to turn off the pick target somehow? Just curious.
Yeah, I changed the behaviour so you can pick multiple targets. I know it's kind of a pain if you're just using one target.

Edit:
If anyone wants to turn off the warnings permanently, search for "warnings_CB" in the script, and change the "checked:true" part of the line to "checked:false".

Also, if anyone is having trouble with anything not working, try sending me the file if you can so I can check it out.

PsychoSilence
01-22-2007, 11:44 AM
thanks for the info James :)

what i do lately is to add a shape mark with a blackish material with a radial gradient ramp in the opacity with a huge amount of noise to get a gunshot residue kinda effect around the bullet entrance area:)

in guess blood splats can be done this way easily too. then you should add shape marks to the debrils event as well to get ground splats. and you should change the debrils shape from tetras to modeled drops and change the rotation to "speed space follow".

havenīt tried all that yet but should work out with a little modification of the flow...will try that when iīm at work :)

donīt know if thatīs interesting for anybody...just wanted to share. :)

kind regards

anselm

PsychoSilence
01-22-2007, 04:06 PM
in the latest build i get an error when i want to edit the hit radius :sad:

i donīt get it to work anymore...maybe iīm just stupid but something seems to go wrong :(

kind regards

anselm

JHaywood
01-22-2007, 04:30 PM
in the latest build i get an error when i want to edit the hit radius :sad:

i donīt get it to work any more...maybe iīm just stupid but something seems to go wrong :(

kind regards

anselm

My fault, it's fixed now. Just redownload it from the link on page 2. Thanks for catching that.

And when you talk about gunshot residue around the impact area, what do you mean by "shape mark"? It sounds like a good way of doing it, but I don't quite get what you mean. Can you post a screen shot?

PsychoSilence
01-22-2007, 05:08 PM
just downloaded it again :) no prob!

i will post an assemby file soon :)

cheers

anselm

mustan9
01-22-2007, 05:55 PM
@JHayWood - I like the scripts on your website. Thanks for sharing them. The "Edge To Edge" script really helped me out today.

This script looks cool too. Thank you for commenting your code.

Later,

SoLiTuDe
01-22-2007, 05:56 PM
i'm pretty sure he's talking about the shape mark operator -- it basically creates a facing particle that lines up with geometry automatically.. it's good for mapping bullet holes or blood splats. It works great on flat object, but I don't know how this would work with the displacement, unless maybe you could take the shape mark and use mesher, then displace that.

PsychoSilence
01-22-2007, 06:02 PM
just got the ground splats going :)

i attached the flow below. what i didnīt get going so far is the gunshot residue itself :(

i simply tried some stuff with another UDeflector and the target picked for tests...but didnīt invest much time in gambling around...

the first shape mark has the same values set as the ground shape marks. not too funky...

i attached a veeeeery stripped version of what i think of basicly. maybe someone can deal with it. i got deadlines :eek::shrug::sad: big soooooooooorry

kind regards

anselm

JHaywood
01-22-2007, 07:24 PM
Well how 'bout that, I didn't even know about the Shape Mark operator. Guess I should read the manual one of these days. :)

About using it on the displaced areas, I think it'll work fine. Change the shape from Rectangle to Box Intersection and it actually conforms to the surface of the object where it hits. Try it on the file PsychoSilence posted and you can see the splats curve around the sphere. Pretty snazzy. I'll have to experiment with how I can integrate this with the script.

I might have to rework how the whole system is set up though, so that pFlow is used for pretty much everything instead of just the exploding bits. So the "bullets" would actually be particles shot out from the gun and then a script operator would handle all the other setup when the bullet hits the target. It would be extra work, but probably worth it in the long run.

PsychoSilence
01-23-2007, 08:58 AM
i encountered another problem concerning animated targets. :( since you collapse the target mesh to an edit mesh eventually skinning and rigging will be collapsed too. i allways record animations with pointcache2 so i simply copied the pointcache modifier and pasted it on top after winchester collapsed the mesh then edited some minor position issues with a XForm modifier.

well thinking of it afer all this not really a problem but maybe thereīs a way to keep animations on targets. that would be too great :)

kind regards

anselm

JHaywood
01-23-2007, 12:46 PM
Yeah, I haven't tried to tackle deforming meshes yet. It's on my list, but I just try to make just one thing work at a time to make it easier for me to keep track of what I'm doing. I plan on this being a very robust tool when it's done, but that's going to be a while. :)

PsychoSilence
01-23-2007, 02:19 PM
please donīt pick my comments up as pushing :)

quality takes itīs time, i know that :)

kind regards

anselm

JHaywood
01-23-2007, 02:39 PM
Not at all, it's good to know what features people think are important. Keep those suggestions coming!

JohnnyRandom
01-23-2007, 08:11 PM
As I mentioned in the Rayfire thread a scene cleaner would be cool, although you script is much easier to clean and rerun with different settings than rayfire.

I do like the particle flow approach much better than parray, much easier to add/change a flow than running through 30 parray panels.

Both of these tools are really sweeet.

BTW Nice to have projectiles:D

JHaywood
01-23-2007, 08:15 PM
Cleaning the scene should be easy enough. One of the to-do items is to create a post simulation tool that will let you change settings quickly, and one of the options there could be to remove the sim objects completely.

I'm in the process of integrating pFlow even more into the whole setup, so that even the projectiles will be particles.

JohnnyRandom
01-23-2007, 09:24 PM
hehe, had a few minutes (literally :) ) to screw around... nothing special but fume for the muzzle blast and aburn for impact particles, could've spent some more time on a seperate flow for aburn but...

heh, screwed up the aburn keyframe at the beginning ooops..
xvid codec:

JHaywood
01-24-2007, 01:01 PM
Not an official update, but I just wanted to show where I'm at right now. Added Mark Shape operator to pFlow system for impact decals...
winchester_003a.mov (http://jhaywood.com/stuff/winchester_003a.mov)

PsychoSilence
01-24-2007, 01:30 PM
another nice feature ahead :)

great to see the progress!!!

yuriythebest
01-24-2007, 06:18 PM
awsome stuff! keep up the amazing work and soon there will be a plugin capable of untold of destruction!

joshpurple
01-25-2007, 04:40 AM
Wow James! :thumbsup: Excellent work! I tried it, and it worked great, very impressive! Thank You!

Massemannen
01-25-2007, 05:53 AM
OMG James, thatīs freakinī awesome!! I wish I had that (some!) knowledge in scripting...

Your doing an amazing job!

JHaywood
01-29-2007, 08:29 PM
Okay, finally a real update: winchester_003.ms (http://jhaywood.com/stuff/winchester_003.ms)

New Features:
- New "Settings" rollout that appears after you've created the simulation. This lets you change some of the parameters without having to manually select objects or know how to use PFlow.
- Checks for existing simulation when the script is run and let's you either change the settings using the new rollout or delete the sim entirely.
- Now uses Shape Marks for impact decals.
- Uses Displace modifiers instead of the Displace space warps which cuts down on scene clutter.
- Creates one whole PFlow system for each target object. This lets the fragment materials match the object they're blowing off of, and let's you adjust settings for each target object independantly.

Known Issues:
- The gun recoil position keys don't get removed when you delete the simulation. This will be fixed in the next release.
- There isn't any error checking if you delete the simulation using the script, so if you manually remove pieces of before doing that it could throw an error.
- Changing the initial speed value in the settings rollout to slow down the particle that fires out of the gun will let you see the bullets better, but could make the debris and decals get offset from the displaced impact points. I'll add an offset value later to fix this.

One thing about the settings rollout, all the values are based on percentages. So initially, they're all 100. If you want double the number of particles, change the particle count to 200, and so forth. There's a button to update the pflow systems after you change any of the particle values. Something in the way pflow is integrated with maxScript doesn't let it update in real-time as you change the settings.

Let me know if you find other issues, I haven't tried this on a huge range of setups. And let me know if you can think of other ways to improve it beyond what's already been mentioned. My next step is to add more elements like smoke and give you the option of what to turn on in the setup.

Arnage
01-30-2007, 01:45 PM
Just noticed this tread and gave it a try, really cool script!

I did notice that the part of the target that gets meshsmoothed is a bit too small in some cases. Some of the holes ended up being low detail because they got outside the smoothed area. This can be easily fixed manually by just adjusting the selection though.

And another thing: it seems to me that all the generated diplacement textures are the same, why don't you make them all use the same texture? That would make adjusting them a lot easier, especially when you have a lot of bulletholes.

JHaywood
01-30-2007, 02:14 PM
Thanks for pointing out that it's not using the same texture for all the displacement holes, it used to. I've made some big changes lately, so I'll have to go back and fix that.

JohnnyRandom
01-31-2007, 06:01 PM
Haven't had time to play but looks like a great update!

FabioMSilva
02-01-2007, 01:24 PM
for some reason it is not working with me:shrug: in pflow doesnt not appear "particle seeds" , only "fire!" is connected with the 1st thing in pflow..

noouch
02-02-2007, 10:10 AM
I'm having the same problem as Fabio, perhaps the name just changed? Anyway, I have the deflector linked, and deleted/reattached the first event in the particle flow... not sure what I'm doing wrong.
I've attached my scene to help troubleshooting (max 8), help is appreciated :)

*EDIT*
Argh, i am stupid. I had the floor deflector set up properly, but the target deflector wasn't linked to my target. After doing so, everything works perfect. Movies coming shortly.

*EDIT #2*
Okay, it works great! Only problem I noticed is that vRay won't render the shape marks properly.
http://noouch.googlepages.com/winchestertest1_s3.mov

buller
02-02-2007, 02:44 PM
hi
i like to suggest this
i'm shortsighted so i always set my winxp at 800-600
and your toolbar doestn't fit in the program,i can't use the doit button at this setting
when i switch to 1000 setting the view is blurred
don't know it's a big issue for other or not
but i think make it shorter ,wider will be best
thnx

JHaywood
02-02-2007, 07:21 PM
Fabio & noouch: I've changed the pflow setup, so there's no "particle seeds" event any more, "fire!" is the first event. And be sure to install the maxScript extension I mentioned on page 2 so you don't have to manually assign the target and ground objects to the deflectors.

UDeflectorMxs.zip (http://jhaywood.com/stuff/UDeflectorMxs.zip)

buller: Good point. I'll probably redesign the UI when it's closer to being complete. And I know that with nVidia cards at least, there's a desktop panning utility that lets you set a higher resolution but only display part of it so it's bigger. I don't know if that would help you at all, but might be worth a try.

Progress report: I haven't had a ton of time to work on this lately, but I've got booleans working for the most part so you can shoot holes through objects and just generally do some serious damage to your meshes. I'm working out a couple issues still, but will hopefully have another version soon.

FabioMSilva
02-02-2007, 09:30 PM
ok... so i've installed maxscript extension and it gives me this exception:

"unable to convert: $UDeflector:winchester_deflector01 @ [0.00000,0.00000,0.000000] to type: NURBSCVCurve

:shrug:any ideas?

JHaywood
02-02-2007, 11:10 PM
ok... so i've installed maxscript extension and it gives me this exception:

"unable to convert: $UDeflector:winchester_deflector01 @ [0.00000,0.00000,0.000000] to type: NURBSCVCurve

:shrug:any ideas?

That's strange. When exactly does it give you this message? All I really know about the extension is that it works when I use it, but I didn't write it so it might be hard to trouble shoot. You can always take it out and assign the deflector nodes manually if it won't work.

FabioMSilva
02-03-2007, 01:41 AM
That's strange. When exactly does it give you this message? All I really know about the extension is that it works when I use it, but I didn't write it so it might be hard to trouble shoot. You can always take it out and assign the deflector nodes manually if it won't work.

after i click "do it"

iceman32
02-18-2007, 07:26 PM
Hello

Are you still working on this script or is it final?

Regards
Stefan

JHaywood
02-19-2007, 01:19 AM
Hello

Are you still working on this script or is it final?

Regards
Stefan

I'm still working on it off and on. I have it to the point where you can shoot through multiple objects all at once, like shoot a hole in one wall and then shoot a new hole through the wall behind it and so on. I haven't had much time lately, and I want to add a couple more features before releasing a new version. But mir-vadim's Ray tools look like they're coming along nicely so I haven't really felt like I needed to get out new versions of my tool fast. But if people are still interested I'll try and make it more of a priority.

PsychoSilence
02-19-2007, 09:30 AM
I bet people are definetly interested in your tool! Improve it and implement it into your great script collection :)

kind regards

anselm

iceman32
02-19-2007, 11:12 AM
Yes, It would be great if you could work some more on it. It's so useful and a very good script.

Stefan

JHaywood
03-14-2007, 04:24 AM
Okay, got a the update up that I've been working on. I've added it to my script pack, you can find it here:
http://jhaywood.com/maxScripts.htm

Help page here:
http://jhaywood.com/ms_winchester.htm

And there's another script included in the update to the script pack called, "Multi Prop Changer", useful for changing light color and multiplier on many light at once, as well as other properties on any object.

Still no time to create a cool movie using the script, but try it out and let me know what you think. :)

PsychoSilence
03-14-2007, 05:37 AM
glad youīre still working on Winchester :) great to have a help site now.

your scripts really should be a must have production tool collection. i introduce it in every company i work at :D

kind regards

anselm

JohnnyRandom
03-15-2007, 10:13 PM
Nice job on the impact displacements. seems to run through the script faster too.

refract
09-10-2007, 02:38 AM
James!.. nice work. How are ya? Nice script. It got me thinking, would it be possible to use directX shaders instead of mesh displacement?
http://www.bencloward.com/resources_shaders.shtml

CGTalk Moderation
09-10-2007, 02:38 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.