
bobbysoon
Joined: Feb 1, 2007
|
Posted: Aug 26, 2011 02:41 AM
Msg. 1 of 10
updated wrl importer (beta)Newer update (see my next post) Newer newer updateYet another update - Fixed up edge handling *update- centers pivotsDrop "Import WRL (beta).mzp" onto gMax. It will copy the importer script to Scripts, and a macroscript to run the script to MacroScripts. It'll then execute the macroscript, making it immediately usable, and then it'll open the Customize UI Dialog in which you can configure a hotkey and/or menu, or what have you. Select HEK from the Catagory drop down list box, and you'll see "Import WRL (beta)" listed. Menu setup is drag and drop. co-planars will be red and green! (aren't they always?) They'll also be named "Wrl Co-Planar #" orange will be assumed to be overlapping faces, and will be named "Wrl Overlap #" That's the only kinds of error geometry I have handy at the moment. I haven't tested it with other kinds of errors. I named it with the (beta) at the end so it doesn't overwrite the older version, in case you're using it, so you can fall back on it if this beta fails. Let me know if it does, if you would, with the wrl that breaks it pasted into a post. Also, I'm not sure I'm assuming correctly with orange always being overlaps, and I don't know about the rest. Please share what you know of tool's color coding, if you happen to have noticed it's coloration tendancies. [edit] looks like degenerate triangled are red... violets are blue... Edited by bobbysoon on Sep 3, 2011 at 04:21 AM
|
|
|

CAG Gonzo
Joined: Apr 2, 2009
Retreat? Hell! We just got here!
|
Posted: Aug 26, 2011 08:07 AM
Msg. 2 of 10
The HEK tutorial has all the errors and colors listed under Level Compilation.
Red and green: nearly co-planar surfaces Orange: duplicate triangle building connected geometry (wtf?) Magenta boxed lines: unearthed edge Cyan: surface clipped to no leaves Red: z-buffered triangles Red: open edges Red: update edge Orange: overlapping faces (Warning! Errors may be total BS) Yellow: portal does not define two closed spaces Degenerate triangles are not associated with a specific color in this reference.
Edit: I just used this: I must say, renaming the errors according to their type is most useful, as is their double-sidedness. Other than adding support for the remaining errors, I'd say about the only thing that would be nice is centering the error's pivot on the object, instead of leaving it centered at the origin. But that's minor and not necessary. Magnificent job! Edited by CAG Gonzo on Aug 26, 2011 at 08:17 AM
|
|
|

bobbysoon
Joined: Feb 1, 2007
|
Posted: Aug 26, 2011 03:08 PM
Msg. 3 of 10
Thank you. That puts things into perspective nicely. I think I can do that, centering pivots, and I think I'll just have to have it name objects according to color for the multipurpose red and orange objects. newer update, handles more colors. Newer newer update Fixed install issue, and not using black anymore for object wirecolor. Yet another update - Fixed up edge handling update- centers pivotsCo-planars seem to be the only poly-chromatic objects. So the rest get named and colored by their color. Material and object color, and object name. Still need a "Magenta" sample to name that one. Also, you won't see error geometry for co-planars. I have it deleting those at the end of the script. An easy edit near the end of the script will prevent it from deleting co-planar warnings if you wish. oh yeah, center pivots... I think combining common error types into single objects might be handy too. Edited by bobbysoon on Sep 3, 2011 at 04:21 AM
|
|
|

D0ubl3 HeLiX
Joined: Aug 27, 2010
- Environment Artist -
|
Posted: Sep 1, 2011 01:14 AM
Msg. 4 of 10
Hey, Using 3ds Max 2011 64-bit here. Just so you know. I dragged-and-dropped the .mzp onto max, but it threw an error: --------------------------- MAXScript FileIn Exception --------------------------- -- Runtime error: fileIn: can't open file - "C:\Program Files\Autodesk\3ds Max 2011\UI\\MacroScripts\Import WRL (beta).mcr" --------------------------- OK ---------------------------
Anyways, it I opened up the .mzp file with winrar and went to install it manually, and found that the files were copied correctly and everything (I think), so I just went into customize UI and made a button from there. Not critical, but an extremely minor annoyance. Once I got everything working, I went to import a .wrl, and everything seemed to go OK. However, the color of the geometry was black, and I couldn't see it in the viewport. Maybe it's too small, I'm not quite sure. I went to the display tab and checked display box or whatever and it rendered a box around the "geometry" so that's how I located my error spots. Still way better than converting VRML 1 > VRML 2 and import into another program, export, import into Max. Which wasn't really working that well anyways. Can't say how much I appreciate all of your work. I think it's great that people are still making stuff for this game so many years out and all. Awesome stuff here once you sift through some of the BS that's typical from many communities.
|
|
|

bobbysoon
Joined: Feb 1, 2007
|
Posted: Sep 1, 2011 05:33 AM
Msg. 5 of 10
Thanks for the apreciation. Nice to hear. It'd help if you could post or pm the wrl. I set black up for non-co-planars (red & green) of more than one color, so, what kind of error is that? Maybe lavender would be better for the unknowns. I don't think tool uses that. I see what I did wrong - ConfigImportWRL.ms is off target. Fixed. Thanks for bringing it to my attention, despite having worked around it, and sorry about that minor annoyance. Newer newer updateYet another update - Fixed up edge handling update- centers pivots Edited by bobbysoon on Sep 3, 2011 at 04:20 AM
|
|
|

D0ubl3 HeLiX
Joined: Aug 27, 2010
- Environment Artist -
|
Posted: Sep 1, 2011 11:44 PM
Msg. 6 of 10
Okay, so I ran tool on some geometry that I knew had only a few errors. Tool spits out that there are 3 edges open: ### ERROR edge #49 is open (red). ### ERROR edge #70 is open (red). ### ERROR edge #241 is open (red). ### ERROR failed to build collision geometry. ### ERROR failed to import collision bsp.
So, I import the .wrl and find that the edges are not highlighted in red, but rather a light blue-ish color. I have the .wrl file here > http://www.mediafire.com/?891ztkh5l46yhdt. Perhaps the issue with colors is only a 3ds Max thing? (As a side note, other .wrl files that had other edge issues did import as colored red, so I don't really know what's going on here. They were z-buffered and degenerates I believe...) Also one note, if I have my mesh selected when I click the button to import the .wrl and I proceed to import, the object that was selected is deleted from the scene. Also, the reason that I couldn't see the edges was because they are imported with "Edges Only" checked in the display properties. Not entirely sure why the aren't visible with that checked, but at least I figured it out. Edit: Oh, and drag-n-drop install seemed to work fine this time! Edited by D0ubl3 HeLiX on Sep 1, 2011 at 11:44 PM
|
|
|

bobbysoon
Joined: Feb 1, 2007
|
Posted: Sep 2, 2011 01:06 AM
Msg. 7 of 10
Per vertex data is the difference with this. Those other edge errors are face data. This is lines. Thanks for the wrl. Now, I think i got the 'PER_VERTEX' handling worked out. It's red, anyhow. I had it set up to delete old error geometry. I thought "select $wrl*" would make it drop the old selection, but maybe it sometimes doesn't. So I preceeded that line with ClearSelection(). Hopefully that fixes the delete issue. The delete is for debugging anyhow, and will be removed when it's all worked out. I find that if I uncheck Edged Faces in the viewport config dialog, I can't see this wrl anymore. Everything I ever work with has Edges Only checked in it's object properties. You said display properties? Maybe you meant "Edged Faces". Display Selected With Edged Faces is also something to consider using, instead. Good stuff. Thanks for testing it out, and the feedback. Yet another update - Fixed up edge handling update- centers pivotsEdited by bobbysoon on Sep 3, 2011 at 04:20 AM
|
|
|

D0ubl3 HeLiX
Joined: Aug 27, 2010
- Environment Artist -
|
Posted: Sep 3, 2011 02:59 PM
Msg. 8 of 10
Alright, so I was curious about what was going on between you and I. I figured out that Max reverted to DirectX 9.0, but since I changed it to 10 I can see the lines just fine. (As long as edged faces is enabled.) But yeah, it was strange that unchecking "Edges Only" in the display properties did allow me to see the lines in DirectX 9. It's strange to note that checking "Vertex colors" also enabled the lines in the viewport. I don't know what was going on with that, but with DirectX 10 all is well. Thanks for all of your work. I tried the new importer and the lines are red and have perfectly centered pivots! Awesome work!
P.S. OpenGL is good was well. Better performance than DX10 on my rig too! Edited by D0ubl3 HeLiX on Sep 3, 2011 at 03:21 PM
|
|
|

bobbysoon
Joined: Feb 1, 2007
|
Posted: Sep 3, 2011 04:43 PM
Msg. 9 of 10
An edge is as an edge does. Mom always said life was like a box of edges.
Case closed. I'm uploading this puppy to halomaps. Thanks alot for helping me debug this. Now, if I can just un-beta it without screwing it up :p
|
|
|

D0ubl3 HeLiX
Joined: Aug 27, 2010
- Environment Artist -
|
Posted: Sep 3, 2011 06:59 PM
Msg. 10 of 10
Haha, good stuff bobbysoon. You're a great person/asset for the community! See you around!
|
|
|
| |
|
|
 |
|