export and render imported object (to speed up rendering)

Started by Dune, April 01, 2021, 05:20:32 AM

Previous topic - Next topic

Dune

Quote from: sboerner on April 01, 2021, 11:08:30 AM- Ulco, would you recommend this as a new workflow for water and other reflective surfaces?

- This might be less practical for large land surfaces because the resulting object isn't a planet, which means distribution and surface shaders should be set to "Use Y," correct? So if the original surface was generated from a large area, where the earth's curvature is noticeable, the resulting Y-keyed distributions on the object surface would be out of whack. (There may also be issues placing populations?)

- But for smaller foreground areas, or nonanimated water surfaces, this could be a lifesaver. When I disabled the planet (along with the atmosphere) in Ulco's scene and disabled all of the reflection/refraction settings in the water shader (leaving only displacements), TG exported the obj mesh very quickly, in just a few seconds. (I guess I could have disabled the sunlight as well.) Seems like this would be a very practical workflow for still images.
I don't know if I would recommend this, but it's worth experimenting with at least. I think it depends on the scene, as you write. And mainly for reflective (small roughness), small displacement areas. With roughness above 0.2 it's not so slow, but under that, with tiny displacements, it's very slow.

I think it might be good for water too, especially if you raise subdivision for better detail underwater, but I haven't gone so far to test speed differences.
It also depends on your machine of course. If you have a fast machine and don't mind having a render cook while you're on another computer, or sleeping, I wouldn't worry.
I merely tested because I came upon a very slow area in a project that needs a big render, and didn't want my computer processing for days. If it's 24 hours or 8 hours, I prefer the latter plus making an object in a few minutes.

Regarding populating; if the original ground is still underneath (a cm lower or so), you can just use the object as an 'overlay' for the colors and reflections. Planet just needs the displacements then, no colors. Or a gradient from where the object stops. I haven't gone that far either. I still need to find out what an object exactly covers; if it's crossing with the original, or can be put just a fraction higher.

Kadri


Jordan regarding subdividing, i am not sure that this is the best way especially if the exported object is a detailed big object already.
You are actually smoothing the object this way. You loose some hard-edges detail depending on the polygons etc.
If you did this to all your objects some of the changing detail could be because of this.

Regarding holes, if you still want to subdivide an object after you cleaned it, there is a "close holes" command in Lightwave for such problems.
I am sure Blender and others have something like that too. Then subdividing would be much better. But i still would caution about this as i said.

Kadri

About "Subdividing" i should add i speak about the one that is using smoothing obviously.
You can subdivide without smoothing too. So not sure where you do this and in which way.

Kadri

Quote from: WAS on April 01, 2021, 03:33:04 PM...
Quick note: However, there was an issue. The MeshLab object was no longer viewable in Poseray. It would load, but take a very long time, way longer than raw TG file. Then, it would be a blank preview, but when you select a material, the whole viewport goes red. So I tried zooming out... into infinity... and couldn't get the object to ever show. Lol
Inverted normals? As you can use double sided polygons it won't matter in Terragen.
If this is the problem there was an option for this i think in Poseray or at least you could flip them.

sboerner

So here is a test I ran yesterday and overnight to see how practical this process might be with a real scene. (Spent a lot of time staring at the blue spinning wheel. :P  )

For me I'd say this is a typical water scene, about half water and half land surface/foliage. The original water surface is a lake object and extends about 220 meters from the camera. The rendering times given are for the full 2400x1000 pixel frame, which is cropped here.

I exported two versions of the water surface, one at MPD 0.8 and another at MPD 0.6.  The results for both aren't bad, though if you compare them carefully (not obvious here) there is some loss of resolution in both that affects the backlit details in the shadow areas. (Not sure why the lower MPD rendering time is slightly longer than the higher MPD time, but there it is.)

I was going to make more comparisons (MPD 0.4, etc.) but this was taking too much time and the conclusion seems obvious here.

Which is, for me, the savings in rendering time does not compensate for the time spent exporting and handling the mesh objects, which is about 25-30 minutes each on my machine. That means a real time savings of about an hour for each rendering. Again, for me, and for a scene this size, this is not significant. Plus, if you want to make *any* edits to the water surface, you have to go through the whole process again. And anyway I'd rather have the surface detail that gets lost.

So I would not recommend using the process for a scene like this. And never for a scene that is mostly water surface . . . the file sizes and processing times would go through the roof.

Maybe for scenes with smaller reflective areas, or more focused on foreground detail.

Interesting to give it a try, though.

Dune

That's a very nice comparison. It's hard to see any differences (especially if you don't know), so the water object works fine. If you don't need to reduce or clean an exported object it may be faster. In my case, making the actual object was done in minutes, and I imported right away.
Perhaps making the object is even faster if you disable literally everything but the lake displacement.
But I agree, it's not for every scene, but specifically for tediously plodding along areas, like rough, transparent water with upped subdiv settings and say rocks on bottom.

Kadri

Nice comparison.

Curious are you sure that you did not accidentally added displacement to the imported object?

For an animation that time difference is important. But for an image i wouldn't bother too.

sboerner

Quote from: undefinedPerhaps making the object is even faster if you disable literally everything but the lake displacement.
I made a duplicate of the original scene and disabled everything except the lake object (including lights, planet, and atmosphere), for exporting. Which took 5-10 minutes depending on the resolution.



Quote from: undefinedBut I agree, it's not for every scene, but specifically for tediously plodding along areas, like rough, transparent water with upped subdiv settings and say rocks on bottom.
Exactly. In the right context this could save a lot of time, especially with details where the water can be quickly finalized but you want to fine tune other details.


Or, even, make a water object to speed up test renders, then revert to the original for the final rendering. Lots of ways to work with this.

sboerner

QuoteCurious are you sure that you did not accidentally added displacement to the imported object?

I used a copy of the original water shader but set everything on the Waves tab to zero. That should remove all the displacements, right?

When I exported the object I did the opposite - kept the Waves tab settings but zeroed out everything in the Reflections and Sub-surface tabs. Just to speed up the mesh export.

Kadri

Quote from: sboerner on April 02, 2021, 01:19:05 PM
Quote from: undefinedCurious are you sure that you did not accidentally added displacement to the imported object?

I used a copy of the original water shader but set everything on the Waves tab to zero. That should remove all the displacements, right?

When I exported the object I did the opposite - kept the Waves tab settings but zeroed out everything in the Reflections and Sub-surface tabs. Just to speed up the mesh export.
Yes looks right.

Kadri


Can't say for sure but from the other thread and this one, transparency gets a boost too
but it looks to me that the most big difference in render speed is with the reflection shader node
and especially with high displacements (many node etc.)  on landscapes.

WAS

Quote from: Kadri on April 02, 2021, 05:53:08 AMJordan regarding subdividing, i am not sure that this is the best way especially if the exported object is a detailed big object already.
You are actually smoothing the object this way. You loose some hard-edges detail depending on the polygons etc.
If you did this to all your objects some of the changing detail could be because of this.

Regarding holes, if you still want to subdivide an object after you cleaned it, there is a "close holes" command in Lightwave for such problems.
I am sure Blender and others have something like that too. Then subdividing would be much better. But i still would caution about this as i said.

I don't know what you mean by smoothing.

And actually subdividing lower MPD objs just smooths polygon edges. Ive done plenty of testing here and you can get game ready rocks at just a mb or two with MPD 0.1 and subdivide it. Sure it's not original displacement, but that's by design...

Same for geonosis disp. A full detail obj is over the OBJ threshold to begin with and would be a broken OBJ file. Its over 9gb. Im pretty sure most software would have trouble loading it, if it isnt broken itself at save time.

However like I said, I could use a smooth version of the terrain which isn't as large, and reapplying geonosis like displacement in Blender using same function formula (maybe even better since I have more noises).

---

As for this method Ive done days of testing and it seems highly redundant a method and you might as well use layer elements. Most these test scenes render longer than the whole process of importing SR reflections from standard to a full PT render and compositing real quick. For a muddy ground, again, there is no reason to go through all this work and its negligent imo. You aren't getting much benefits over whats available already, and you are creating larger projects on disk

Kadri

Can't quite understand from your post. What are you using for subdividing?
And what is "geonosis"? Searched but couldn't find anything?

WAS

Geonsosis is a planet from Star Wars that I'm doing displacement like. That's what the spires terrain is, without the geonosis displacement. I was going to subdivide a bunch and try applying the disp back in TG, but the terrain has issues. So my next step is testing in Blender. Your trick of a "perspective" render it just odd, and wouldn't work for game terrain.

Kadri


Just asked in which software you did use "subdivide"? Still not sure from your post.

Here we go gain...

I didn't say that the perspective obj method would be good for a game.
Do you know why? Because in games they do this on the fly (depends on the game) like Terragen does it.
Terragen uses what it made internally-dynamically and just exports it as a static frozen object (with the detail you choose).
The object you get with perspective is actually the same that Terragen uses (more detailed of course).
In export time you get a lower quality but it is just that same object actually.
If that is odd then you are using an odd software and most games too...at least some games.

Why are you still arguing i don't know i thought we got over this.
As i just wrote above that for an image i wouldn't even bother with this method.