3DSMax 6.0 MultiRes fix
by Samme Ng · in Torque Game Engine · 04/16/2004 (3:36 am) · 60 replies
I think I have fixed the crash if there is MultiRes modifier in the mesh.
It is simply modifing three files:
1) In ShapeMimic.h
Change the declaration of
void recordMergeOrder(IParamBlock *, MultiResMimic *);
to
void recordMergeOrder(IParamBlock2 *, MultiResMimic *);
2) In ShapeMimic.cc
Change the following inside void ShapeMimic::addMultiRes(INode * pNode, INode * multiResNode) from ..
Change
void ShapeMimic::recordMergeOrder(IParamBlock * paramBlock, MultiResMimic * multiResMimic) to
void ShapeMimic::recordMergeOrder(IParamBlock2 * paramBlock, MultiResMimic * multiResMimic)
In the last statement inside void ShapeMimic::recordMergeOrder(IParamBlock * paramBlock, MultiResMimic * multiResMimic)
Change all
Change ShapeMimic::~ShapeMimic()
3)In maxUtil.cc
Change the following inside TriObject * getTriObject( INode *pNode, S32 time, S32 multiResVerts, bool & deleteIt)
from ..
Hope it help you!
Samme
It is simply modifing three files:
1) In ShapeMimic.h
Change the declaration of
void recordMergeOrder(IParamBlock *, MultiResMimic *);
to
void recordMergeOrder(IParamBlock2 *, MultiResMimic *);
2) In ShapeMimic.cc
Change the following inside void ShapeMimic::addMultiRes(INode * pNode, INode * multiResNode) from ..
IParamBlock * paramBlock = NULL;To
IParamBlock2 * paramBlock = NULL;
paramBlock->GetValue(0,DEFAULT_TIME, multiResList.last()->totalVerts,range);To
paramBlock->GetValue([b]1[/b],DEFAULT_TIME, multiResList.last()->totalVerts,range);
Change
void ShapeMimic::recordMergeOrder(IParamBlock * paramBlock, MultiResMimic * multiResMimic) to
void ShapeMimic::recordMergeOrder(IParamBlock2 * paramBlock, MultiResMimic * multiResMimic)
In the last statement inside void ShapeMimic::recordMergeOrder(IParamBlock * paramBlock, MultiResMimic * multiResMimic)
Change all
paramBlock->SetValue(0, ....To
paramBlock->SetValue(1, ....
Change ShapeMimic::~ShapeMimic()
IParamBlock * paramBlock = (IParamBlock*)obj->SubAnim(j)->SubAnim(0); Interval range = multiResList[ii]->multiResNode->GetTimeRange(TIMERANGE_ALL|TIMERANGE_CHILDNODES|TIMERANGE_CHILDANIMS); paramBlock->SetValue(0,DEFAULT_TIME,multiResList[ii]->totalVerts);To
IParamBlock2 * paramBlock = (IParamBlock2*)obj->SubAnim(j)->SubAnim(0); Interval range = multiResList[ii]->multiResNode->GetTimeRange(TIMERANGE_ALL|TIMERANGE_CHILDNODES|TIMERANGE_CHILDANIMS); paramBlock->SetValue(1,DEFAULT_TIME,multiResList[ii]->totalVerts);
Quote: ** I have change the [i] to [ii] due to it think as italics code!
3)In maxUtil.cc
Change the following inside TriObject * getTriObject( INode *pNode, S32 time, S32 multiResVerts, bool & deleteIt)
from ..
IParamBlock * paramBlock = NULL;To
IParamBlock2 * paramBlock = NULL;
paramBlock->SetValue(0,time,multiResVerts);To
paramBlock->SetValue([b]1[/b],time,multiResVerts);
Hope it help you!
Samme
#42
I have not had the Unmess problem but I do my heirachry different than most and use a similiar method to my "Force Sort". I link the Highest level of detail to the top and work my way down. That works on static shapes. Skinned meshes still need Unmess from time to time.
@ Sammy if you could post that fix for the reflective that would great Ours attempt hasn't worked yet.
And can someone explain what the max2dtsPLUS stuff is all about? No header files. Is it just somthing like the DTS sdk?
Thanks
Matt
07/19/2004 (2:03 am)
Oh i was just kidding more or less there but are some things in the code that can be changed to run faster though. WE'll see what we can do. It really doesn't take that long except when you get into large shapes with several LODS and lots of polies.I have not had the Unmess problem but I do my heirachry different than most and use a similiar method to my "Force Sort". I link the Highest level of detail to the top and work my way down. That works on static shapes. Skinned meshes still need Unmess from time to time.
@ Sammy if you could post that fix for the reflective that would great Ours attempt hasn't worked yet.
And can someone explain what the max2dtsPLUS stuff is all about? No header files. Is it just somthing like the DTS sdk?
Thanks
Matt
#43
07/20/2004 (3:21 pm)
Does anyone have a brief description of just what unmess does, and why it isn't just automatically done as part of the exporter?
#44
07/20/2004 (3:55 pm)
Just search UNmessDTS or somthing its been explained 1000 times. Basically the code for the exporter is not quete complete and the unmess is an app that fixes that.
#45
The Max 4 and 5 exporters from bravetree do not require this fix. The Unmess utility is included in the download archive with the Max 6 exporter.
All exporters are avaiable for download from the DTS Exporter Matrix.
07/20/2004 (5:09 pm)
Unmess fixes the Tribes2 autodetail scheme that was removed from the engine, but not the exporter, before teh final code dump. It is needed for the Max 3 exporter and this max 6 exporter because it is based on the max3 exporter code.The Max 4 and 5 exporters from bravetree do not require this fix. The Unmess utility is included in the download archive with the Max 6 exporter.
All exporters are avaiable for download from the DTS Exporter Matrix.
#46
If there is a thread where it's really explained and I'm just missing it, please post a link to it.
Thanks,
AR
07/20/2004 (5:10 pm)
I did a search for it before I posted. I guess I was looking for a little more detail than: It fixes DTS models that don't work, and it somehow related to the Tribes 2 AutoDetail system. The closest I found was www.garagegames.com/mg/forums/result.thread.php?qt=16903 where someone asked the same question but never got an answer either.If there is a thread where it's really explained and I'm just missing it, please post a link to it.
Thanks,
AR
#47
I do not have access to it anymore, by the way.
07/20/2004 (5:18 pm)
Samme NG: Long story short, we tried the exporter but max came up with an error and the application closed. This was with Max6.I do not have access to it anymore, by the way.
#48
When the final code drop for the TGE left Dynamix, that code was in a state of flux. The Unmess utilty simply removes information from the shape.
The exporter we distribute has the information already stripped out, and it is not necessary to use unmessdtsd with it. Note that the changes were also submitted to garagegames and should be in the codebase (although we have never checked to confirm this)
07/20/2004 (5:57 pm)
Alex posts the truth, the UNMESSDTS utility basically strips off the Tribes 2 autodetail stuff out of your DTS shapes. Specifically, the merge indices and compute screen error. When the final code drop for the TGE left Dynamix, that code was in a state of flux. The Unmess utilty simply removes information from the shape.
The exporter we distribute has the information already stripped out, and it is not necessary to use unmessdtsd with it. Note that the changes were also submitted to garagegames and should be in the codebase (although we have never checked to confirm this)
#49
07/21/2004 (2:30 pm)
@Matthew: The sdkPLUS is the rewrite of the DTS sdk that Clark from BraveTree is currently doing. It should make exporter creation a lot easier. The Maya exporter is being developed using it.
#50
MATT
07/22/2004 (2:23 pm)
So its actually not compilable? Thats real cool its needs straighting out. Thats thing is hard to navigate.MATT
#51
07/23/2004 (9:24 am)
Well, it compiles for the Maya exporter. Not sure what the actual architecture of the thing is, or whether it will compile on its own (not sure how that would be useful, anyways)
#52
This thing would be fixed up right if we had that.
Matt
07/23/2004 (2:36 pm)
Oh i see. Has anybody heard fron Samme NG about the reflection map fix?This thing would be fixed up right if we had that.
Matt
#53
07/25/2004 (5:02 am)
@Matthew:Sorry for late. I have checked my fixs and seems it fix the MULTI_3 case, it is because MULTI_3 doesn't enable any texture coordinate array for the texture unit. I tried to use same base texture's alpha as the reflection mapping and seems working well.
#54
08/06/2004 (6:04 am)
I have a problem with transluent textures : my model seems to be totally messed up. I used the SORT:: command, it seems exporting well but in fact it doesn't fix everything. I tried to UnmessDTS the stuff, still no result. I'm thinking that it may come from the exporter. Is there a way to test with the latest version of the exporter ?
#55
In fact, regarding transluent textures, especially used a sphere like object (such as hair), it never works well, no matter using SORT::. It is because the drawing order of those polygon doesn't correct even SORT::.
My work around is to use alpha test and depth write (it is default no z write if it is transluent material). I have changed the exporter to accept new command and modified the tsMesh.cc to do the correct rendering.
If the problem is the sorting, I think it is not the exporter's fault.
08/06/2004 (7:02 am)
Could you show us the picture how it mess up?In fact, regarding transluent textures, especially used a sphere like object (such as hair), it never works well, no matter using SORT::. It is because the drawing order of those polygon doesn't correct even SORT::.
My work around is to use alpha test and depth write (it is default no z write if it is transluent material). I have changed the exporter to accept new command and modified the tsMesh.cc to do the correct rendering.
If the problem is the sorting, I think it is not the exporter's fault.
#56
08/09/2004 (11:58 am)
Translucent textures are a sticky issue. Sort is really only meant for fairly low poly objects, it will probably give poor results (not to mention VERY slow performance) on a higher-res objects.
#57
I am getting some funny results. The part of the model that has the visibility track on it Blinks through the entire animation. Maybe 5 frames on 5 frames of.
If anybody has some advice I would appriciate it.
@ Julian:: If you gonna sort big objects you'll need to link the model up so the outer most part is on the bottom of the heirarchy.( I had an explanation in the official FAQ but I can seem to find it) Also make sure to unify and flip normals correctly. Remember if you mirrored an object the normals are flipped although you might not see it in the veiw port. Try reseting the Xform and unifying you normals. Funny normals play hell with the with the engines zbuffer.
Matt
08/16/2004 (7:58 am)
Has anybody tested a visibility animation with this exporter.I am getting some funny results. The part of the model that has the visibility track on it Blinks through the entire animation. Maybe 5 frames on 5 frames of.
If anybody has some advice I would appriciate it.
@ Julian:: If you gonna sort big objects you'll need to link the model up so the outer most part is on the bottom of the heirarchy.( I had an explanation in the official FAQ but I can seem to find it) Also make sure to unify and flip normals correctly. Remember if you mirrored an object the normals are flipped although you might not see it in the veiw port. Try reseting the Xform and unifying you normals. Funny normals play hell with the with the engines zbuffer.
Matt
#58
Any chance this is fixed in TSE?
08/16/2004 (8:15 am)
Oh I thought there was something wrong with our hardware. We tried using a window that was transparent but the interiors outside shine trough and it looked really really bad.Any chance this is fixed in TSE?
#59
I'm starting a new thread about that :
http://www.garagegames.com/mg/forums/result.thread.php?qt=21092
08/30/2004 (5:18 am)
I tried to export with 3DS Max 5 and still have the same problem, so it's not from the exporter.I'm starting a new thread about that :
http://www.garagegames.com/mg/forums/result.thread.php?qt=21092
#60
09/04/2004 (12:55 pm)
Sorting of translucent shapes is a _hard_ problem, and few 3d engines out there solve it both efficiently and well. Most game engines tend to just let it goof up and go with the faster, simpler solution.
Associate Kyle Carter