some thoughts about making TG more useful to other programs

Started by shadowphile, February 28, 2010, 06:43:31 AM

Previous topic - Next topic

shadowphile

I bought TG because although Blender has a full suite of tools, its difficult to make really impressive skies and landscapes like TG.  I bought TG with the intention of adding large backgrounds to my Blender scenes.  However, as I played with TG, I found my 'backgrounds' moving into my 'foreground', where my stages in Blender would be.  I started making my entire terrain in TG until it struck me that I can't possibly render all my panoramic scenes in TG because it I need all the animation and modeling tools in Blender.  Therefore, I had to return to the notion that somehow I need to bring TG resources back into Blender, at some level.   Easy to to make skies and horizons, but how to leverage all that great local terrain outside TG?

After playing with TG, I am struck with the notion that I am locked into the TG world.  I can't bring the full capacity of Blender into TG (just importing objects) and I can't bring the full results of TG into Blender. (just renders, and some mesh export tools)

The main problem I have with the mesh export tools is that they can't leverage the multi-fractal nature of TG.  To export a large terrain I get either a very coarse mesh or a mesh so dense it exceeds the ability of other programs to handle. The very approach of using a regular mesh truncates the multi-fractal detail.
One idea I'm investigating is to generate a non-linear mesh in Blender, import to TG, adjust the Y values to equal the local terrain, then export it again back to Blender.  Although I can't do moving animation with this method, it does allow me to define where the fine details need to be and let the rest be as rough as possible where available in my project.  My current mesh is a big flat plane with very fine mesh in the center (where the camera is) that progressively gets coarser as the mesh moves from the center.  By taking advantage of visual angles rather than absolute resolutions, defined by the camera location, one can make a mesh that is a much much smaller vertex count than a linear mesh.  As an experiment in Blender I created a 10Kmeter wide terrain with centimeter-grade resolution nearest the camera.  Compared to a linear mesh with the same width and resolutions, well, I shouldn't have to spell it out, but will.  The gain is monstrous, several orders of magnitude and easy to manage in Blender.
Eventually this could be fancy export option built into TG, but for now I can generate that mesh in Blender and import it into TG.
But...is there any way to modify the Y values of an object to match the terrain? (and export again)

Besides an answer to my question, does anybody else have some ideas about 'mapping' the features that make TG powerful so that they can be more useful outside?  Most of the suggestions I've seen focus on import/export to other file formats, but TG is special because unlike most programs doesn't rely on geometry.  You almost HAVE to use the TG render to get TG-rich images.  Does not play well with others... :P

Henry Blewer

I also use Blender. There is a way to do what you have in mind. It's not easy, but it's not that hard...

Anyway. You have your Terragen render. Figure out where the action takes place. This is the area of the height field to export. Load this Lightwave mesh into Blender and re-save the scene in Blender's format. Load the rendered image into the background of the workspace. This should allow you to match the imported height field with the image. (You may want to use reference marker objects in a separate render. These can be used for alignment.)

The render from Terragen can be mapped onto the height field using the WIN mapping of the image texture. Now comes the hard part, I am not sure how to do this. Blender Units do not mean anything. Align the camera so the height field map blends correctly with the background.

Let me know how this works out. I have a book on Blender compositing. I'll look it up. This is just from memory of what I read.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Oshyan

Your concerns are certainly legitimate and I know others are working with similar problems in their workflows. While rendering outside of TG is not at all frowned upon, I will say that TG2's renderer is one of its strongest points by design, and while we fully intend to improve import/export options, we hope most of all to find ways to enable workflows that take best advantage of the strengths of all applications involved. That being said, as I mentioned we do intend to improve import/export support. Something that allows you to vary the geometry detail by camera distance (or other factors) would be ideal, e.g. if you could modulate geometry density using a simple Distance Shader. Some improvements to import/export (though not necessarily that specific capability) will come with the finalization of the Animation Module this year.

In the meantime if you haven't tried the LWO Microexporter, you might take a look at it. Although the exported geometry can be problematic (holes), it does essentially vary geometric density further from the camera point since it's basically a dump of geometry from the renderer, which does LoD calculations to save time and thus uses larger polygons further from the camera (larger by comparison to their average surface area in world space, not largely relative to the camera obviously).

We would welcome any feedback you have on how your workflow might best take advantage of the strengths of both TG2 and Blender.

- Oshyan

shadowphile

I have used the LWO exporter but with an ortho camera pointing straight down.  I'ii try some other approaches, thanks for the tip!

davedjohnson

I'm hoping that we can find a procedural way to export this lovely terrain to Houdini. If I could get the terrain and camera data out to Houdini, all would be right with the world. Then I could project the beautiful renders from TG2 onto the grid, and do all the other things that Houdini does so well on top of that.

Dave

Jason71

I definitely agree, some tools specifically for integrating some more assets between apps would be really critical to Terragen's use in mid to small studio pipelines (where our job may not be focused on creating Ansel Adams type compostions).  Here's a short wish list that I'm hoping for :)

1. Lat Long camera lense to create HDRI's without having to create cubemaps
2. mesh export to the FBX or OBJ format.  LWO is a very hard format to find free converters for...\
3. A procedure or function for baking procedural textures to the procedural mesh before export.  IE maya can convert procedurals to file textures based on the objects UV's.
4. More image output type options beyond bmp, tif and exr.
5. Multipass render buffer support for splitting out diffuse, spec, reflection etc
6. Some way of being able to easily create render masks from elements inside a shader network to ease grading of specific things in the render.

7. I use terragen for vehicle render backplate right now, and so one thing I'd really like is a tool that can create procedural roads that cut and hug a mountain landscape based on curves or a drawn path.  






Oshyan

Most of your requests are already in our plans for future development. No target date for any of that at the moment unfortunately, though I can say that FBX will probably be the first added feature in your list.

- Oshyan

N810

DWG import would be nice too,
we had it in TG.9 and I believe the format isn't
teribly diferent from OBJ so I immagine its doable..?
Hmmm... wonder what this button does....

Oshyan

I don't think DWG was ever a part of TG 0.9/Classic, unless it was a plugin.

- Oshyan

N810

Yea it was in the "for export only" plugin...
basicly it just exported a huge mesh.


Ps.
ahh I found it, its Autodesk DXF export, (basicly the same format)
http://homepages.ihug.co.nz/~jomeder/tgpguilib/index.html
Hmmm... wonder what this button does....

Oshyan

Ah yes, if you'd said DXF export I've have recognized you were talking about FEO. ;)

It's really a pretty outdated format though, and not one we're likely to spend any time supporting. It might come with FBX though.

- Oshyan