Tuesday, 17 May 2011

Day 48



Rocks layout (Instances)
At first, the whole terrain was being used as template to instance onto, did not feel i have enough control over where rocks were being placed, rock_A may be at desirable location but because other rocks were being placed where i didn't like them... rock_A is moved when i shuffle the rest using the seed value.

Decided to categorize the template inside of heightmap_otl into fore, mid and background, an extra advantage of doing this is i'll be able to render them separately using takes in the later stage which leave the option open to tweak them individually during post. See image below.











Visualizing instance objs in viewport
Had trouble lighting the instanced objects, at first i was trying to pick them out by displaying scattered points, felt silly and thought why didn't i just copied a bunch of boxes onto the same set of points.

Picked up a trick to make primitives display in their wireframe-form while learning "Gas Resize Fluid", just append "Ends SOP" or "Primitive SOP" > set it to "Unroll" and the image on your left is what you will get!

Another thing came to my mind after this... these boxes are not scaled relative to those instance objects, they all had same uniform scale. Searching the forum threads didn't yield any solutions to it, so here's a thread i started and a very helpful reply came and in addition discovered more things which could be implemented into my file. Thanks to tamte!

Instance Proxy Scale:
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=22222




Up till now, render time per frame is fast (appx: 20 secs per frame). I wanted to optimize the speed more knowing i was rendering at the correct aspect ratio but not true HD720. The main terrain_otl definitely plays a big part to how much time is required and it's resolution settings in the .otl was at a mere 300 by 300 down from the initial values of 800 by 800.

So I went on and made it into an instance using the same technique Mr Ron showed me on the rocks, it was really simple... Saved out the heightmap.otl as .bgeo, created new instance object, dived in, created "Add SOP" (one point), append "Material SOP" and assign the rock_02 shader (same shader used for rocks which had delayed load) and finally file in heightmap.bgeo.
















Fortunately the original heightmap.otl was sitting in the origin (0,0,0), the point created by "Add SOP" doesn't require transformation. Now i have a heightmap_instance at the exact same position as it's heightmap.otl.


















All i need to do now is still have heightmap.otl object's Display Flag switched on so it can still be seen from viewport and tick "Phantom" checkbox so it isn't rendered.


























Rendering cam1_Terrain_Wide_DL...

No comments:

Post a Comment