Author Topic: Terrain geometry export (and nothing more than that!)  (Read 206 times)

Offline N-drju

  • Member
  • *
  • Posts: 755
  • Changes, changes, changes...
Terrain geometry export (and nothing more than that!)
« on: March 14, 2017, 08:08:26 AM »
I'm not sure if this question belongs here, or rather in DS forums... well, nevermind...

I would like to render some objects for my picture in DAZ Studio, due to high quality renderer they have. However, the rest of the image, including terrain will be rendered in TG.

Now, I need my DAZ Studio object to cast shadows that follow the TG terrain geometry... Otherwise, when compositing the image, I will end up with shadows on a default flat surface - not accurate.

The question then is - how can I export the terrain geometry and use it for shadow projection in DS?

The problem encountered - I used micro exporter. In DAZ Studio, however, I ended up with a grey terrain husk. It cannot be made invisible. I thought that I can make the surface color invisible somehow and just have an invisible geometry distorting my shadow. This is not as easy apparently...
"I don't know what 'pokygon' is but I like it."

Offline René

  • Member
  • *
  • Posts: 153
Re: Terrain geometry export (and nothing more than that!)
« Reply #1 on: March 14, 2017, 09:52:24 AM »
Wouldn't it be easier to do it the other way around and render the terrain in TG using the shadow catcher shader for the object shadow and composite the DAZ render into that?
I'm just guessing; never tried the shadow catcher shader. :)

Offline cyphyr

  • Member
  • *
  • Posts: 3466
    • richardfraser
Re: Terrain geometry export (and nothing more than that!)
« Reply #2 on: March 14, 2017, 10:20:42 AM »
I would import your posed daz model (as .obj) and camera (as .fbx) into Terragen.
In terragen you can then in the obj's Rendering tab simply set the Render to invisable. It will still cast a shadow.
You will need to match your lighting angles which I think will have to be done manually.
www.richardfraser.co.uk
/|\

i7 5930 @3.5Ghz, 32Gb
i7 2600k @3.4Ghz, 16Gb
i7 980 @3.33Ghz, 16Gb

Offline N-drju

  • Member
  • *
  • Posts: 755
  • Changes, changes, changes...
Re: Terrain geometry export (and nothing more than that!)
« Reply #3 on: March 14, 2017, 11:09:27 AM »
Eh, shadow catcher shader? :o I guess this is a TG4 feature?

@ cyphyr - I don't know if it will play out as nicely as it sounds. I know that an invisible object can still cast shadows. Until now I composited images from DS onto TG that way, exporting a blank, untextured object just for the purpose of shadow casting. Unfortunatelly, the DS parts never acuratelly matched TG generated shadows. I don't know, there might be some funny distortion during export, because even the most meticulously adjusted DS renders simply don't get along with their shadows in TG... Not much fortunately - it is manageable. But still...

But! Fortunately I found an adequate solution on youtube. :) It turns out, DS has a special script that enables the so called "Matte function" that allows to set basically any object to act as a "shadow receiver". It also works on terrain slices from TG that are exported through the "micro exporter":

https://www.youtube.com/watch?v=6vaUXdZzy0c

A simple test turned out nicely. :) I will post the result in the evening.
"I don't know what 'pokygon' is but I like it."

Offline N-drju

  • Member
  • *
  • Posts: 755
  • Changes, changes, changes...
Re: Terrain geometry export (and nothing more than that!)
« Reply #4 on: March 14, 2017, 07:28:16 PM »
Here's a simple test. :) This is a rather dirty image and while the camera is decently aligned it is not a perfect fit. But it's fine enough just for a preview.

The terrain is made in Terrgen. The shadow and the asphalt cube have been generated in DAZ Studio! :D

72335-0
"I don't know what 'pokygon' is but I like it."