Re: [wip] .render_model exporter (First custom model ingame!)
Quote:
Originally Posted by
TheGhost
Are you serious? That has nothing to do with anything.
The reason that you get degenerate triangles is because of the way the JMS was imported in Halo 1. The post-processing done in Tool created degens, which the game ignores. In Halo 2, the processing done by the exporter breaks down verts along smoothing groups so the compiler doesn't have to distinguish. Undoing the process in the gbxmodel tag isn't that hard. How else do you think I made a
gbxmodel importer?
I know the degenerate triangles get ignored, its how and why the tool creates them in post processing I need to figure out. The reason I assumed they were created for triangle stripping is because if you read up on this you will find out that in triangle stripping, the degen triangles that the game ignores are created to be used to jump around the model to start and end strips of triangles. Undoing the process is not something I have to do, its the process that I have to do, not undo.
Quote:
Originally Posted by
TheGhost
Code:
triangle_vertices = (geometry_part_triangle_blocks[g][p] * 3)
for t = 1 to triangle_vertices do
(
append vertex_order ((readShortB "#signed") + 1)
)
vo_count = vertex_order.count
if vertex_order[vo_count] == 0 do deleteItem vertex_order (vo_count)
if vertex_order[vo_count-1] == 0 do deleteItem vertex_order (vo_count-1)
for w = 1 to (vertex_order.count - 2) do
(
triangles[w] = [vertex_order[w],vertex_order[w+1],vertex_order[w+2]]
)
for r = 1 to triangles.count by 2 do
(
a = triangles[r][1]
triangles[r][1] = triangles[r][3]
triangles[r][3] = a
)
for d = triangles.count to 1 by -1 do
(
if (triangles[d][1] == triangles[d][2]) or (triangles[d][2] == triangles[d][3]) or (triangles[d][1] == triangles[d][3]) then
(
deleteItem triangles d
)
)
I'll translate that to English for you...
There are 4 for-loops, each has a purpose:
- Read the vertex order from the tag
- Create triangles from every 3 vertices
- Reverse the vertex indices
- Remove degenerate triangles
Voila, your model no longer looks like crap. :p
That code is very similar to what I had to do to extract the lightmap BSP model data from halo 2. Thanks.
Re: [WIP] .render_model exporter (First custom model ingame!)
... just out of curiosity but wouldn't it be easier to create a app or program that compiles *.ass files??? cause as far as i am awear the new *.jms format and the *.ass format are identicle...
*.ass exports Markers, Frames and im pritty sure physics otherwise it would be impossible for sapien to build a havoc representation for things like the level unless it wasn't incorporated into the *.ass file and just uses the level model for the havoc physics with the way everything interacts with the level. but knowing me i could be waay off and the havoc physics files were exported seperately in there own jms file or something. clarity is my friend but its nearly impossible with everything locked and no jms exporter to compare the same model exported in jms format and ass format
Re: [WIP] .render_model exporter (First custom model ingame!)
I don't think .ass does node weights afaik. As far as the .render_models, bungie used a .jms format. The tags contain logs of the .jms files that were compiled which is why I'm pretty sure.
Edit: nvm, actually, it does do weights. I don't really know whats the difference between the .ass and what ever .jms format bungie used.
Re: [WIP] .render_model exporter (First custom model ingame!)
They just changed the extension to mock us, IMO. :eyesroll:
Re: [WIP] .render_model exporter (First custom model ingame!)
Quote:
Originally Posted by
jahrain
Right now, my approach is to make a .gbxmodel -> .render_model exporter to save myself allot of work as the 2 formats are similar
could you also do a H2 to H1 after?
Re: [WIP] .render_model exporter (First custom model ingame!)
What would be the point of that?
If what you want is to convert Halo 2 models to Halo 1, you can already do that with conventional modding tools.
Re: [WIP] .render_model exporter (First custom model ingame!)
No, JMS and ASS are not the same.
Also, tool has code to re-compile JMS models.
Re: [WIP] .render_model exporter (First custom model ingame!)
fair enough. but why bother using 2 different formats for models.
has bungie gon insane or crazy?... rofl its more work for everyone if nothing is shared. like collision geometry and physics spheres in ce.
Re: [WIP] .render_model exporter (First custom model ingame!)
Quote:
Originally Posted by
CtrlAltDestroy
What would be the point of that?
If what you want is to convert Halo 2 models to Halo 1, you can already do that with conventional modding tools.
there is a H2V map editor that can do that already?
Re: [WIP] .render_model exporter (First custom model ingame!)