Ask a Question related to Macromedia Director 3D, Design and Development.
-
hondo3000 #1
how to flip normals of a imported model?
i have some models that i have created with cinema4D, the problem is that i
want to flip the normals of some of these models. to do this i add a meshdeform
modiefier to the model and try to give every face a new list of vertices.
these vertices are just the same as before but ordered in this way:
before: [1,2,3]
after: [3,2,1]
this should make the face look into the opposite direction.
but i do not get this to work,here is the code i that is not working:
vertlist=themod.meshdeform.mesh[m].face.vertices
newvertlist=[getAt(vertlist, 3), getAt(vertlist, 2), getAt(vertlist, 1)]
themod.meshdeform.mesh[m].face.vertices=newvertlist
if somebody of you knows what to do just tell me. it is very important to do
this in director and not in the 3D authoring programm!
hondo3000 Guest
-
How to get imported model properties
Hi guys, I'm looking for get heigth/width/length properties for any model imported from 3DSMAX. I saw that i can read this properties from model... -
modelsunderray and normals
in this scene " http://www.kisd.de/~lutz/3dtest/world " i send a ray in the direction of the cameras front. you can navigate with "wasd"keys and... -
Putting an imported model under Havok Control
In the following code: -- gMyWorld is the 3d castmember I'm working with gMyWorld.CloneModelFromCastmember("MyBox", "Box.0",... -
Applying a bitmap to an imported model
Hi, how can I apply a bitmapped texture to an imported 3Dstudio max model. For instance I have a simple model of a character and want to be able... -
Model looks flipped when imported in shockwave(Director)
Hi Sara, I am not 100% sure, but the problem could be the rotation of the model within 3DSMax. First, I would try the "ResetXForm" function in... -
Ex Malterra #2
Re: how to flip normals of a imported model?
do you need to call build() after changing the vertex list?
Ex Malterra Guest
-
johnAq #3
Re: how to flip normals of a imported model?
Can you achieve what you need by changing the model's visibility property
(#back, #front, #both) eg theModel.visibility = #back This should give the
same effect, uless you are using modelsUnderRay, which only works on #front
faces, regardless of the value of this property IIRC. hth johnAq
johnAq Guest
-
::vagt #4
Re: how to flip normals of a imported model?
>
may be something like:> vertlist=themod.meshdeform.mesh[m].face.vertices
> newvertlist=[getAt(vertlist, 3), getAt(vertlist, 2), getAt(vertlist, 1)]
> themod.meshdeform.mesh[m].face.vertices=newvertlist
>
loop all meshes
loop all faces
theFace = theModel.meshDeform.mesh[theMeshNo].face[theFaceNo]
theNewFace = [theFace[3],theFace[2],theFace[1]]
theModel.meshDeform.mesh[theMeshNo].face[theFaceNo] = theNewFace
--???
--this will not invert the normal in normalList i guess!
end loop faces
end loop meshes
face.vertices are for modelresources as far as I know..
>
>::vagt Guest
-
hondo3000 #5
Re: how to flip normals of a imported model?
thanks for your ideas,
i think the problem is that a modelresourc wich type is #fromfile can not be
changed. i want to flip the normals because i am working at the moment on an
easy-to-use tool for cinema4D developers. because the w3D file comes out with
all normals on the wrong side it is impossibil to use rays.
there is one method that can flip the normals. to make the models usable for
raycasting you can make them children of the group "world", but this leads to a
new problem they are mirrored than along the z-axis. but useable with havok and
raycasting.
to make them correct working with havok and look like the original you can
make them child of the group("world") with #perserveWorld. but in this way the
normals are on the wrong side.
the only way it would work correct is to model them mirrored in cinema4D to
have them look correct in shockwave3D and make: c4dmodel.parent=pWorld.
i have to see what is usefull and what not...
i tested the scriptexample of "Newsgroup User"
i tested this script but it is not working. i think its impossible to change>theFace = theModel.meshDeform.mesh[theMeshNo].face[theFaceNo]
>theNewFace = [theFace[3],theFace[2],theFace[1]]
>theModel.meshDeform.mesh[theMeshNo].face[theFaceNo] = theNewFace
the propertys of a #fromfile file. i could generate a new mesh, but this would
add polygones to the scene and even if i delete them after generating new
meshes it would take a lot of time to do this before the scene starts.
i am a little bit pissed off because i mailed maxon (company who produces
cinema4D) and they didnt answered me. maybe because i do not bought the
programm, i only use it in the design shool and the maxon support only reacts
on people who have serial numbers...
since shockwave3D is on the marked nobody deletes the bugs. there are bugs in
havok, bugs in exporters... and then they wonder why shockwave3D is not
becomming the leader in the marked of online3D technologies.
if i find a solution i will put it into this thread.
hondo3000 Guest



Reply With Quote

