Planetside Software Forums

General => Terragen Discussion => Topic started by: RichTwo on October 02, 2020, 03:31:08 PM

Title: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: RichTwo on October 02, 2020, 03:31:08 PM
I know I am far from being well-versed in many of the parameters of objects whether it's a .tgo or .obj.  There's got to be a ridiculously obvious answer to this but I've bashed my brains against the wall in my trying to figure it out and came out with nothing.  How does one get a nice shiny surface?

The object in the attached project came from CGTrader (free).  It's really a nice clean file, but all the surface shaders were default white.  There's over thirty of them (!) and they're obscurely labeled.  I can change the colors easily enough, but I cannot seem to get a reflective surface, like a coat of glossy paint.  I set the Fresnel reflectivity at 1 on every shader, but it still came out matte dull.  I left all other settings at default.

Thanks in advance for pointing out something I should already know.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: Matt on October 02, 2020, 03:55:15 PM
This is affected by the Roughness parameter. Once you've set the "Fresnel reflectivity" to 1 (as you have), the Default Shader should respond to the Roughness parameter similarly to PBR shaders you see in other modern renderers, where there is a roughness or glossiness parameter to change the apparent shininess/glossiness of the surface.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: RichTwo on October 02, 2020, 04:35:26 PM
I'll give that a shot. Thanks Matt!
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: RichTwo on October 03, 2020, 12:31:45 PM
Well, I set all thirty-plus default shader nodes' roughness factor to zero. Still using the Full Render, the image came out not only lacking in reflectivity, but had huge voids (solid black areas) not only on the object itself but on the terrain underneath (?!?!?).

So I modified the Quick Render to replicate the Full Render, and there were no voids but also still no reflectivity.  I tried again with the Full and the render came out pure white.

Thinking it could be a one-time only issue, I saved the project and closed the app and restarted anew.  A Final render had no voids and no reflectivity on the object, but a huge one on the terrain.  A Quick is now doing the same thing off and on.  None of any of this shows up in the pre-passes.

I have no other choice but to trash the project and start again from scratch - or simply give up.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: cyphyr on October 03, 2020, 12:52:51 PM
It sounds like there may be an issue with your model.
I looked for it on CGTrader but couldn't find it, could you provide a link and I'll take a look at the model.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: RichTwo on October 03, 2020, 01:47:59 PM
Thanks, Richard! It's near the bottom of the page.  Starting over and still having no luck...

https://www.cgtrader.com/free-3d-models?page=15
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: cyphyr on October 03, 2020, 01:57:00 PM
Hmm still can't find it, I've searched for Aerosprinter, Aero4 and 80743 as well ...
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: WAS on October 03, 2020, 01:57:34 PM
Here is a direct link (I had to search for it under free). I'm taking a look at it now. 

https://www.cgtrader.com/free-3d-models/aircraft/other/veg-03-spaceship
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: cyphyr on October 03, 2020, 02:06:40 PM
Thanks :)
Seems to be missing the mtl file.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: WAS on October 03, 2020, 02:08:57 PM
NP.

May be easier to edit this projects object materials with the defaultness editor: https://nwdastore.com/terragen-tools/defaultness/ (This is not saving "Base Colour" anymore since Matt's update. Not sure why, the XML is still "diffuse_colour".)
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: WAS on October 03, 2020, 02:14:53 PM
Maybe there is an issue with the metalness, or maybe this is the specular roughness?

It doesn't seem very reflective.

Metalness 1, IOR 10
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: WAS on October 03, 2020, 02:18:46 PM
Base Colour 0, Metalness 1, IOR 10

I even tried recalculating and welding it to one material, and even that's black.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: RichTwo on October 03, 2020, 02:27:38 PM
Thanks, guys.  I even tried using a single default shader hooked to all parts nodes except the one for the glass, "plane009" which I attached a glass shader.  I really didn't want to do it that way.  I'd like to have some color variations, especially on the aft engine exhaust fan.

I figure there's gotta be a way to replicate that glossiness like the picture shows.

Oh - and I gave it the name of "Aerosprinter".  Sorry for the confusion!  ;D
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: WAS on October 03, 2020, 02:31:12 PM
I wonder if it's "Objects" and "TGO" and lightwave files, cause I just did a base colour of 0, with metalness 1 for my sphere in another project, which is TG's vanilla sphere, and it is reflective in PT.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: cyphyr on October 03, 2020, 02:33:40 PM
Setting the base colour to White and 0 roughness metalness at 1 gives a chrome reflective effect.
aeroClip.tgc
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: WAS on October 03, 2020, 02:34:44 PM
Strange. It should be 0 for chrome and metal in general.

Did you do anything to the object? What version of TG? With IOR 10 and base colour 0.8 there is like no reflective effect at all besides light colour bounce.

I'm on 4.5 frontier.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: WAS on October 03, 2020, 02:42:20 PM
Hmm. So here is base colour 1. So it seems base colour is acting the opposite of how it used to when "metalness" is 1
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: RichTwo on October 03, 2020, 03:05:56 PM
Quote from: WAS on October 03, 2020, 02:34:44 PMStrange. It should be 0 for chrome and metal in general.

Did you do anything to the object? What version of TG? With IOR 10 and base colour 0.8 there is like no reflective effect at all besides light colour bounce.

I'm on 4.5 frontier.
I'm not sure if you directed that question to that Richard or this one...  ::)  But other and tinkering with the default shaders I did nothing to the object.  I'm on frontier 4.5.43, the latest to date.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: cyphyr on October 03, 2020, 03:35:40 PM
Well I can't seem to get rid of the small black areas. You may want to re-texture them so they are not reflective.
Also I can't get a proper Gloss paint look. it all looks very "metalic" which I guess is reasonable given it's coming off the metalness parameter.

Nothing wrong with the model though.

aero.jpg

aero2.tgc
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: WAS on October 03, 2020, 03:42:17 PM
Probably just slap a reflective shader over the default shaders with desired colours
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: RichTwo on October 03, 2020, 07:28:30 PM
Thanks again guys!  I'll look into that when I haven't had a few brewskies.  ::)
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: sboerner on October 03, 2020, 10:14:33 PM
QuoteSo it seems base colour is acting the opposite of how it used to when "metalness" is 1
That's possible. As I understand it, when metalness > 0 the value of the base color becomes the surface's metallic reflected color (partially at least, and fully when metalness = 1). So the base color map contains both albedo (for dialectrics) and reflected color (for metals), and metalness blends the two based on the setting and (if one is present) a metalness map.


Taking a peek at the model too . . . coming to this late and probably won't have anything to add to Jordan and Cypher's comments though.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: sboerner on October 04, 2020, 12:38:19 AM
Model looks fine. I merged the meshes into four groups to simplify shading. Didn't notice any black areas.

The roughness values I used are small but not zero. Setting roughness to zero seems to disable it altogether - it is the same as setting it to 1. I've never noticed this before, but did some quick tests on a few previous versions (back to 4.4.67) and got the same result. I don't think this is right . . . probably warrants further testing.

Gathered project files are here (https://www.dropbox.com/s/gh0n8r8rtvfwdvz/aero4_gathered.zip?dl=0).
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: RichTwo on October 04, 2020, 12:00:34 PM
I like the way you combined the 30+ shaders into a simpler and easier to work with four!  Nice work (Blender? I haven't gotten much into that...) Thanks, Steve!
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: sboerner on October 04, 2020, 12:17:47 PM
I used Maya but you could easily merge the meshes in Blender. You also could just reassign the individual meshes to fewer materials. I think you can do that in PoseRay.

Nice model. Curious to see what you plan to make with it.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: gao_jian11 on October 04, 2020, 08:10:45 PM
I used max to merge into 4 materials for testing. The speed difference between standard rendering and pt is 10 times, pt quality is the highest, and the noise is still obvious. The porthole is made of glass in the standard renderer, and I can't get the glass texture with pbr.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: Dune on October 05, 2020, 02:17:31 AM
You can do it in Poseray too. I do that all the time. Materials to groups, then in groups combine those that have similar texture. Then in materials choose 'groups to materials'. You loose the links, but you can relink in there or in TG.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: gao_jian11 on October 05, 2020, 08:16:19 AM
Thanks Dune! I will try.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: Matt on October 06, 2020, 02:51:41 PM
Quote from: sboerner on October 04, 2020, 12:38:19 AMThe roughness values I used are small but not zero. Setting roughness to zero seems to disable it altogether - it is the same as setting it to 1. I've never noticed this before, but did some quick tests on a few previous versions (back to 4.4.67) and got the same result. I don't think this is right . . . probably warrants further testing.

I am testing the files you uploaded and I don't see anything wrong with the roughness. Roughness 0 looks very different from roughness 1 on all four parts. What part/shader were you changing in the roughness 0/1 renders your posted?
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: Matt on October 06, 2020, 02:55:01 PM
Quote from: sboerner on October 03, 2020, 10:14:33 PMAs I understand it, when metalness > 0 the value of the base color becomes the surface's metallic reflected color (partially at least, and fully when metalness = 1). So the base color map contains both albedo (for dialectrics) and reflected color (for metals), and metalness blends the two based on the setting and (if one is present) a metalness map.

That's right.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: sboerner on October 07, 2020, 05:57:03 PM
QuoteI am testing the files you uploaded and I don't see anything wrong with the roughness. Roughness 0 looks very different from roughness 1 on all four parts. What part/shader were you changing in the roughness 0/1 renders your posted?
Thanks for following up, Matt. I was changing the roughness on the cowl (nose), and didn't see any change. I think it must have just been the angle, though, because I did a followup test (attached) with the same material applied to all of the meshes, and everything behaved as expected. (Apologies - I actually ran this test a couple of days ago but then got busy and forgot to post it.  :-[ )
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: WAS on October 07, 2020, 06:46:21 PM
Good tests there for comparison of the new metalness and fresnel.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: Matt on October 07, 2020, 08:51:48 PM
Thanks Steve. I guess the base colour was different between the metallic and non-metallic renders? At high enough roughness the metal should start to look a bit like the non-metal if the base colour is the same.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: sboerner on October 08, 2020, 12:28:12 PM
Base color is the same in all frames. The only settings that changed were roughness and metalness; those were animated over the six frames. (The maximum roughness setting is 0.8, right?)

Here is another test done at the same time. This is a single rendering. Different objects but only roughness and metalness changed.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: WAS on October 08, 2020, 12:36:52 PM
Roughness should be able go beyond 0.8. some PBR materials don't look like their examples without it being 1.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: Matt on October 08, 2020, 02:24:39 PM
Quote from: sboerner on October 08, 2020, 12:28:12 PMBase color is the same in all frames. The only settings that changed were roughness and metalness; those were animated over the six frames. (The maximum roughness setting is 0.8, right?)

Here is another test done at the same time. This is a single rendering. Different objects but only roughness and metalness changed.

I wasn't expecting the metal to be that desaturated, but then I remembered that high IOR could cause this. If you're setting an artificially high IOR (the old way to create metals) it should be noted that you don't need to do this with the metalness control and IOR can be set to a realistic value now.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: sboerner on October 09, 2020, 12:53:29 AM
That might be it. The IOR on all of the renderings is 2.5, which is the IOR for steel that I found online. Perhaps since it would be painted or anodized the IOR should be reduced to 1.5 or thereabouts. When I have a chance I'll rerun it at that value and repost.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: sboerner on October 09, 2020, 12:35:56 PM
Same as before, with IOR set to 1.5 across the board. Fresnel reflectivity is 0.75.
Title: Re: Achieving Reflectivity on an Object (.obj or .tgo)?
Post by: Matt on October 12, 2020, 10:28:17 PM
Thanks!