VRED General Discussion

Reply
Active Member
joulsoun
Posts: 8
Registered: ‎07-11-2014
Message 1 of 9 (179 Views)
Accepted Solution

Texture filtering

179 Views, 8 Replies
07-11-2014 01:06 AM

Hi,
Is it possible to switch off texture filtering for ray tracing? I'm using super-detailed normal maps which look great up close, but at a distance the texture filtering makes the materials shiny as opposed to the roughness that the normal map would indicate:

 

Scaled down from 4K                                                       Rendered directly at this resolution

Scaled down from 4KActual resolution

 

The behaviour is the same for non-raytracing, but I guess the fix isn't as obvious there as just switching off texture filtering.

Cheers,
Jens

VRED tries to avoid moire artefacts and excessive noise so the bump maps will always be filtered.

 

On way to control the filtering a bit is by using the

 

setRaytracingStillFrameTextureSharpness

 


This adjusts the area to do the filtering and it will therefore keep the bumps over a further distance.

 

However, assuming that you are using raytracing, I would recommend to use a displacement map instead. The will not get filtered and if the displacement height is not to huge it should still give you a reasonable performance. Just make sure that your basemesh is not too coarse since this will slow down the displacement calculation.

Active Contributor
florian.dyck
Posts: 48
Registered: ‎05-21-2014
Message 2 of 9 (170 Views)

Re: Texture filtering

07-11-2014 04:49 AM in reply to: joulsoun

Hi Jens, did you change the texture's filter value / anisotropy in the material?

Another thing you can try: to uncheck "compress textures" in the Common section of material editor.

material_editor_01.jpg

Active Member
joulsoun
Posts: 8
Registered: ‎07-11-2014
Message 3 of 9 (165 Views)

Re: Texture filtering

07-11-2014 05:56 AM in reply to: florian.dyck

Thanks Florian!

Compress Textures seem to be switched off.

Setting Anisotropy to 0 sure made things better, but it still seems like some kind of texture filtering is going on:

 

4K                                                                                    320x240

4K2_rt_scaled.png320_5_rt.png

 

4K                                           160 x 120

4K2_rt_scaled_160.png160_1_rt.png

 

So the problem remains, but the scale at which it occurs is pushed further. There's no magic preference setting to completely switch off texture filtering? Rendering at insane resolution and downscaling only solves the problem to a certain scale unfortunately, so I don't consider it the perfect workaround.

 

Thanks for the quick feedback,
Jens

 

Active Contributor
florian.dyck
Posts: 48
Registered: ‎05-21-2014
Message 4 of 9 (161 Views)

Re: Texture filtering

07-11-2014 06:47 AM in reply to: joulsoun

I don't know of a magic switch to turn filtering off :-( I just looked in render settings and options and tried to find similar settings as I would expect in Maya, but there aren't.

 

file:///C:/Program%20Files/Autodesk/VREDPro-7.01/doc/vrRenderSettings-module.html#setRaytracingStillFrameTextureSharpness

there is a Python command for vrRenderSettings, I haven't tried if it sets the same settings as the anisotropy value.

 

setRaytracingStillFrameTextureSharpness(sharpness)

Sets the sharpness factor for texture sampling (advanced feature). WARNING: Changing this settings may lead to rendering artifacts!

Parameters: sharpness - The sharpness factor.
           (type=float)

 

Maybe try other pixel filters for rendering (Mitchell Netravali 2.2 etc.)

Or try saving your texture in DDS format including mipmaps.

 

Also I am just a standard VRED user and I guess the development team from Autodesk knows some better answers.

Employee
michael.nikelsky
Posts: 45
Registered: ‎05-05-2014
Message 5 of 9 (156 Views)

Re: Texture filtering

07-11-2014 07:43 AM in reply to: florian.dyck

VRED tries to avoid moire artefacts and excessive noise so the bump maps will always be filtered.

 

On way to control the filtering a bit is by using the

 

setRaytracingStillFrameTextureSharpness

 


This adjusts the area to do the filtering and it will therefore keep the bumps over a further distance.

 

However, assuming that you are using raytracing, I would recommend to use a displacement map instead. The will not get filtered and if the displacement height is not to huge it should still give you a reasonable performance. Just make sure that your basemesh is not too coarse since this will slow down the displacement calculation.

Active Member
joulsoun
Posts: 8
Registered: ‎07-11-2014
Message 6 of 9 (148 Views)

Re: Texture filtering

07-11-2014 08:40 AM in reply to: michael.nikelsky

Thanks Florian and Michael,

I don't have a problem in battling aliasing and noise with brute force sampling, I do have a problem when my nice rough surface becomes shiny, I can't fix that with higher sampling :-(

 

The setRaytracingStillFrameTextureSharpness looks interesting, and the tip about displacement too! Let's just hope my RAM can take it... But that would get me bump self-shadowing as well which is cool.

 

I'm off on vacation, so I won't be able to try this for a few weeks, but thanks a lot for the quick awesome help!

Jens

Employee
michael.nikelsky
Posts: 45
Registered: ‎05-05-2014
Message 7 of 9 (146 Views)

Re: Texture filtering

07-11-2014 09:15 AM in reply to: joulsoun

Displacement mapping in VRED doesn´t require much RAM. Basicly the accelleration structure gets a littlebit deeper and your texture will be RGB with mipmaps, that´s pretty much it. We don´t create any triangles so you can pretty much put it on everything and won´t get into any trouble memory wise. Only thing to keep in mind is, since we don´t create triangles, the base mesh shouldn´t be too coarse, otherwise the rendering will take much longer. But if you have car with a good tessellation you should be able to just apply a displacement map to everything and be fine.

Active Member
joulsoun
Posts: 8
Registered: ‎07-11-2014
Message 8 of 9 (88 Views)

Re: Texture filtering

08-10-2014 11:33 PM in reply to: michael.nikelsky

setRaytracingStillFrameTextureSharpness together with setRaytracingInteractiveTextureSharpness did wonders for me, thanks!

 

Displacement mapping also seems to work great, although I'm a bit surprised that it does, as you seemed to mention that the lookup is mipmapped, which is texture filtering in my book. I'll have to experiment more with it though, it looked awesome.

Employee
michael.nikelsky
Posts: 45
Registered: ‎05-05-2014
Message 9 of 9 (81 Views)

Re: Texture filtering

08-10-2014 11:51 PM in reply to: joulsoun

Hi,

 

good to hear :smileyhappy:

 

Displacement mapping only uses bilinear filtering, not mipmapping. The mipmap levels are for some internal precalculations we need to do to accellerate the displacement mapping.

 

Kind regards

Michael

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.