PDA

View Full Version : Bake shader problem - shadows off?


medula
08-26-2006, 10:54 PM
I'm trying to bake a shader (procedural). I've tried using "bake object" and "bake texture" and both produce shadows were none should exist. I'm lighting the object with a composited sphere (luminosity) and when I perform a render the view from multiple angles, the results are as they should be.

I've also tired various configurations within the baking options with nothing coming close to the result that I desire. I just want an evenly lit result.

Any ideas?

Per-Anders
08-26-2006, 11:10 PM
make sure your normals are all pointing in the right direction using the align normals command.

medula
08-26-2006, 11:35 PM
make sure your normals are all pointing in the right direction using the align normals command.

Yes, they are all pointing in the same direction. Out from the object.

Since this is for a game, the render engine of the game will create the shadows on the object.

Just to try it, I reversed the normals (pointing in and all of them facing the same direction), and it did revers all the shadows. :P

Any other thoughts?

Per-Anders
08-27-2006, 12:16 AM
maybe do you ahve overlapping uv's? that's about all i can think of right now. oh and have you switched off the default light?

zzmadd
08-27-2006, 07:47 AM
hi there ..

I can't really help, but I can join medula with the baking problems ...
I am trying to bake my subway project but I get all sorts of problems. Both using Bake obj/texture. Both recalculating the uv and not. All my normals are in correct position, but my UV lay out is not perfect. I mean the walls I am trying to bake have a 'depth' I mean like if they were bricks. So they are objs with two layers. Back facing layer uvs are not laid out. I though that was the problem.

I am trying to get the point now baking texture with selection activated.

I have black seams that looked like shadows. They could be the new texture sampling.
If you have MIP enabled, MIP interpolates pixels next to each other. So pixels next to the border are interpolated with the black outside the border causing black seams.
Try to set MIP to NONE, maybe blur a bit then if textures are too sharp.

medula
08-27-2006, 03:53 PM
Ah ha!

It turned out to be the confounded lighting rig (not the default light). So As I had said I was using a composited sphere to light my object. Once I deleted the sphere and lit my object with 6 spotlights from equal distances from all six side I was able to achieve a shadowless and even bake of my object!

A good nights sleeps is all I needed I guess.

zzmad,

Try using the bake texture tag instead and turning up the "Pixel Boarder" to at least 3. This will cause the shader (if you are not using bitmaps) to be rendered out beyond your UV boarders enough to stop the black lines from happening. I was seeing those same problems at first until I made that one change. It was the lighting rig that was driving me nutters at first.

medula
08-27-2006, 10:44 PM
Update....

Using an Environment to light the scene produced better results.

zzmadd
08-27-2006, 11:09 PM
Hi medula ..

were you using a sphere? or a sky object? with material on luminance .. what sort of material did u use for lighting? texture or just luminance?

and same material on environment produces better results?

thank you .. just so I can understand .. and learn something ..
:-)

medula
08-28-2006, 01:09 PM
Hi medula ..

were you using a sphere? or a sky object? with material on luminance .. what sort of material did u use for lighting? texture or just luminance?

and same material on environment produces better results?

thank you .. just so I can understand .. and learn something ..
:-)

I used only the environment object, be sure to turn on "Environment Strength" to %100. No sphere! This produced the best results for my needs when baking procedural textures. Just to be clean. I baked a normal map to (set to world or tangent - object didn't do anything in this case). Think is C4D version of ambient light (as far as I can figure it).

In my case, I didn't want any shadows what-so-ever, since I'm creating objects for games and the game will render the shadows realtime on the objects.

JDP
08-28-2006, 04:22 PM
What options are you choosing in the bake texture tag, you should be able to bake without the illumination effecting your texture, no need to do anything with lights.

medula
08-28-2006, 09:11 PM
What options are you choosing in the bake texture tag, you should be able to bake without the illumination effecting your texture, no need to do anything with lights.

I'm working procedurally, not with bitmaps (not sure how bitmaps are affected since I don't bake bitmaps).

And yes, the lighting does have a direct effect on baking. Check the posts above, I did solve the problem. Thank you for your concern. :)

JDP
08-29-2006, 02:09 AM
Well I'm not sure what you're trying to do exactly but it is quite possible to bake a procedural texture without any lights in your scene at all, I've done it many times, I was only trying to help!!

Cheers
JDP

Per-Anders
08-29-2006, 02:52 AM
Yes, I believe JDP was only saying that you can change the options in the bake tag (or bake settings) to simply not include or factor in any lighting or shading if you so wish. It wasn't totally clear though whether you actually did want lighting/shadows but were simply getting them in the wrong places, or if you didn't want them at all and only wanted the surface color to be baked.

JDP
08-29-2006, 02:56 AM
Yes, I believe JDP was only saying that you can change the options in the bake tag (or bake settings) to simply not include or factor in any lighting or shading if you so wish. It wasn't totally clear though whether you actually did want lighting/shadows but were simply getting them in the wrong places, or if you didn't want them at all and only wanted the surface color to be baked.

Exactly. :)

cheers,
JDP

medula
08-29-2006, 03:46 PM
I have no options (9.6) in the "bake texture tag" that I see to not have the surface affected by the default light when using shaders (procedural).

I do appreciate your help.

But like I said, the problem was solved once I popped an environment (ambient light) into the scene.

I'd be glad to post the file so you can see for yourself.

Per-Anders
08-29-2006, 08:57 PM
It's not an option to not bake the illumination, it's simple a not selecting the illumination to bake in the first place, the following setups will bake the color without any shadows or illumination:

http://www.peranders.com/general/surfacecolor01.jpg
http://www.peranders.com/general/surfacecolor02.jpg

medula
08-29-2006, 11:44 PM
That might work for you, but it does not work for me. That is what I have been saying from the beginning. :)

Per-Anders
08-30-2006, 12:18 AM
Can you post the scene? (or an example scene where it's not working for you).

medula
08-31-2006, 03:50 PM
Here is the file (http://medulla.ambrosiasw.com/%7Emarcus/images/screenshots/bake_issue.zip)

Here is a screen shot of my settings. You can see the shadows in the preview:

http://medulla.ambrosiasw.com/%7Emarcus/images/screenshots/bake_settings.jpg

JDP
09-01-2006, 09:52 AM
Yeah you're right it's not working with any of the sla 3d shaders, I'm sure it used to its been a while since I used them, definitely did with the old sla baker.


cheers,
JDP

medula
09-01-2006, 01:17 PM
Yeah you're right it's not working with any of the sla 3d shaders, I'm sure it used to its been a while since I used them, definitely did with the old sla baker.


Whew! I'm NOT insane... ya well the new problem is when I use the environment to light the object my normal map comes out all screwy because not it's lit form all directions. :P

But I can generate that in pshop for now, everything else works as it should once I drop in the environment though.

zzmadd
09-01-2006, 01:32 PM
mmm ..

I've had just problem with baking too ...
Have you tried enquiring Maxxon??
I didm and sent them a scene file, but I had no reply in 4 days ....

Let's see.

medula
09-04-2006, 12:54 PM
mmm ..

I've had just problem with baking too ...
Have you tried enquiring Maxxon??
I didm and sent them a scene file, but I had no reply in 4 days ....


No I have not tried Maxon yet. I've been so wrapped up in my project I haven't had a second to do anything. I will make an effort this week.

medula
09-05-2006, 05:21 PM
UGH, I tried to submit my problem to Maxon via the website and this was the response using 2 different email addresses:

jmail.SMTPMail error '8000ffff'

550 Your mail has been found on our RBL service list and will not be delivered. Go to spamhaus.org for more information

/support_form.asp, line 195


---

So I went to the spamhaus.org web site and popped in my IP and it tells me I am NOT in the spam database. What gives?

zzmadd
09-05-2006, 11:26 PM
Huhh

mmm
I wrote them and gave them a C4D scene. This was 1 week ago and everything seemed to go through nicely.
They didn't reply though .. yet ..
Usually they are fast (at list in my little maxon experience).

I am very curious about baking .. and how to make it work ..
Any development would be nice to know ..
thank you.

Srek
09-06-2006, 06:29 AM
Due to a bit of beeing overworked crash report mails are usualy not answered, except if i have the chance to give a hint on what is going wrong and how it can be prevented by the user. The crash report feature was already extremely helpfull to us and i think this will show in future versions.
Cheers
Björn

medula
09-06-2006, 03:14 PM
Due to a bit of beeing overworked crash report mails are usualy not answered, except if i have the chance to give a hint on what is going wrong and how it can be prevented by the user. The crash report feature was already extremely helpfull to us and i think this will show in future versions.

Crashing? Wrong thread?

Srek
09-06-2006, 03:59 PM
Crashing? Wrong thread?
No, overworked, like i wrote ;)

Sorry, i mixed that up.

Cheers
Björn

CGTalk Moderation
09-06-2006, 03:59 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.