Author Topic: Object and terrain interactions  (Read 814 times)

Offline digitalguru

  • Member
  • *
  • Posts: 463
Re: Object and terrain interactions
« Reply #15 on: February 19, 2019, 02:40:44 PM »
Quote
I don't think you can delete UV's in Poseray.

You can do it in Meshlab (free program) by loading the object and re-saving it with texcoord option turned off.

Quote
Have to try that, as I can imagine people won't like to get their objects stripped of UV's

If it's something like a rock, which would be much better procedurally shaded in Terragen it's no hassle to make a copy with the UV's deleted, though as that's something that might happen often it would be good too have a button to ignore UVs in the obj loader? - though being Terragen there might be another way around it  :)


Offline sboerner

  • Member
  • *
  • Posts: 476
    • Steve Boerner Typography & Design
Re: Object and terrain interactions
« Reply #16 on: February 19, 2019, 03:04:14 PM »
Quote
If it's something like a rock, which would be much better procedurally shaded in Terragen it's no hassle to make a copy with the UV's deleted, though as that's something that might happen often it would be good too have a button to ignore UVs in the obj loader? - though being Terragen there might be another way around it

A option to select global coordinates for shading/displacements would be handy. But that doesn't address why the shells are breaking apart in the first place.

Interesting thread.

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 13215
  • Holy snagging ducks!
Re: Object and terrain interactions
« Reply #17 on: February 19, 2019, 08:37:51 PM »
I'm pretty sure if you just bypass the Parts Shader you're working without UVs. This of course shades the entire object. You can't shade part of an object without UVs as far as I know.

- Oshyan

Offline Dune

  • Member
  • *
  • Posts: 15217
    • www.ulco-art.nl
Re: Object and terrain interactions
« Reply #18 on: February 20, 2019, 06:54:49 AM »
Strangely, I don't get the torn edges when rendering with UV, and with parts shader and default shader from your basic setup, but through transform shader. Though it's an older version of TG (3.7).
And they're not hidden behind that (bucket error) block  ;)
« Last Edit: February 20, 2019, 07:00:48 AM by Dune »

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3586
  • I'm the crazy one
Re: Object and terrain interactions
« Reply #19 on: February 20, 2019, 07:08:16 AM »
I did try a render with the teapot with UVs and the transform shader, but I get displacement cracks where the UV shells are:

The UVs (or lack of) would not cause this. It's an issue with the normals.
Just because milk is white doesn't mean that clouds are made of milk.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3586
  • I'm the crazy one
Re: Object and terrain interactions
« Reply #20 on: February 20, 2019, 07:10:58 AM »
I'm pretty sure if you just bypass the Parts Shader you're working without UVs. This of course shades the entire object. You can't shade part of an object without UVs as far as I know.

The Parts Shader's purpose for is for selective assignment of different materials to different parts of the object. That is a completely different thing from UVs, although UVs are often used to map different parts of an object into the same material. Bypassing the Parts Shader doesn't bypass UVs.
« Last Edit: February 20, 2019, 07:13:35 AM by Matt »
Just because milk is white doesn't mean that clouds are made of milk.

Offline sboerner

  • Member
  • *
  • Posts: 476
    • Steve Boerner Typography & Design
Re: Object and terrain interactions
« Reply #21 on: February 20, 2019, 04:22:11 PM »
Quote
Strangely, I don't get the torn edges when rendering with UV, and with parts shader and default shader from your basic setup, but through transform shader. Though it's an older version of TG (3.7).

Same result here with Terragen 4. Just downloaded and mapped the teapot and rendered with the displacement going through a transform shader. Digitalguru, would you mind sharing the model that was breaking apart? I'm curious to take a peek at those normals.


Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 13215
  • Holy snagging ducks!
Re: Object and terrain interactions
« Reply #22 on: February 20, 2019, 10:31:17 PM »
I'm pretty sure if you just bypass the Parts Shader you're working without UVs. This of course shades the entire object. You can't shade part of an object without UVs as far as I know.

The Parts Shader's purpose for is for selective assignment of different materials to different parts of the object. That is a completely different thing from UVs, although UVs are often used to map different parts of an object into the same material. Bypassing the Parts Shader doesn't bypass UVs.

How are the Parts Shaders determined/derived in the first place then?

- Oshyan

Offline digitalguru

  • Member
  • *
  • Posts: 463
Re: Object and terrain interactions
« Reply #23 on: February 20, 2019, 11:37:58 PM »
Aha! I see what I did - I had the Transform shader after the default shader not going into function slots of the shader - works with UVs and no UVs now.
« Last Edit: February 20, 2019, 11:50:17 PM by digitalguru »

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3586
  • I'm the crazy one
Re: Object and terrain interactions
« Reply #24 on: February 21, 2019, 03:32:25 AM »
How are the Parts Shaders determined/derived in the first place then?

There are various ways that object materials or groups can be defined in an OBJ file. If the OBJ has lines beginning with "usemtl" or "usemap", Terragen interprets those as material assignments and creates a "part" for each one. For example "usemtl leaf", "usemtl trunk" and so on. Also, OBJs sometimes contain "groups", and Terragen looks at those if it doesn't find any material-related commands that it knows about.

UVs are a completely different concept. They are the X,Y texture coordinates for each vertex. Every vertex should have a UV value attached if you want to do texture mapping.

UVs can be used to texture map an OBJ even if there was no material description. And materials/groups can be used to set up different shaders even if there are no UVs, as long as you don't need any texture maps.

Of course, most OBJs have both of these sets of data.
« Last Edit: February 21, 2019, 03:34:48 AM by Matt »
Just because milk is white doesn't mean that clouds are made of milk.

Offline sboerner

  • Member
  • *
  • Posts: 476
    • Steve Boerner Typography & Design
Re: Object and terrain interactions
« Reply #25 on: February 21, 2019, 02:05:00 PM »
Quote
Aha! I see what I did - I had the Transform shader after the default shader not going into function slots of the shader - works with UVs and no UVs now.

Glad it's working!

 

anything