This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] Why does my m2 disappear ?  (Read 2150 times)

Garthog

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 56
    • View Profile
[QUESTION] Why does my m2 disappear ?
« on: July 04, 2011, 04:27:38 am »
Hi everyone, i'm new to this community ( Sorry, I feel a little rude because I didn't introduce myself :o )
I have a little problem. I took a box model, and i started to edit it.
When I make it longer, it disappears, depending on the angle of the camera. I guess it's because it's bigger than the original M2, and WoW executable "thinks" we don't see it, so, it doesn't render it.

How can I fix this model, so it will render it properly, when we can see it ?
(Also, does someone know another link to a WoW Dev wiki ? )

Thanks !
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Garthog

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 56
    • View Profile
Re: [QUESTION] Why does my m2 disappear ?
« Reply #1 on: July 06, 2011, 10:12:36 pm »
I guess I have a part of the answer.
Maybe the bounding volume isn't updated in the .M2 file, so it takes the old model's bounding volume, and when the bounding volume isn't in the screen, it doesn't render the object.
Do someone know how to change the bounding volume ?

Quote
Retrieved from : http://www.wowdev.wiki/index.php?title=M-M2

Render X,Y & Z

Render X, Y and Z defines the render position of the object. Normally if you just move the object and the camera leaves the original object position the object stops rendering. Moving Render X,Y and Z along with the object allows you to to extend the render eara to the intire ADT plane.

How is defined Render X, Y and Z in the client ?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Garthog

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 56
    • View Profile
Re: [QUESTION] Why does my m2 disappear ?
« Reply #3 on: July 07, 2011, 12:53:46 am »
Hm, i looked at this, and I tried 3 different modification on my file ( none of them have worked ) :

0x0B8   float   VertexRadius
0x0D4   float   BoundingRadius

I read your guide on how to hex edit and then I tried some value like : 0x42c80000, or 0x00000000 , but, nothing changed in game. It always disappear.
Then, I tried to change de .skin file, and I changed this :

0x2C    float   Radius         Distance of the vertex farthest from CenterBoundingBox.

To different values. I saw that the value of Radius was quite equal to BoundRadius, but, it didn't changed anything :/.

I guess I'm not looking at the right thing :/. Maybe it's in the Vec3F but i don't really know how to modify them. Is a Vec3F something like 3 float X, Y and Z ?
And is the BoundingRadius related to my issue ?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] Why does my m2 disappear ?
« Reply #4 on: July 07, 2011, 12:43:50 pm »
Yes, a vector of three floats is just three floats.
The two vectors define a box. The radius is additional and the radius of a minimum sphere around the box.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Garthog

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 56
    • View Profile
Re: [QUESTION] Why does my m2 disappear ?
« Reply #5 on: July 07, 2011, 02:04:42 pm »
So I guess, if I make the box bigger, the M2 won't disappear anymore ? ( it's a gameobject M2 )
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] Why does my m2 disappear ?
« Reply #6 on: July 07, 2011, 02:21:34 pm »
Yep. Get the maximum and minimum coordinates in all directions, build two vectors of them, edit these, calculate the radius, done.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Garthog

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 56
    • View Profile
Re: [QUESTION] Why does my m2 disappear ?
« Reply #7 on: July 07, 2011, 07:44:10 pm »
That's strange. I looked at these values, and I have two point :

Vec3F[1] (-1.019845; -4.450305; 0.012929)
Vec3F[2] (0.941505; 4.595078; 0.441508)

When I try to see what the bounding box looks like, to see if it fit the model, here is what I have :

[attachment=1:nui52icm]Sans titre.png[/attachment:nui52icm]

Are the Vec3F in the good order : X, Y, Z ?

Here is my M2 file. I guess I'm doing something wrong : [attachment=0:nui52icm]modif.M2[/attachment:nui52icm]

Thanks for your reply schlumpf.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] Why does my m2 disappear ?
« Reply #8 on: July 07, 2011, 09:57:43 pm »
The vector is in x, y, z. I don't know what your editors format is though. Every vector for itself is (v1, v2, v3, ..., vn) and in 3D most of the time (x,y,z). This says nothing about the coordinate system used.

I always got the values from just getting minimum and maximum values of all dimensions of all vertices in the model. That always works. And is the way to go actually.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »