12-12-2007, 04:51 PM
|
#1
|
|
Zbrush 4 is a myth
Join Date: Apr 2007
Location: Right Here
Posts: 6,866
|
Surface Baker Camera UV Question
Hello.
I've been messing around with the surface baker camera quite a bit, but I had a few questions, if anyone can answer.
First, I've been able to use it to get reasonably good results for objects where it comes to using it for just baking textures or baking everything including lighting. But, it's been somewhat hit and miss.
In the SB Camera Properties panel, you select your mesh and UV map for that mesh. No problems there. But the next two options, "Offset from surface" and "UV Border" seem a bit cryptic and I have to say I'm really not sure what numbers I should be putting in those fields.
With Offset from surface, it's fairly obvious what's going on, since you can see the camera field changing as you change the number. it seems that just a slight offset is good.
With UV Border, it's not so clear to me what's going on. What border? Why should there even be a border? Left at zero, there's a definite black line on every UV seam. I want to assume this is simply the texture not quite wrapping all the way, and the seam showing that. Increasing the value and watching it in FPrime clearly shows the texture expanding evenly beyond the actual UV coordinates. This would be similar to painting beyond the edges in a 2D paint program, it seems.
This is all well and good, and messing around with the values always gives me something I can be happy with eventually, but I'd like to know what these numbers are actually based on to get as much accuracy as possible without any seam on the mesh
The UV Border field by default is set at 0.0. is this to represent a percentage of the UV map size, or a number based on the measurement unit being used? I'm thinking it must be a percentage, but not sure.
I'm also not entirely sure what "Offset from surface" means? Again, why would I offset from surface? The camera seems to be showing a change in focal length.
Like I said though, I can get decent results, though I'd prefer to know more exactly what I'm doing when I'm changing those values, and what it's actually asking of me.
Thanks, if anyone can shed some light on this.
EDIT:
I'm going to be uploading some examples, if anyone's interested. Hopefully I'm not the only one who sees the SB camera as a bit of a mystery, and possibly this thread could serve as some sort of resource for those who also don't quite understand it.
The "old" surface baker shader is obviously inferior to the SB camera, for several reasons, but it was considerably more intuitive.
__________________
Strangely enough, my opinions on 3D stuff do actually represent those of my employer, and possibly the US government too. But I really don't care what they think about it anyway.
Last edited by IMI; 12-12-2007 at 04:54 PM.
|
|
IMI is offline
|
|
12-12-2007, 05:07 PM
|
#2
|
|
Banned
Join Date: Dec 2007
Location: b
Posts: 185
|
The offset from surface is more useful if you are baking a high res mesh from a low res mesh. It is the distance off the surface that rays will rendered from... the uv border is the amount of pixels that the borders get stretched past the uv seems... so that when you apply the texture the seems are not noticeable...
|
|
oldtekerr is offline
|
|
12-12-2007, 05:43 PM
|
#3
|
|
Zbrush 4 is a myth
Join Date: Apr 2007
Location: Right Here
Posts: 6,866
|
OK, cool.
I guess I was at least right about the UV border. Seemed kind of obvious, but I needed to know if I wasn't missing out on something important.
Thanks.
__________________
Strangely enough, my opinions on 3D stuff do actually represent those of my employer, and possibly the US government too. But I really don't care what they think about it anyway.
|
|
IMI is offline
|
|
12-12-2007, 06:30 PM
|
#4
|
|
Zbrush 4 is a myth
Join Date: Apr 2007
Location: Right Here
Posts: 6,866
|
Interesting then, and very cool. In the uploaded picture, the pot on the right is textured with a simple turbulence procedural.
The pot on the left is that procedural texture made into an Image map with the SB camera and applied to it as an image map, with no procedural.
I had to set the ambient value in the lighting panel to 100% in order to get an all-around even texture rendered out, or else it wanted to add the shadows, even though I had shadows turned off. Is that normal, or is there a better way?
The teapot is the basic LW teapot, but with UV's I made for it.
__________________
Strangely enough, my opinions on 3D stuff do actually represent those of my employer, and possibly the US government too. But I really don't care what they think about it anyway.
|
|
IMI is offline
|
|
12-12-2007, 06:43 PM
|
#5
|
|
Banned
Join Date: Dec 2007
Location: b
Posts: 185
|
good deal...
|
|
oldtekerr is offline
|
|
12-12-2007, 10:17 PM
|
#6
|
|
Registered User
Join Date: Jul 2007
Location: Texas
Posts: 227
|
Cool stuff, I learned a lot right there. I have another question. As I'm fairly new to Lightwave I mainly use Perspective Camera. I know that the classic camera renders AA and that sort of stuff differently, so what exactly does the baker camera do that gives it an advantage over others? Could you show us a side - by - side example and then explain please?
Thanks!
|
|
StevieB is offline
|
|
12-12-2007, 11:21 PM
|
#7
|
|
Banned
Join Date: Dec 2007
Location: b
Posts: 185
|
There are many very good uses for the bake camera... baking GI is one, baking normal maps is another, bake all of your textures down to one layer is another... This video shows one good use. link
|
|
oldtekerr is offline
|
|
12-12-2007, 11:34 PM
|
#8
|
|
Banned
Join Date: Dec 2007
Location: b
Posts: 185
|
Quote:
|
even though I had shadows turned off. Is that normal, or is there a better way?
|
That is because you used the final render as your texture instead of the raw RGB. Render buffer veiw will help you...
|
|
oldtekerr is offline
|
|
12-13-2007, 04:24 AM
|
#9
|
|
Zbrush 4 is a myth
Join Date: Apr 2007
Location: Right Here
Posts: 6,866
|
Quote:
|
Originally Posted by oldtekerr
That is because you used the final render as your texture instead of the raw RGB. Render buffer veiw will help you...
|
I hadn't thought of that. thanks.
__________________
Strangely enough, my opinions on 3D stuff do actually represent those of my employer, and possibly the US government too. But I really don't care what they think about it anyway.
|
|
IMI is offline
|
|
12-13-2007, 04:21 AM
|
#10
|
|
Zbrush 4 is a myth
Join Date: Apr 2007
Location: Right Here
Posts: 6,866
|
Quote:
|
Originally Posted by StevieB
Cool stuff, I learned a lot right there. I have another question. As I'm fairly new to Lightwave I mainly use Perspective Camera. I know that the classic camera renders AA and that sort of stuff differently, so what exactly does the baker camera do that gives it an advantage over others? Could you show us a side - by - side example and then explain please?
Thanks!
|
The SB camera isn't so much designed for rendering a final image as it is for rendering surface attributes and "baking" those attributes into an image map, to be applied to objects later for various reasons.
Say you have a room and are planning on animating a first person view of a camera going through it. You have alot of radiosity going on in the scene, and alot of objects and lights with soft shadows. If you render that out like that, with the radiosity and the shadows, each frame is going to take a good while.
But, if you have a UV map for that room - the walls and floor, you can use the SB camera to render it out once and the radiosity lighting and the shadows will be baked into it. You can then turn all that off and simply apply your image map with all that baked into it, to the floor and walls and then when you animate it, since LW won't be calculating all that radiosity, and just an image map, each frame will render significantly faster. One of many uses. of course, that's only good as long as in your animation the lighting and objects aren't moving - since it's all baked in, the lighting and shadows will stay put and if anything is moved other than the camera, everything will be off kilter and look wrong.
And like I did above, the procedural texture on the right hand teapot takes a little longer to render than an image map. It was simple, but was only one layer. If you heap on several procedural layers, your render times go up. But baking those procedurals into an image map which you can then apply to the object will no longer require all that calculating to get the same look.
(That was a side-by-side example, btw. Like I wrote above, the one on the right is procedural, the one on the left and back a little is that procedural applied as an image map after baking. You can see they're nearly identical.)
Setting it up can be the problem. Actually it's the only problem. First you have to have an object with a reasonably good UV map. The SB camera can't do anything without a UV map. Then in the SB camera Properties panel, as was discussed above, you have to tweak the settings some to get a good result. Having FPrime to use for a real-time view of it all speeds that process up considerably. I don't know if VIPER can do it, haven't tried.
And lastly, the SB camera is multi-threaded and can use more than one core in a multi--core CPU. The old Surface baker shader, while also very good, can only use one core, and LW will tell you you have to use only one process if you try it. Even so, the SB camera is also just faster than the SB shader.
I'm just getting started with the SB camera, really. I've used the SB shader quite a bit, but the SB camera has more possibilities, plus the ability to render nodes. I'm looking forward to trying out these other uses for it more and will post some more as I figure it all out. You can really come up with some great seamless image maps quickly with baking procedurals that would be very time-consuming or almost impossible painting by hand.
And of course, as oldtekerr mentioned, that's only a small part of what it can be used for.
The only real downside I've seen to it is it can take a while to get set up, and can also get confusing when you're jumping back and forth between testing, rendering, saving out images, applying images, changing surface attributes and so on. Making multiple camera clones and saving surfaces to the presets shelf can help, and I've also set up a Content folder just for SB tests, which seems to help somewhat with that. It can get loaded up with images and object copies pretty quickly.
I don't know how many people around here are really interested in the SB camera, but it would be cool to have some sort of SB camera workshop or something going on.
__________________
Strangely enough, my opinions on 3D stuff do actually represent those of my employer, and possibly the US government too. But I really don't care what they think about it anyway.
|
|
IMI is offline
|
|
12-13-2007, 07:50 AM
|
#11
|
|
Registered User
Join Date: Jul 2007
Location: Texas
Posts: 227
|
 . Wow, thanks for the reply IMI! I'll have to start experimenting with that camera type, very useful...
|
|
StevieB is offline
|
|
12-14-2007, 05:17 PM
|
#12
|
|
Zbrush 4 is a myth
Join Date: Apr 2007
Location: Right Here
Posts: 6,866
|
Quote:
|
Originally Posted by StevieB
 . Wow, thanks for the reply IMI! I'll have to start experimenting with that camera type, very useful...
|
No problem. Yes, you ought to try it out, it's alot of fun, for one thing, but extremely useful, for another.
Something new coming this weekend if you're interested. I was playing around with William Vaughn's tutorial on using weight maps for multiple textures on one surface and figured that would be cool to mix with baking. I'll be uploading something you can check out if you want, sometime this weekend.
__________________
Strangely enough, my opinions on 3D stuff do actually represent those of my employer, and possibly the US government too. But I really don't care what they think about it anyway.
|
|
IMI is offline
|
|
12-15-2007, 12:56 PM
|
#13
|
|
Registered User
Join Date: Jul 2007
Location: Texas
Posts: 227
|
Yes please IMI!
|
|
StevieB is offline
|
|
12-16-2007, 09:23 AM
|
#14
|
|
Zbrush 4 is a myth
Join Date: Apr 2007
Location: Right Here
Posts: 6,866
|
StevieB,
I'm uploading something here that you can have a look at. I'm afraid it's nothing special because I got distracted. Blame that on William Vaughan and all those tutorials he's been uploading.
It's just a text object that says "LightWave" which I threw together quickly and made a couple weight maps for, because I wanted to play around with that in conjunction with the node editor and surface baking with the SB camera.
The weight maps would have been better, if there had been more geometry, and the UV mapping is just "atlas", because I was in a hurry. Had it been properly mapped, there wouldn't have been the stretching along the edges in the object with the SB texture applied.
Like I said, it's nothing special, but it's enough to get the point across. Meanwhile, I've been doing more with my UV mapped teapot from above, and will upload something more in depth involving that after I've finished, if you're interested. That will be a full scene with a backdrop and lighting properties baked into the "stage". This one is just the object with no backdrop.
There are two scenes, one with the LW text with the procedural applied in the node editor, and one with the text with the resulting SB camera texture, and the corresponding objects.
Rather than go into a long-winded explanation of what this is all about, I figured you could just have a look at it in Layout and Modeler and see what's going on under the hood. be sure to select the "baking camera" and view its properties. If you have any questions, feel free to ask.
Surface baking is a pretty cool technique, like I said, once you start getting into more complex procedurals. Image maps render a whole lot quicker.
__________________
Strangely enough, my opinions on 3D stuff do actually represent those of my employer, and possibly the US government too. But I really don't care what they think about it anyway.
|
|
IMI is offline
|
|
12-16-2007, 09:24 AM
|
#15
|
|
Zbrush 4 is a myth
Join Date: Apr 2007
Location: Right Here
Posts: 6,866
|
Oh, you might get an error message about FPrime, if you don't have it installed, but you can ignore that. Sorry about that.
__________________
Strangely enough, my opinions on 3D stuff do actually represent those of my employer, and possibly the US government too. But I really don't care what they think about it anyway.
|
|
IMI is offline
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:00 AM.
|