Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - orangeduck

#1
I am using mental ray so I guess I could potentially do the renders in Max, but I need the objects in Maya for some other reasons too - essentially I'm doing some Machine Learning research and using the Black Mesa resources as a dataset. Most of my code is written in Python/MEL so having everything accessible from Maya makes my life a lot easier.

For the prop rotations, I've observed that they seem to get flipped the wrong way when the euler angles are close to 90 degrees or 180 degrees. My suspicion is that this is to do with Euler Angle to Transform Matrix conversion singularities. There are some details about this on this page (and also a potential fix): http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToEuler/ I wonder if that helps? I might try to see if I can help and track down this bug myself. Where might be a good place to start in the Maxscripts if I want to see how prop rotations are set?

For blendmodulate I implemented the final blend weight as something like:

weight = mix(clamp(vertexcolor.a + (blend.g - 0.5), 0.0, 1.0), vertexcolor.a, blend.r)

This is what I could interprit from that page on blendmodule but I wasn't really sure what the exact equation was meant to be.

Thanks
#2
I've made some good progress importing things into Maya. Thanks for all the help. Here are some renders from Dear Esther and Black Mesa:







I had some trouble exporting the vertex colors via FBX. It turns out that FBX won't include the Vertex Alpha channel unless there are Vertex Color channels too. So I had to write a Maxscript that copied over the alpha channel to the color channels before export.

Now I'm reconstructing the materials in Maya and it is all looking good. For the displacement brushes - I was wondering - do you know the exact equation used for the texture blending in the displacement brushes? What I've got now looks roughly right - I am just subtracting the green channel of the blend texture from the vertex color to get the final blend amount - but it is somewhat hard to tell if this is completely correct.

Also you probably know already (since I saw a button to fix it in the import map layout), but WallWorm occasionally rotates props incorrectly when they are imported into the scene. Is there any idea what causes this or how to fix it?

Thanks,

- Dan
#3
Sorry should have been clear - the materials are showing fine in Max - everything is working perfectly in Max now :) - now the challenge is just transfering to Maya.

That was my first idea too - switching out the Render Material with the Object Material, but unfortunately it looks like blend materials wont transfer over fbx (http://forums.cgsociety.org/archive/index.php?t-1250080.html) - I got the same error as with the Xref materials, saying the material type is unsupported. A bit annoying but oh well. I don't need the viewport to be accurate in Maya so just having the render material transfered is enough.

The materials may not need to be an exact match so perhaps just a standard blend will be enough for my purposes. I think I will try to write a maxscript that dumps out all the material details I need, and then a maya mel script that reconstructs them on the other side. Hopefully it will all be fairly straight foward with a bit of trial and error and I can see if the render material blend is okay or if it looks too wacky without fully emulating the vertex color / bitmap interaction.
#4
Thanks - that worked great. In fact you can group select all the materials and merge them at once so it was quite easy.

Now the only remaining issues with the fbx export are the blend textures and the displacement textures (such as on terrains). Both get exported as a hlsl material referencing a shader built for 3dsmax (which doesn't work in Maya). Also the textures they reference aren't linked when you load into Maya. So I guess I'll write a little script on the 3dsmax side of things to mess around with the blend/displacement materials and convert them into something more simple which can be exported through fbx and loaded in Maya.

If you have any ideas/suggestions I'd be happy to hear - otherwise I'll just keep fiddling around until I get it.

Hopefully once this is all done I can show off some nice renders since this is partially why I'm interested in exporting these levels :).

Thanks again.
#5
Cheers for the quick reply.

Haha - yeah setting things up was a little ticky as I had practically zero experience with anything HL2 related, but a bit of intuition got me a long way.

I've verified that the missing props/textures/materials are from the hl2 resources. I extracted all of the hl2 resources (which are bundled with Black Mesa) and put them into their own folders. I added these folders to the extra paths section but seems it wasn't quite working so instead I just copied over all of the hl2 models and materials into the black mesa folders. There were a few naming conflicts but I just took the Black Mesa ones to be the updated version. Now it is working perfectly, thanks!

For the FBX export this is the error I get:


Some materials in this scene may not be supported by certain applications and will import as standard gray materials instead. The following materials are affected:
    -prop_physics015
    -prop_physics_override010
    -prop_static251
    -prop_static450
    -WallWormProxyReference001
    -prop_static342
    -prop_static323
    -prop_dynamic_override011
    -prop_dynamic_override035
    -prop_dynamic_override040
    -prop_physics021
    -prop_physics019
    -prop_static087
    -prop_physics010
    -prop_dynamic_override037
    -prop_static336
...


This affects 76 of the objects.

I took a look and it seems all of the materials that don't export are the XRef materials/textures E.G all of them end in an XRef "Override Material". This would explain why it seems mainly it is the props which are not having their textures exported. Perhaps there is some way to load in these references directly to the scene? Sorry it has been a long time since I've used 3dsmax so I'm not so familiar with these things. Any ideas?

Thanks again for the help.
#6
Hey,

First of all thanks for your awesome tools!

At the moment I'm trying to set up importing of Black Mesa using WWMT. I'm about 90% of the way there and at the moment I can successfully import maps with most of the props and materials but there are just a handful of props and materials which don't appear (prop or material is missing). For example some window textures are missing and some terrain textures, as well as models for items like health kits etc. My suspicion is that these props and materials coorespond to props and materials from vanilla hl2 but it is a bit hard to work this out.

So first of all is there any way to check exactly why these props or materials are missing? Secondly, if these really are from vanilla hl2, is there any way to set up wallworm so that it can import these too?

I also have a second question - I'm exporting these scenes as ".fbx" so I can load them into Maya. Again - most of the time this works perfectly but some of the materials created by wallworm - such as those assigned to props - don't seem to be getting exported properly. I suspect these are the materials which are doing some complex blending or the multi-materials. Can you shed any light on this and do you know of any process I can use to bake these materials into some simpler form, so I can at least get the materials on the props imported into Maya (complex blended materials on terrains are less important).

Again many thanks for these incredible tools!
SMF spam blocked by CleanTalk