LWO micro exporter resolution

Started by pagan, August 28, 2008, 10:01:31 AM

Previous topic - Next topic

pagan

Hi I just wanted to know on what the resolution of the lwo micro exporter depends on?
I though it was just a matter of the highfield but apparently I have realized that if I use different rendering setting(such us the size of the image) it also affects the density of the terrain polygons which are being exported.
Are there any other dependencies?

Cheers!

Matt

The LWO micro exporter exports the same micro-triangles that are generated and rendered into the image, so the most important things they depend upon are image size and render detail. When you render an image at low detail the micro-triangles are very easy to see in the image. Those are the triangles that are exported.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

pagan

Ah...Ok, however I have been exporting different shots but with the same details and image size and this resulted in different resolution of triangulation...do you know why?

Matt

#3
From different camera positions? Micro-triangles are calculated to be a particular size in image space, so this means that in world space triangles closer to the camera are smaller than those far away.
Just because milk is white doesn't mean that clouds are made of milk.

pagan

#4
Ok I get it now... that's a bit wierd for me but I believe that there is a reason behind.
I say so because I would make the LWO micro exporter to depend only on the highfield resolution so that every time the user changes the camera position the result would be always the same.

I find quite difficult to use it because sometimes I get not enough resolution while sometimes my exported terrain is so dense that I can't even load it into my application.

Are there any tutorial around on how to set the LWO exporter so that, no matter what the camera position is, the result(specified by the user) is always the same?
I am triyng to export different bits of my terrain at a resonable resolution so that I can work on the in an external application

Oshyan

The user will not always be using heightfields and there is a separate method for exporting heightfields to geometry as well. The reason the LWO microexporter mesh density works the way it does is because it basically takes advantage of the fact that the rendering process is already generating those triangles for the render itself and it just outputs them for you. Otherwise you'd have to do a separate pass just to generate the geometry.

If you just want to export a finite area at a specific detail you can use the Heightfield Export LWO node. Your terrain will need to be a heightfield, so if you're not already using a pure heightfield, you'll need to plug the output of your terrain generating network into the "Shader" input of a Heightfield Generate node. This essentially sets it up to rasterize your procedural terrain into a heightfield, which you can then export. Once connected to the Shader input click Generate and it will rasterize your heightfield.

Now go to Add Operator and add a Heightfield Export LWO. Setup the path and then click Export to File and you should get one or more LWO files with an accompanying LWS (Lightwave Scene file) that positions them all correctly relative to each other. You will get multiple tiles depending on the extent of the area you are exporting (and possibly geometry detail). I believe this is due to a limitation of the LWO format in terms of how much geometry can be stored in a single file; it may only be a practical rather than a technical limit.

To adjust the area and resolution you use the settings in the Heightfield Generate node. The first set of numbers at the top (to the right of the "New Heightfield" checkbox) will be the heightfield resolution - by default 1000x1000 (in pixels). I believe this also corresponds to the geometry density, so you can use this to adjust the geometry to your needs. The second set of numbers to the right of "Size in meters" is exactly that - the size the terrain will cover in meters. Here you will need to determine how much area you need and then set it correctly to cover that area.

I think that should get you going. Let us know if you continue having problems.

- Oshyan

pagan

#6
Ok...Thanks for the wonderful help, I will give it a go...the only thing that I don't understand is how to choose only a certain area of my terrain to export.
This is because I have a quite large terrain and I don't want to export it all.

Also should I have all the setting( feature scale, feature stepness etc...)of my new Heightfield Generate node set to 0?

Oshyan

You choose an area by defining the size and positioning of the generated heightfield. The size is set on the Heightfield Generate itself, it is the "size in meters", the 2nd set of numbers. The position is set in the Heightfield Shader node that is the *parent* of a Heightfield Generate. Change either Position Center or Position Lower Left (depending on what is easiest to reference for you) to adjust the position of the generated (and therefore exportable) terrain area. This is essentially rasterization of a procedural terrain in a square area defined by these two settings.

If you are using the Shader input of the Heightfield Generate, the other settings should not matter as they will be overridden by the input from the Shader.

- Oshyan