WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   realistic refelection like unity 3ngine (

raj 04-07-2017 12:54 AM

realistic refelection like unity 3ngine
1 Attachment(s)

is there any possibility to achieve realistic real-time reflection on floor and wall just like unity 3d and unreal engine.

Thanx in advance

Veleno 04-07-2017 02:15 PM

Hey Raj,

Right now your best bet would be to render a cube map from Inspector then assign it within Max using a reflect/refract map. This is how we do most of the reflections in our internal projects.

At the time of this post, there isn't currently an artist-friendly workflow for parallax correcting cube maps (the technique seen in your screenshot), but it is possible for a skilled tech artist to write them manually in shader code.

This means that the scene will appear to have a reflection that will also be affected by normal maps, and that has very low overhead because it's a static map instead of live 3D, but it won't line up with the assets in the scene the way you'd expect it to in real life.

Here's the current workflow for doing cube map reflections (that doesn't require programmer assistance):
  • Starting with a baked and textured scene without reflections (ideally, the baked materials should still be in the Shell material setup).
  • Export to OSGB and open the scene in Inspector.
  • Move the viewpoint or a node (an empty transform for example) to the place you want to render a cube map from. A typical option is the center of a space and somewhere around the user's eye level.
  • Go to File -> Save Cubemap. Then in the sub-menu, set it to 256, 3DS Max, and either camera (from the current viewpoint) or selection center (from the position of the currently selected object).
  • Back in Max, add reflect/refract maps to the reflection slot of any materials that will need the reflection. If you are using Shell materials from the bake, and the original materials are Standard materials, it will likely be quicker to clear the shells first, add the cube maps, then rebuild the shells.
  • Keep in mind that the VizFX shader has reflectivity tied to specularity, so specular should be white/100% to show the cube map all the way. You can also use various blend modes with a blend material to change how the reflection interacts with the diffuse texture.

When I'm going to be dealing with a lot of reflections on objects, multiple reflection locations, or variations for plastic, blurring, etc. I'll stick placeholder textures so I can replace them in the Asset Tracking dialog instead of clearing and recreating shell materials.

Cube maps can also be created and assigned in realtime, but I'd need a programmer to weigh in on that one.

raj 04-11-2017 02:58 AM

1 Attachment(s)
hi Veleno

still no luck with cube map

I have tried various effects for achieving effect

still, reflection is not good

please check attached image

Veleno 04-12-2017 01:36 PM

Cube maps work best on surfaces that are curvy or have distorted normals. Their main weakness, like what you're seeing here, is smooth flat surfaces. The parallax technique seen in your original example does improve things quite a bit under certain conditions, but we don't have an artist-friendly workflow for that right now. Even in the unity example they make sure to rough up the surface to mask the shortcomings of the technique.

For mirror-like reflections, the most performance friendly approach is often to use the old-school method of making a mirrored duplicate of your scene on the others side of a transparent texture. Some games and movies still use this technique today because it's so low-tech.

It's also possible to do a camera-rendered one through code, I'd need a programer to talk about this approach as well.

Vaquero 05-08-2017 11:33 AM

Hey raj!
A more realistic lighting model like you'd get with Unity or Unreal Engine 4, which both do this by utilizing physically based rendering, is not implemented in Vizard. But there's the possibility to write your own shader code. The support gave me this answer a while back:
»If you're using the effects framework you need to use the GLSL version released with OpenGL 2.0. If you write your shader from scratch then you can declare the GLSL version you want to use.«
So you see, it's a really old OpenGL implementation that Vizard uses and the shader code is outdated, which makes it hard to find helpful code reference on the internet.
I tried implementing some PBR shading, but didn't had the time to finish the project.

All times are GMT -7. The time now is 08:46 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC