Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Kusanagi on April 21, 2011, 02:26:37 am
-
I've been told this shouldn't happen, but it does.
Basically, when converting ships for Journey to Hiigara, one of the main problems besides the fact that most ships are only several hundred polys (wooo 1999) is the way lighting hits the models.
When I use the smooth modifier in MAX it creates a nice smooth surface on some curves that reflect light much better and get rid of the hard edges hiding to an extent how low-poly the models are. The problem with this is that when it's exported to DAE and put ingame, the collision detection is broken on almost every model. Certain areas of certain faces will allow you to fly right through them, or you can clip through the ship on corners. Sometimes if you crash into the models or shoot at them, the weapons will impact a few meters below the visible hull. It also makes it impossible to shoot various objects or fighters/other ships like this because the shots tend to randomly sail through the hull without hitting anything.
Has anyone else had this problem? Is it just a result of a model being low-poly when the modifier is applied, or are there other factors involved? I'd like to be able to smooth the lighting edges on these models without breaking geometry, otherwise there won't be any lighting in the missions.
-
Try a newer PCS2 build.
-
Did you reset xform before converting it from max to .dae?
-
Second-hand experience with MAX from working with FringeSpace has taught me that this program is terribad and should be avoided when possible. You poor bastards...
-
Second-hand experience with MAX from working with FringeSpace has taught me that this program is terribad and should be avoided when possible. You poor bastards...
Let's try to not make generalized comments based on second-hand experience. kthxbai.
Max is not the best 3D App out there, but it certainly is not terribad. Truespace is terribad.
Now, to the discussion on hand. This is not an issue I've noticed in my conversions. Try a new PCS2. If that doesn't do it, I'd like more information. Perhaps a .max or .dae of the model in question.
-
Wait smooth modifier?
Why don't you just set smooth groups (or autosmooth it) just under editable poly/editable mesh...?
Actually, what does the smooth modifier even do? :nervous:
EDIT: Ok, it does exactly what I thought it did. Which is why I never used it. You don't even need to apply that modifier... Just select the polies/faces under Editable Poly or Editable Mesh and do it from there.
At least that's what I've always done and that tends to FIX collision issues, amongst other things.
I import ****ty conversions done through True**** to fix like that all the time, and it ends up way better than before.
-
If you collapse the stack, the smooth modifier does the same thing by basically defining smooth groups. It's a more controllable way of auto-smoothing, really.. Since it is in the modifier stack, you can turn it on/off or edit it without actually modifying the mesh. Get the results you want, collapse the stack and reset the xform. That should do it.
-
Oh, ok. That's cool.
-
Second-hand experience with MAX from working with FringeSpace has taught me that this program is terribad and should be avoided when possible. You poor bastards...
:rolleyes:
:banghead:
Come on Thaeris... really? :nono:
If you collapse the stack, the smooth modifier does the same thing by basically defining smooth groups. It's a more controllable way of auto-smoothing, really.. Since it is in the modifier stack, you can turn it on/off or edit it without actually modifying the mesh. Get the results you want, collapse the stack and reset the xform. That should do it.
Yeah that's how I work with it too.
-
Try a newer PCS2 build.
I'm using the latest one provided in your sig. No go.
So...reset the x-form a second time AFTER collapsing the stack?
Process goes like this:
Import OBJ model
Rotate and scale
Reset X-Form
Add turrets/firingpoints
Apply the Smooth modifier to the editable mesh
Rig the model in the hierarchy model
Export to DAE
Import to PCS2 and calculate smoothing data
I think Unknown Target had this issue once before and it was a problem with MAX, not PCS2. Updating PCS2 was the first thing I did to the Feb 19 2011 build.
-
What I do is:
Import/Make Model
Apply any model transformations (including smoothing)
Collapse the stack
Add turret models
Reset XForm
Set up Hierarchy (using linking)
Export to DAE
Import to PCS2
Add POF Data (firing points, subsystems, etc)
Save as PMF/POF
I've never used calculate smoothing data. Never seemed to do anything for me. Everything ends up properly smoothed anyway.
Never encountered anything broken following this workflow, 30+ models converted like so.
Well, ok, I've had UVs messed up from cleaning up meshes (totally my fault), and the occasional missing face due to the weird BSP thing (PCS2's fault), that's all.
Yes I set up pof data in PCS2. I'm faster at it in PCS2 than adding it in max because I have had like 3+ years of practice doing it before I ever learned how to do anything in max. Personal choice, don't copy me. Probably horribly inefficient for everyone else.
-
Collapse stack! Do not export without collapsing...
-
Did what was suggested:
Convert to editable mesh
Rotate and scale into position and size needed
Reset X-Form
Collapse stack
Apply smooth modifier
Collapse stack again
Export to DAE
Convert to POF.
Still running into the exact same issues. Grr.
-
Here's a zip file of the following:
TGA textures for MAX (I convert them later after using render to texture to make one single map for the object)
The MAX scene file with the model correctly oriented and sized
The lightwave object in question extracted and converted from HW
Hopefully someone can take a look at it or convert it and figure out why the holes are there with smoothing.
[attachment deleted by ninja]
-
I'll be able to take a look in a few days. (Still unpacking from the move)
-
Thanks buddy, I appreciate it. If it's something on my end and still possible with the low poly models, I'd hope to figure out what it is before I continue converting 200+ ships and 1k+ textures :p
-
main issues that can create collision problems is holes in the model, vertexes not welded or not connected properly... did you take a look at the model itself?
-
Yep, the models are all fine.
Without the smooth modifier and with all flat faces, collision detection works beautifully, it just looks ugly because of the way the light hits it.
Basically, the problem I'm having trying to smooth the mothership involves smoothing angles of about 30 degrees to make the outer appearance smooth. When this is imported into PCS2 and into POF form to get into Freespace, the lighting hits it the way it should and it appears smooth.
When you shoot at one of these intersections where the two polies meet, the shot goes right through that area, and you can actually through the model at that angle. It's almost like a wrap was put over the mesh to smooth it, and the hull of the ship itself is below it or in some areas nonexistant.
-
Sounds pretty bizarre. So it's really the smooth modifier which causes the problem? Meaning that if you just apply some smoothing groups manually on the face/polygon subobject level, everything works right, but if you do the same with the smooth modifier, collision detection breaks?
-
I'm not too familiar with smoothgroups TBH, but from what I've read, the smooth modifier applied to the whole mesh is the same thing as using different smoothgroups with identical properties.
-
I'm not too familiar with smoothgroups TBH, but from what I've read, the smooth modifier applied to the whole mesh is the same thing as using different smoothgroups with identical properties.
Yes, manual smoothing and using the smooth modifier should really result in the same thing (except for possible differences in the smoothing group distribution, obviously).
Anyway, I took a look at your .max file and the geometry does have some problems. Just apply an STL check modifier and you should find plenty of open edges... I didn't have time to check how to fix them, as simply welding all vertices with a low threshold didn't do the trick. Whether those problems cause the problem when there's smoothing groups used, I don't know.
-
I came up with the same results. Look into those holes and see if that fixes the problem.
-
Alright, I'll look into it here and keep you all updated :) Thanks for looking at it!
Edit: It helped a lot, but unfortunately, didn't solve the problem entirely. Welding the vessel then running the STL check showed the problem faces - a quick Cap Holes and applying an invisible texture fixed all the STL errors. The smoothing worked well, but there are still areas where you can fly through the ship and you can fly through the antennas almost completely. I think this may have to do with the BSP data being generated from the smoothgroups over such a large area with such a low-poly mesh.
Looks like most of the lighting will be ambient then, to cut down on the glare of the models since there's no way to make them smooth without breaking their collision, even if the STL check returns no holes or other errors in the model :banghead:
-
Tried a few other things and still no go. Oh well, guess we'll just have to be creative with the lighting.
-
Make sure your normals are all facing the right way too.
-
They are. If I take the exact same model and have no smoothing, there's no collision errors. Same model with smoothing - collision breaking around corners or where several polies come together. About halfway down the mothership antennas you can fly and shoot through them, while at the base they're fine.
I guess smooth groups end up causing problems nobody thought of, because they've never been applied to lower poly models. I'd be interested to see if the same thing happens if the smoothing is done on a low-poly retail ship with a lot of sharp edges like the Cain or the Azrael.
-
Are the antennas separate submodels or part of the main mesh? Collision detection only works within the bounding box of the main mesh (of any of the LODs)
-
Main mesh. The mothership has no subobjects, as the door is a separate model completely.