FP Particles?
by Robert Fritzen · in Torque 3D Beginner · 09/17/2013 (12:39 pm) · 10 replies
So, as you know, I've been working with the original soldier model in blender. Since I finally got it loaded up and working, I decided to tackle the FP Arms. I got the model for that at least looking like it should, and have yet to import it (that's next on my list of to-do things), but I'm wondering how I'm going to accomplish my next task.
In my game, there's going to be a lot of working around with particles on the player's view, and I would like the particle transmission from FP -> TP to "look" good, and my idea behind that is to have particle effects when my player uses his actions to only show on the FP Arms model, trouble is, I have no idea how to accomplish this.
I can accept having it show in both FP and TP, but I need the particles to be exactly positioned on the FP Model's GunAttach node so it looks to be in the correct location on the FP screen. Question here... how do I do this?
In my game, there's going to be a lot of working around with particles on the player's view, and I would like the particle transmission from FP -> TP to "look" good, and my idea behind that is to have particle effects when my player uses his actions to only show on the FP Arms model, trouble is, I have no idea how to accomplish this.
I can accept having it show in both FP and TP, but I need the particles to be exactly positioned on the FP Model's GunAttach node so it looks to be in the correct location on the FP screen. Question here... how do I do this?
About the author
Illinois Grad. Retired T3D Developer / Pack Dev.
#2
09/17/2013 (2:28 pm)
Lukas IPS may be able to do it. I know one of the new effects he has added allows you to make particle come from a node on the model. Maybe it's something you can look into.
#3
Could you tell me more specifically what the issue is tho? Is it that you want it to emit particles only when the localclientconnection is in firstperson view? Or is it that you want it to emit particles at a precise location on the model?
For the latter I would, like Jeff said, just mount the object to an appropriate node with an offset that matches the position you want.
If the node is not a mountnode, I got some code you can use to be able to mount emitters to any node and not just mountnodes.
09/17/2013 (2:38 pm)
Y'know I'm gonna come up with an answer tomorrow.. Too tired right now.Could you tell me more specifically what the issue is tho? Is it that you want it to emit particles only when the localclientconnection is in firstperson view? Or is it that you want it to emit particles at a precise location on the model?
For the latter I would, like Jeff said, just mount the object to an appropriate node with an offset that matches the position you want.
If the node is not a mountnode, I got some code you can use to be able to mount emitters to any node and not just mountnodes.
#4
EDIT: Just saw Lukas' post after mine went up, I'm trying to get a particle emitter to work on the FP Arm's GunAttach node (essentially in the Third person, it's where mount0 is now). My problem is, you have two different models and views at work here and I would as much as possible like the same particle emitter to appear in the First person viewpoint on the model's GunAttach node and for Third person in the mount0 slot.
09/17/2013 (2:39 pm)
I know that would work, but as much as I really don't want to say this or turn down anyone, I can't really afford to go with any Third Party solutions currently. My money was spent on the engine and studio licensing a few years back and my pack sales have been well, less than exciting to bring in enough money for me to go with addons at the moment, so I'm looking for something already in the engine, or something that I can code myself.EDIT: Just saw Lukas' post after mine went up, I'm trying to get a particle emitter to work on the FP Arm's GunAttach node (essentially in the Third person, it's where mount0 is now). My problem is, you have two different models and views at work here and I would as much as possible like the same particle emitter to appear in the First person viewpoint on the model's GunAttach node and for Third person in the mount0 slot.
#5
I don't know if the 3rd person model is rendered in 1st person view tho.
09/17/2013 (9:34 pm)
Okay then use two emitters one mounted to the 3rd person model and one to the 1st person model, then to hide one in one of the views you could do a check for "is mounted object rendered" in the Particle Emitters processTick inside the ismounted if-clause and if false set "active" to false. I don't know if the 3rd person model is rendered in 1st person view tho.
#6
09/18/2013 (12:29 pm)
Interesting, I'll see what I can do with that. I'll also take a look at the C++ to see how exactly the engine handles hiding the TP model when in FP and vice versa, maybe something useful in there?
#7
09/18/2013 (12:35 pm)
You could always do away with FP arms (and perspective) altogether, and simply render the 3rd person mesh in 1st person. Why do we even have 1st person arms? Because the arms have fewer polys? I hope that's not the reason.
#8
As for the reason we have the FP arms, I believe it was for weapon specific sequences, IE: Reload Animations unique to the FP perspective. I actually think the FP arms are higher poly than their TP counterparts if I'm not mistaken.
How do I remove the FP perspective?
09/18/2013 (1:10 pm)
Actually, I like that idea even better seeing as the player model only has "spell casting" in my game, so I could just do the TP in FP here.As for the reason we have the FP arms, I believe it was for weapon specific sequences, IE: Reload Animations unique to the FP perspective. I actually think the FP arms are higher poly than their TP counterparts if I'm not mistaken.
How do I remove the FP perspective?
#9
I must have removed the 1st person arms entirely, and left the commented section in. Oh well, it works. The arms need to go, in any case, and renderFirstPerson needs to be true. There's also something (could be in the player shape's properties or anywhere else!) about rendering player shadows in 1st person, but I can't recall off the top of my head.
09/19/2013 (8:18 pm)
in art/datablocks/player.cs near the end of the file, make these changes:datablock PlayerData(DefaultPlayerData)
{
renderFirstPerson = true;
computeCRC = false;
// Third person shape
shapeFile = "art/shapes/actors/blueGuy/player.dts";
cameraMaxDist = 3;
allowImageStateAnimation = true;
// First person armsI must have removed the 1st person arms entirely, and left the commented section in. Oh well, it works. The arms need to go, in any case, and renderFirstPerson needs to be true. There's also something (could be in the player shape's properties or anywhere else!) about rendering player shadows in 1st person, but I can't recall off the top of my head.
#10
09/19/2013 (9:03 pm)
Yeah the idea with FP arms is so you can have shiny high-poly detailed animated hands for the player, but other clients don't have to render shiny high-poly animated stuff. Most FPSs apparently do something like this for weapons. Also, actually doing FP/TP in a unified way is a bit tricky when you're dealing with everything like weapon sway, ironsights, etc., and you want the animations to look good from both perspectives.
Torque 3D Owner JeffH