Quick Q: How do I apply radiosity to a model with a UV mapped texture without loosing the texturemap (i.e. the laptop demo, Shiny Laptop) ?
you can’t
I was writing a script to restore the uv coordinates, but I decided it wasn’t possible to get accurate enough (because of how quad faces can fold on themselves)
Though with proper radiosity settings you will not get new faces which can make re-uv mapping easier.
I believe you need to set max elements to 1 (or 0 if possible)
and set the limits to the full extreems, reduce subsurf patch and el as much as possible and increase the limit on remove doubles to the max (in case other changed settings allowed more faces to be created)
in 2.29 you will be able to render with radiosity, but the baked radiosity needs to be improved. Uv coordinate support is from what I know trivial (the math is simple), but it will increase the unused memory requirements of the calculation unless uv coordinates are stored seperate from the elements they apply to (less trivial, would be some work, especially with the subdivision shoot steps)
(I should start posting requests like this on blender.org…)
You can do this by…
1 ) If you are rendering then use the new version of blender that can apply radiosity at rendertime.
- Bake into mesh
You may want to subdivide the mush a few times before baking since baking applies to vert colours only and if we are to caopy uv mapping back onto the mesh then we must not add verts.
make a duplicate of the mesh, call it Original
Call the mesh you have - Unwrapped
Bake radiosity, turning all the subdivide settings down so you end up with the same number of verts/faces.
Run this scritp from teeth.
import Blender
me1 = Blender.Object.Get("Original").getData()
me2 = Blender.Object.Get("Unwrapped").getData()
for i in range(len(me1.faces):
me1.faces[i].uv = me2.faces[i].uv
Blender.NMesh.PutRaw(me1, "Original")
I have not done this but it sould work. correct me if Im wrong.
Uhm, could you explain again please? I cannot quite understand what you’re trying to do here?
Thanks
Certainly. Blender will usually add new faces in the radiosity calculation which will make this method useless. My suggestions include how to attmept to avoid that in which case theeth’s script MAY work (I wouldn’t say my methods are foolproof), hence I still think the best solution is to uv map after doing the radiosity calculation. Hopefully it will not be a problem for petterms
now, I was going to post a caustic reply to my own post.
Ok, to explain baking the radiosity calculation into a mesh it would be best to follow the tutorials, possibly in the blender 2.0 guide on blender.org (on another file)
http://download.blender.org/documentation/NaN_docs/Manual2.0/radiosity.html
is that true that 2.29 can use radiosity in rendertime?
how does it work?
so i do not have to use the radiosity calculation bevor final rendering?
what about all thge materials? do i still have to re apply them later?
Yes it is true, but it still isn’t perfect. At render time the problems with uv mapping and procedural textures and more than 16 materials are gone, but the result seems to be added after, instead of with the lighting (which can look wrong). You need to turn on the radio button for each material to do the radiosity calculation with, and press the radio button in the display buttons. Check the news and chat forum for a thread on this topic, get the latest bf-blender build and see what I am talking about. Oh, the rendering radiosity method doesn’t add new faces, you need to subdivide your meshes yourself.
(there is also a thread on this topic on blender.org It has some animations you may find interesting)
2.29 isn’t released yet (I don’t even think a date has even been set), so whatever you try is work in progress, so please fill bug reports in the tracker if you find any.
Martin
Thanks for all the feedback! I am getting there slowly…
Hi
I’ve been trying to get Theeths bake module to work.
import Blender
me1 = Blender.Object.Get("Original").getData()
me2 = Blender.Object.Get("Unwrapped").getData()
for i in range(len(me1.faces):
me1.faces[i].uv = me2.faces[i].uv
Blender.NMesh.PutRaw(me1, "Original")
But it comes up with invalid syntax after
for i in range(len(me1.faces):
Any idea why?
I’m using 2.28c.
Cheers
doh, forgot a parenthesis. Try this:
import Blender
me1 = Blender.Object.Get("Original").getData()
me2 = Blender.Object.Get("Unwrapped").getData()
for i in range(len(me1.faces)):
me1.faces[i].uv = me2.faces[i].uv
Blender.NMesh.PutRaw(me1, "Original")
Martin