Object usage questions/observations

Started by tempaccount, January 11, 2010, 04:18:20 AM

Previous topic - Next topic

tempaccount

Over the weekend I've been trying to figure out just how far I can go with an imported object, and here are some observations with questions attached - if anyone can answer these or throw their own observations in the mix it would be greatly appreciated! I'm pretty much a newb when it comes to object usage in TG2, I can pretty much just import my mesh from my application of choice and load it up in TG2.

I'm using 2.1 with Ray Trace Objects on. The mesh I'm using is very complex, around 2m triangles.

1. Reflections: If I have a very complex object mesh that has a water shader as a surface shader, it seems like the reflections and such are calculated per triangle. The quality of the reflections are very low and the mesh triangles become quite visible. Is there anything I can do to improve this or should I just forget using a water shader in an object? Using a reflective shader seems to work well, though. Thinking over this, it might be the transparency in the water shader causing this - I'll have to try a render with transparency turned off.

2. Transparency: I pretty much got simple transparency working using a simple water shader (using a trick detailed in this thread), but I haven't really been able to improve it further. The object gets a very distinct outline, possibly due to overlapping triangles increasing the opacity around the borders.

3. Luminosity: I encountered the same sort of problem as in 1. I tried making a "sparkle" into my object using a surface shader with a luminosity function coupled into a power fractal (I got the idea from dandel0's snow thread here). What I got was that a few of the triangles of the mesh were lit by the luminosity, but all detail was lost. Is this the same issue?

4. Bump: This works perfect, either through default shader or an image map shader. Ray Trace Objects needs to be on.

5. Texturing inside TG: Just as something simple, I tried using a simple powerfractal with color turned on as a surface shader for an object. What I got was an uniformly colored object - is this intended?

I'll try to provide images later on from the first problems. Thanks for looking!

Oshyan

1: If you're getting better results with a reflective shader than a water shader, it may well be the transparency. But you should be aware that the reflection calculations are currently limited in their detail for performance reasons, so that may be what you're seeing. Posting a rendered example would help to know for sure.

2: Transparency is optimized for use in water specifically, so it has some limitations as a result of that. General transparency improvements should be made in the future.

3: It would help to see a rendered example of this. It may be a "normals" issue. Is Smooth By Normals on in your object? Was this done as a separate test, or in combination with the reflectivity above?

5: Does your object have any UV maps? If so this may be causing a problem due to scale issues. To texture procedurally, it's easier to either have no UVs, or you need to adjust scales to work within the UV mapped area.

As noted (and coming soon, you mentioned), some image examples would be helpful in further diagnosing the problems.

- Oshyan

- Oshyan

tempaccount

Here's an example image of the aforementioned issue. The model has a water shader for transparency (it has reflectivity of 0), and a reflective shader with specular highlights turned on, but no ray-traced reflections.

Oshyan

It does appear that this may be a smoothing issue rather than an issue with the detail of reflection or transparency. Does the object render smoothly with the water shader turned off?

- Oshyan

tempaccount

It does. I suppose I should've rendered it without the transparency as well. The object has UV maps and has a normal map attached into it as displacement.

I wonder if it affects my other issues as well, if that's the case.

Oshyan

Does this happen with Raytrace Objects turned off?

- Oshyan

tempaccount

#6
I think I've tried it and it does happen. I'm not 100% sure though. Could be I just tried Raytrace Objects off with the powerfractal texturing.

I can run a few more tests tonight.

Do you have a hunch which might be causing this? Either way I'm rather settled I should've made something simple for my first object test :p

Edit: One more thing: The water shader has decay distance of 1e+99 to accommodate for full transparency. If I drop the decay distance to a small number, the object renders fine, but of course there is no transparency.

Oshyan

I don't have a strong hunch, but your info about the transparency is interesting. Try this: render the same scene, do a crop of a small area of the model, and turn up Detail to 3 or 4.

- Oshyan

tempaccount

Ok, I'll try that tonight!

I have updated the model a little, but if I have the time I'll post renders of the aforementioned cases as well so it'll be easier to compare.

Matt

Quote from: tempaccount on January 11, 2010, 04:18:20 AM
5. Texturing inside TG: Just as something simple, I tried using a simple powerfractal with color turned on as a surface shader for an object. What I got was an uniformly colored object - is this intended?

There is a bug in 2.1.18.1 which requires objects to have UVs if they are ray traced. If you render without ray tracing, your objects do not need UVs.
Just because milk is white doesn't mean that clouds are made of milk.

tempaccount

#10
Here's a few test renders. Render 1 is without transparency or reflectivity - the base of the model. Render 2 is with the aforementioned shaders - a water shader for transparency and a reflective shader with specular highlights turned on. Render 3 is with the default shader disconnected from the water shader input.

In other cases, the default shader has a displacement image (the exported normal map image for the mesh).

In closer inspection, the divider visible in render 1 (the darker and lighter parts) seems to go straight where the UV seam in the object goes. This seam seems to become visible even if I disconnect the parts shader and just plug a constant colour as the object's surface shader..

Edit: Tried a render with quality of 3, doing a crop around the tower. Issue still persists.

Matt

#11
The "seam" looks like it might geometry self-shadowing, noticeable because of the low resolution of the mesh. I don't think it's a UV problem.

By the way, normal maps aren't the same as bump maps or displacement maps. TG will take the luminance of your map and turn it into displacement or bump, but this isn't what the normal map was intended for. The green channel has a greater weighting than red or blue when calculating luminance, so you will get some bump from this information, but it won't give you the normals that the normal map is supposed to.

I'm afraid I don't know exactly where the faceting is come from in the transparency or reflections. The Water Shader is only tested to work for the built-in displaceable objects, and even with those it can have issues with multiple entry and exit points for the rays.
Just because milk is white doesn't mean that clouds are made of milk.

Matt

Can you try export this geometry at high resolution without using a normal map?
Just because milk is white doesn't mean that clouds are made of milk.

tempaccount

Quote from: Matt on January 13, 2010, 05:38:47 PMCan you try export this geometry at high resolution without using a normal map?

Sure, I'll try that later tonight. Thinking about it, this might actually be the preferred step as opposed to exporting a low-poly model, if I'm rendering static scenes and objects especially with GI. You are right about the seam. You know, I actually thought I was exporting a high-poly mesh but this mesh has around 170k polys. Guess I'll put that one down to inexperience..

jaf

Quote from: Matt on January 13, 2010, 12:02:38 PM
There is a bug in 2.1.18.1 which requires objects to have UVs if they are ray traced. If you render without ray tracing, your objects do not need UVs.

I missed that one.  Is there a thread or reference that has more detail is it it for beta/alpha testers only?
(04Dec20) Ryzen 1800x, 970 EVO 1TB M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 457.51 (04Dec20), Win 10 Pro x64, Terragen Pro 4.5.43 Frontier, BenchMark 0:10:02