QC 4 Mesh Import From Blender, Anyone?

toneburst's picture

Anyone managed to get .dae files from Blender to work via the Mesh Importer patch in QC4? Is there some special trick I'm missing, because I don't seem to be able to get it to render anything with a Mesh Importer connected to a Mesh Renderer...

a|x

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

sbn..'s picture
Re: QC 4 Mesh Import From Blender, Anyone?

I tried it right when I got Snow Leopard, with no luck. Collada in Blender is in a sad state at the moment, but that's going to be improved a bit when the current Google summer of code project with that aim gets merged in.

I use preview.app to check - I was able to download some collada files that could be seen in preview, and worked in QC. My own from Blender didn't work in QC, and neither in preview, so I think it's a good test.

Looking around for a converter, I found this: Meshlab, but no luck so far in trying Blender > .obj > Meshlab > .dae.

Meshlab doesn't seem to recognize my textures, and outputs files that do open in preview without the error message, but are invisible. My theory is that the material is somehow borked.

ETA: Oh, and Sony of all companies have an OSS collada massaging thingy: Described here. The OSX binary dl from that link doesn't seem to play well with SL java.

toneburst's picture
Re: QC 4 Mesh Import From Blender, Anyone?

Hiya,

Thanks for the info re. Blender. Looking forward to the update.

I've come across Meshlab before. I used to use it to convert meshes generated by Paul Bourke's Superformula app so I could bring them in to QC with Kineme3D (actually, I must try converting some of those meshes to .dae and see if Mesh Importer/Renderer will play ball with them).

Maybe you could test your theory re. bad textures by using QCs mesh plugins to extract the texture from the model, and then either pipe it into a Billboard, or squirt another texture in there, and see if your model becomes visible that way.

a|x

dust's picture
Re: QC 4 Mesh Import From Blender, Anyone?

i use the next gen collada exporter. it won't install on snow leopard so i installed it in leopard and copied the maya plugins to sl, even then its buggy and none of the export features show up.

i have to trick maya into thinking im exporting an obj then after i make that selection i can select collada but still no options. i get two dae exports which both seem to work.. a fbx dae and collada dae. my process was to make model in mud box and textures in mud box export as obj and export displacement and normal, bump, specular, diffusion maps as pngs, then import obj to maya resize, create another shading network from pngs bake the texture to get a uv map then export the model as dae, open the dae in the text editor and change the line init from file to path relative to your qc project then drag and drop it into qc.

i continued to make another shading network via glsl and drop the normal and displacement maps on the low res mesh. this is when i ran into trouble with the lighting not honoring the displaced verts in glsl. as i see today your all ready on top of that problem with open cl.

its kind of lengthy process if you ask me i guess thats what you have to do in order to work in real time. but hey it still beats rendering.

as far as blender is concerned there is a perl script for exporting collada but it only works with an older version of blender. i know it works when i couldn't get the maya plugin to install on snow leopard i tried with blender which honestly seems like a really good app, it supports glsl in the game engine but im more familiar with the maya interface.

actually if you just download a dae open it in text mate or something and you will see the xml tags. you can just copy a fbx vert array and put it in the dae spot, i think they are the same format. copy and pasting 1000 lines of code at time isn't that fun either but thats another solution. you would do the same for colors etc...

sbn..'s picture
Re: QC 4 Mesh Import From Blender, Anyone?

W00t!

Made it work!

basically, you need to use the export menu in Blender. Choose Collada 1.4 exporter. The trick seems to be to press "disable physics".

I didn't succeed in getting materials out quite right, but UV's seem to be OK, so you can texture it in QC.

See example.

PreviewAttachmentSize
collada.zip4.34 KB

toneburst's picture
Re: QC 4 Mesh Import From Blender, Anyone?

Could you post a screenshot of your export settings, maybe?

I'm trying to export a simple Isosphere mesh from Blender. The Mesh seems cool (previews in QuickLook, renders in QC), except it doesn't seem to have any texture coords. You example model does, so just wondering what I'm doing that's different. I'm a complete Blender novice, so maybe I need to do something pre-export to generate UVs...?

a|x

cybero's picture
Re: QC 4 Mesh Import From Blender, Anyone?

Not used .dae from Blender in QC before and after a couple of tries I got the following to work, didn't come up with the kind of polished result you might expect from someone more familiar with Collada files than I ; the key items were, as sbn said , to Disable Physics and also to give the model a texture , without which the exported .dae just wouldn't take an image input, also takes colours.

sbn..'s picture
Re: QC 4 Mesh Import From Blender, Anyone?

Well, you may have to unwrap.

The easy way is:

  • Select your object.
  • Go to edit mode (tab)
  • Select all (A)
  • Unwrap (U)
  • Select "Project from view( bounds )" in the menu
  • Exit edit mode

Trouble is, that's not a very nice unwrapping. It has stretching / mirroring in stead of seams.

To get more control and decide what you want, you'd really have to learn the UV editor. It's not hard, and I think this manual page is up to date.

ETA: ( To answer your question - yes, I did a quick unwrap out of old habit.

Oh, just remembered, for hard-edge models, "follow active" sometimes gives good automatic results, and you could always select "lightmap UV pack" and then paint the thing inside Blender directly. )

toneburst's picture
Re: QC 4 Mesh Import From Blender, Anyone?

Thanks, mate, will give that a go. I must admit, I find writing code much easier than using a 3D program.. they've always scared me :(

a|x

dust's picture
Re: QC 4 Mesh Import From Blender, Anyone?

tb you would probably rock Maya or Houdini you can do everything programmatically or via node graphs as well like in qc. your very familiar with 3d., i think you should be able to transition to a non realtime context no problem. its like you understand how ray tracing actually works. hey blender is scary to me, getting past the interface is a major hurdle. lets say blender isn't intuitive at all. i really like modeling and texturing in mud box, it is a very minimal but elegant software solution that is not overwhelming like lets say z brush. the tools are sparse but very effective if your sculpting. i do how ever like sub division modeling as well, blender is pretty good for this type of modeling. i think if you tried another package other than blender you may be happier with more immediate results.

sbn..'s picture
Re: QC 4 Mesh Import From Blender, Anyone?

No problem!

I was scared myself a few years ago, but I've found that the most important part of 3D modeling is understanding the underlying structures and systems. Once you have that, adjusting to a different app can be done within a couple of days to a week. It's all about button placement.

It's just that there are so many buttons to place in a modern all-round 3D app...

ETA: Of course, in response to this:

toneburst wrote:
Thanks, mate, will give that a go. I must admit, I find writing code much easier than using a 3D program.. they've always scared me :(

a|x

sbn..'s picture
Re: QC 4 Mesh Import From Blender, Anyone?

Yeah. I've read that of the mainline all-round 3D apps, XSI has the most advanced nodal system. Houdini is regarded as more of a simulation / effects package, but has a great node system (from what I read). Again, of those discussed I've only ever used Maya briefly, and don't mean to start any flame wars in here ;)

I'm pretty proficient at Blender, and the 2.49 version even has two lines of code of mine in there. Look out for the next version, 2.5, which has a completely redesigned UI and is slated to finally shed its weird IRIX shortcuts (ctr+W for save?!) You can tell I'm a bit of a fan, so you'll forgive me for mentioning the new open movie, the Durian project. Basically, the core devs and selected Blender artists move in together for a few months to produce a short film. Judging from the last two movies of this type, putting coders and superusers in the same room is the best idea ever in software development, so I expect to see the same tiger leaps forward in functionality and polish the next few months.

By the way, both Houdini and Maya have free versions available, so you could check them out.