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
#2
Do you have a compiled version of the exporter that you could email to me? (alexs@garagegames.com) I would like to distribute it to a few people and test it, then include it in the Max filepack if it works.
04/16/2004 (5:13 pm)
Does the multires information work with this fix? Or does it just stop the crashing?Do you have a compiled version of the exporter that you could email to me? (alexs@garagegames.com) I would like to distribute it to a few people and test it, then include it in the Max filepack if it works.
#3
In fact, in the original code, it use IParamBlock without checking if it is actually IParamBlock or not. But, it is IParamBlock2 in new Max 6's MultiRes so the virtual function table is incorrect and causing crash.
After changed the code, my DTS exported correctly with MultiRes.
I will email to you my version for testing later on.
04/17/2004 (8:29 pm)
Actually I have using Max 4 exporter before, after upgraded to Max 6, I found it crashed in MultiRes.dlm.In fact, in the original code, it use IParamBlock without checking if it is actually IParamBlock or not. But, it is IParamBlock2 in new Max 6's MultiRes so the virtual function table is incorrect and causing crash.
After changed the code, my DTS exported correctly with MultiRes.
I will email to you my version for testing later on.
#4
04/17/2004 (9:37 pm)
We would be very interested in seeing this. Please send it our way, thanks. :)
#5
Anyone else had similar problems?
04/18/2004 (8:02 pm)
Does the max6 exporter support sequence exporting - Max is crashing when I try to export sequence objects (.dts exporter works fine) so im not sure if it is me or the exporter?Anyone else had similar problems?
#6
After I have fixed it, I can export both MultiRes or non-MultiRes DTS and DSQ.
Beside this, I have a question about the 2-sided material. As the model sharing the vertex and the normal, 2-side material will make the normal become zero and does reflect the direction light in the scene. It is because the normal generation is additive, one-side's normal will be cancelled by opposite-side normal. But it seems there is no way to solve, I just making two set of vertexs for the two sides.
Samme
04/19/2004 (12:37 am)
Even I haven't fixed the MultiRes crash problem, I can export the sequence (without MultiRes).After I have fixed it, I can export both MultiRes or non-MultiRes DTS and DSQ.
Beside this, I have a question about the 2-sided material. As the model sharing the vertex and the normal, 2-side material will make the normal become zero and does reflect the direction light in the scene. It is because the normal generation is additive, one-side's normal will be cancelled by opposite-side normal. But it seems there is no way to solve, I just making two set of vertexs for the two sides.
Samme
#7
If so, I'll try it when I get back home and let ya know how our meshes work with it.
04/19/2004 (12:44 am)
This sounds great! If I take it correctly, this will make the exporter actually EXPORT .dts shapes WITH multires enabled?If so, I'll try it when I get back home and let ya know how our meshes work with it.
#8
If you found a crash, please let me know more detail and I would like to fix them also... ^^
04/19/2004 (1:04 am)
I hope so. In fact I haven't made much changes in the source code. However, I haven't test many models, just the one created in Max 4.2.If you found a crash, please let me know more detail and I would like to fix them also... ^^
#9
04/22/2004 (4:50 pm)
Exporter submitted but no responses yet. is it work for you? ~_~
#10
04/23/2004 (7:51 am)
To whom did you submit? I don't think I've seen it come across my inbox, and Tim and Rick (who may have gotten it otherwise) have been very busy with CVS server repairs.
#11
We have had problems with executable files like the exporter being sent as raw attachments - our email server eats them because it assumes any executable is a virus.
If you sent it before and didn't get a response, try again but make sure you .zip it before sending. The mail server will let zip files through (in theory).
04/23/2004 (11:29 am)
I haven't gotten any mail from you either.We have had problems with executable files like the exporter being sent as raw attachments - our email server eats them because it assumes any executable is a virus.
If you sent it before and didn't get a response, try again but make sure you .zip it before sending. The mail server will let zip files through (in theory).
#12
I will send you again in Monday.
Thx!
04/23/2004 (12:29 pm)
I got it. I think I have been sent just .DLE attachment as may be it has been eaten.I will send you again in Monday.
Thx!
#13
04/26/2004 (11:14 am)
Thanks, Samme, I look forward to it!
#14
04/26/2004 (7:24 pm)
HI, just send to alexs@garagegames.com, pls. check. ^^
#15
I wil look into it and post an update soon. Sorry this is turning out to be so much trouble.
04/27/2004 (10:53 am)
Samme, I have not gotten any messages from you, still. I'll ask Rick to look at the virus filter to see if it was getting caught up there. I don't know what is wrong with our mail server.I wil look into it and post an update soon. Sorry this is turning out to be so much trouble.
#16
04/27/2004 (11:09 am)
Samme, could you post your email address so that I can send you a FTP username and password where you can place the file? It is the only way I can think of to get around our email filtering software, which seems to have blacklisted your ISP.
#18
04/28/2004 (12:11 pm)
So what did you find out Alex? Is it working as it should?
#19
04/28/2004 (12:57 pm)
Alright, login info sent!
#20
05/03/2004 (7:11 pm)
Had chance to look at this at all yet Alex?
Associate Kyle Carter