Material question

I recently converted a glass .mat into a .vismat. The original .mat uses a normal map, which Vray 4 SU cannot use. So I made an ‘ordinary’ bump map out of it.

Anyway. When I import the .vismat into the standalone material studio, all goes fine. The preview shows me a nice, bubbly glass. However, I cannot seem to render the material like it should out of SU.

My workflow is this: I import the bump map (there’s no diffuse map, and I need uv coordinates, right?), and paint it on a surface. I then go through the motions: adjusting size etc. You know the deal.

Then I import the .vismat. In the SU window, the bump map is now no longer visible: the plane on which I put it, becomes a ‘plain’ SU glass mat.

When I render, the glass has no bump - though there is a bump map in the right slot. If anyone could tell me where I’m *arsing up, I’d be grateful.

Re: Material question

Is the object with the glass material scaled?
I found that things becomes really odd in terms of bumps and displacement if the group or component containing the material is scaled.

Re: Material question

Oh wait. Did you map the bump texture in SU, and then afterwards imported the vizmat? What version are you using? The original or SR1?
If you’re using the SR1, then when you import the vizmat it will replace the diffuse which then removed the mapping you’ve done.

What V-RAy version are you using?

Re: Material question

Yes, I mapped the bump map in SU, and then imported the vismat. And I’m using SR1.

Re: Material question

When you import the new vizmat and either apply or replace your original bumpmap material it will reset all the mappings you did.

What you have to do is keep the bumpmap in the diffuse channel. Then set the opacity of that diffuse channel to fully transparent so you don’t see it.
Since you are making a glass I think you don’t need a diffuse visible since it’s all just reflection and refraction that’s visible with glass materials.

If you need a non-glass material where you need a bump but don’t have a texture in the diffuse you add an extra diffuse channel which will be visible under the original diffuse.

Did that make any sense at all?

Re: Material question

lol. Not right now - it’s fairly late in my part of the world. But I’m sure it’ll make interesting reading in the morning!

Much obliged!

Re: Material question

i got it. another clever approach.

Re: Material question

hehe

I’ll give it another twist:

You have a material with no texture in the diffuse, that means you have no UV mapping. And that’s a problem because you need to apply a bumpmap.

What you started out with was correct, texturing the mesh with the bumpmap texture. However, when you then imported the new material and applied it you removed the UV mapping since the new material doesn’t have a texture in the diffuse. SU will not remember your UV mapping. In fact, even if you had a texture in your new diffuse, SU would reset, or at least mess up, all the mapping you’ve done.

So, in order to create a material with no texture in the diffuse, but still use textures in your other channels you need to do this:
There is no way around it, you need a texture in your diffuse. You can use your bump map. However, you don’t want to see this, so you set the opacity to fully transparent. Then you add a new diffuse layer. The second diffuse layer is the one that will render as the first is fully transparent. The purpose of the original diffuse is solely there to provide UV mapping.

There is a problem with this though. Since that original diffuse channel is linked to SketchUp it will appear invisible in the SU window. One way around it is to turn of Transparency in your SU style. Something that might not be desired.

Another method would be to not use your bump, but to create a new texture with the same proportions as your bump and fill it with your desired diffuse colour. But that leads to another problem where you won’t be able to see that’s up,down, left or right of your texture when you map.

…no sure if that made any more sense… …ghh.. writing has never been my thing…

Re: Material question

Works! Thanks, ThomThom.

Re: Material question

Hurray! It made sense! :smile:

Nice material. Expect we’ll see a full scene some time soon in the gallery?

Re: Material question

Hope so. Been working on it for some time now - if I’m lucky, I’ll finish it this decade. ;D

While we’re at it: what’s the deal with z-maps?

Re: Material question

Z-Maps? You mean displacements maps..? ???

Re: Material question

Nope. I mean z-maps. You know, the black and white thingies you combine your render with in Photoshop to simulate dof. I’m rrrrrrrreally in the dark about how to get those out of Vray.

Re: Material question

Ah yea. I tried that once. There was a bit of messing about as you had to work out the distances for the start and end of the depth field. And then you had to find out what units the V-Ray config took, because it wasn’t scene units.

I can’t remember the specifics right now, but I’ll see if I can dig up something later. I know that you’ll benefit from a ruby script in SU that tells you the distance from the camera to the object in front of the camera.

Re: Material question

I know. Maxwell Studio may come in handy for measuring beginning and end of the ‘depth field’. It’s the units where I probably go wrong.

Re: Material question

I was troubling with the units for a long time. I work with metric, but it turned out to be some imperial unit, feet or inch. ::slight_smile: *nngh*

Re: Material question

Stinkie,

I’m not sure exactly how this would work with Linked Materials, but I got the correct bump UV mapping for this image by using a solid black bitmap (just 100 px x 100px) in SU’s material editor, 10% transparency, changed the scale using SU’s context menu texture position editor so that the texture mapped from corner to corner of the box and then loaded the ripples bump map in VfSU’s material editor without needing to add a second diffuse texture. I imagined that you needed a specifically positioned bump map (like the concentric circles), but judging by your rippled glass image couldn’t you avoid the whole UV problem by loading the bump map and just changing it’s global scale using VfSU’s “repeat” parameters? If it’s not important where the bump map actually starts it should work fine.

As Thom says, VfSU’s Depth Map setup is pretty much down to trial and error, but here’s a quick guide which I did for myself one day as I wanted something I could refer to when adjusting the settings for future models. Hope it helps!

Jackson

Re: Material question

p.s. How the heck is Thom a “Newbie” with almost 400 posts here?!!!

Re: Material question

Thanks, Jackson. Those look pretty much like the settings I use, though.

As far as I know, the “newbie” status is only relieved after one has gone on a pilgrimage to the remote Vray monastary in the Hungarian hills. Doing the dishes speeds the process up considerably.

Of course, this is only hear-say.

Re: Material question

I heard you have to sell your soul to the V-Ray pixie…