ScriptSpot

Script

ToTex Render To Texture

By Svennovich · Credited author: OutOfInspiration · 2010-05-21

Version
3.0
Version requirement
3ds Max 2009 - 2010 - 2011
Date updated
2010-02-14
Votes
205
Download
Download
Description

TOTEX v3

Moved to github

The project Totex has been moved to gihub so community development is easier

https://github.com/svenfraeys/totex

New Version 3.0

"ToTex" is a render to texture script that gives you the ability to quickly bake multiple textures to a folder. ToTex will start baking all the selected objects with the chose selections and will save it to the specified folder

New features (3.0):

 

- Stability : Bigest issue with ToTex 2.0 was the stability. The ToTex engine is recreated for stronger stability, focussed on high speed expanding.
- Improved User Interface : More compact and focussed on usability
- Auto-Update functionality : Get directly the new features
- New maps in development : xNormal, instant preview and photoshop connection.

 

New features (2.4):

- new improved UI: much more clear design with thumbs
- Element map now works!

New features (2.3):

- Improved UI: a lot more compact design, better overview and more dynamic system
- Expert Mode: press on the *-button at the top, this will show all the maps of totex, you can easily toggle this on and off

New features (2.2):

- Max Merge: Merge a max file when baking, for embedding complex lightscenes, after the bake ToTex go back to your start state
- Render Preset: Override the renderpresets when baking with ToTex, you can choose between three RPS files that you can override to your own render settings.

New features (2.1):

- Preview : with realtime directX shader (Xoliul shader - http://www.laurenscorijn.com/)
- Light Trace Ambient Occlusion
- Gradient Map
- Mask Map
- For Each Material ID
- Selection Bake : Bake only the selected faces

Material ID Masks was partly based on a script of Koen Samyn, it's been optimized for faster and better rendering with ToTex.

Enjoy

Additional Info

-------------- TOTEX v.3 -------------- Updates: -------- v.3.0 2011-09-17 - UI Interactivity - Hover graphics, Tooltips - UI : "+"-sign left mouse click - Updated Grad Top Down - Confiugration Added : MaxMerge, Render Preset 2011-08-27 - Improved Auto Update Installer - Added Thumb View - Styling Layout - Color schemes improved v.2.4 09 / 02 / 2011 - Adding Element Map System 01 / 02 / 2011 - Added Thumbview / Listview system v.2.3 30 / 12 / 2010 - Expert Mode 30 / 12 / 2010 - Resolution Slider 29 / 12 / 2010 - Update UI Interface v2.2 25 / 12 / 2010 - Max Merge system 25 / 12 / 2010 - Render Preset system 23 / 12 / 2010 - Fixed For each material ID v2.1 22 / 12 / 2010 - Selected faces Bake 21 / 12 / 2010 - Added Bake "For each Material ID" v2.0 10 / 12 / 2010 - Dialog Position is now saved 14 / 12 / 2010 - Preview Object System with Xoliul shader and standard material 15 / 12 / 2010 - Normal maps will be putted in normal slot 17 / 12 / 2010 - Cache system for preview objec
Videos

Tags: Tools, Rendering, UVW, mask, workflow, maps, Texture Baking, normal, diffuse, baking, projection, render to texture

Comments (71)

Does not work on max 2015

Turnim · 2015-08-22

Hello

I just installed it on my max 2015 and it did a full reset on my interface. Lucky me i did save them, so i could load it back to my settings, but its certainly something you should fix.
Running it crashed my max, i tried it with several different files.
Then the uninstall doesnt work. It gave me the message that it was completelly uninstalled but i had to remove some files manually

Overall, i can't recommend this plugin for use on max 2015

kirillall · 2016-12-24

same issues on 2014 version. Installed with errors and not working.

Im getting an error

eyein12 · 2012-10-13

Hey sven, great looking program, but I am having some errors. I posted a pic of it. then once i X out all of those i click on the UI and the window pops up ok, all the buttons work, but the render always comes out with a black map, nothing on it. Is the error causing this? or am i missing something

its for 3ds max 2011 3s bit, totex v3

thanks

ian

Photobucket

Getting flat normals

mastrein · 2013-07-28

Hi! I also have some problems with the tool. When using max own render to texture feature I get a good normal map but when I use your tool for it, my renders comes out flat. Even though everything is setup correctly and in the same manner as when using max's own tool.
Max 2013 x64.

Cancel all?

sandrine_m · 2012-09-28

Hi Sven!

Would it be possiby to add an option to cancel all the renderings?
Thanks

jinj · 2011-11-06

i would love to test it... but using vray it crashes at a certain time... dunno why. using max 2012 64 and vray 2

asymptote · 2011-10-25

Cool , no worries I was just checking out AO in FR.
Thanks for the update, UI looks slick :)

asymptote · 2011-10-25

Is this compatible with final render 3.5 SE ?
I only ask because I'm getting strange results when using it, artifacts, bad uvw flattening, etc.
Just trying to narrow down the possibilities.

thx

Svennovich · 2011-10-25

Never tested it with final render so I can not give you an answer in how ToTex reacts on it. It stays mainly based for scanline render. Once I start restart development I ll check it out :)

Svennovich · 2011-09-19

Fixed the problem with the browsing. Let me know if there are any future problems

miauu · 2011-09-17

I found another problem - in the Setings dialog the "..."(Browse button for save path) not work. When I press it nothing happens. :)

miauu · 2011-09-17

Now everything work fine. :)

miauu · 2011-09-17

Hi, Sven! I get this error:

Svennovich · 2011-09-17

Thanks! I fixed it, restart your ToTex and it should be fixed, the DLL was still linked to my local DLL.

If it still give issues let me know!

Svennovich · 2011-09-17

New version 3.0 is released.

The core has been rewritten so that s why it took so long for a new update.
Stability and speed has been improved focused on great flexibility.

So adding maps will go smoothly with no problems and with auto-update you will be having all the latest features.

So new ideas more then welcome! I am up for the challenge.

Enjoy!

site is 404'd

.eb · 2011-09-06

Server is online, but site is gone.

its working

Bob · 2011-05-21

Sorry I reintalled it - its working fine

acting strange

Bob · 2011-05-21

Installed the new version and then selected the maps I wanted changed the path so that the files can be loaded onto my desktop -which didnt work. Now it wont let me select nothing also i get 2 white boxes floating around the cursor when i try to select something. Any ideas?

Svennovich · 2011-02-20

woops wrong button

but currently working some new maps 'world normal map', 'curvature maps'
and also adding 3Point shader for high quality previews.

ToTex 2.4

Svennovich · 2011-02-14

Hellow,
It s been a while since I updated my script, been quiet busy (moved to Finland for a few months :) )
So I added some new cool features, the UI has been updated with thumbs
(You can still swap between classic listview and thumbview)
so its much more clear what you can do with ToTex.

Also the element map now works !

I'm also working with a friend to implement a new application with ToTex.
xNormal will be implemented in ToTex so that you can automatically render ambient occlusion and cavity maps. So pretty cool stuff :)

enjoy, and keep those requests coming!

greets from finland

Sven

Update ToTex 2.3

Svennovich · 2010-12-29

I've got a lot of feedback on ToTex. And te UI has improved thanks to this.

It is more compact and more dynamic
You have an expert mode, where you can toggle on / off to show all the maps of ToTex.

Padding is removed, and is set by default maxed out. Because it has no effect on the end result
Also changing the result, you can change the resolution with to spinner, the left one is +-1 unit.
When sliding the second one you will slide with the power of 2 so that you get to most common resolutions that are used.

enjoy!

more request more than welcome and hope it will improve the workflow.

Svennovich · 2010-12-26

New Update! 2.2

Some new features has been added.
- Render Preset: Make your own RPS files and link them to ToTex, this way you can easily bake with your own render presets with no problems.
- Max Merge: merge any 3ds max file that you want, ToTex will xRef this scene when start baking and remove it afterwards, perfect for baking with complex external lightning scenes.

- Bug fix: For each Material ID problem is fixed (had problem when there was a matID in the editor that were not used in the model.

I hope this will be a great help in your texturing process!

more suggestions more than welcome.

Greets
Sven

Svennovich · 2010-12-23

New update:
- Implemented: 'Bake selected faces', select faces in editable poly and use totex, Totex will bake only the select faces out, perfect to create masks or specific controlled bakes
- 'For each Material ID'-baking, bakes each wanted map for each MatID seperatly.
- 'Mask'-map: renders out a white diffuse. Perfect for creating masks to use in your texturing workflow.

Ronin you got your requested feature ;)

more requests more than welcome!

Thank you very much sven

ronin · 2010-12-23

Unfortunately it gave me an error when i was testing maybe is my operating system or my 3dsmax version...

p.d: screenshot attached

Attachments

One object multitextured

ronin · 2010-12-17

How can i bake this? For example i have one cube with a multimaterial (each face different ids) therefore i need 6 textures. It seems very simple but still cant get any answer, thanks in advance, sorry for my english...
Ronin3d

P.d: without using channels...

Svennovich · 2010-12-18

hello,
ToTex does not have this function so far.
thanks for telling and I will work on this feature
So the next update will have it :)

thanks, more feedback more than welcome.

Problem Solved

snailspeed · 2010-12-17

Sorry for not getting back to you sooner. I've given the update a go and it works perfectly, thank you!

I look forward to ToTex 2.0 :)

Svennovich · 2010-12-05

So ToTex v1.9 published. I updated the docking system of ToTex, you have more control with what happens with the window and you can toggle the docking state to floating/left/right ("D"-button next to settings and help). This way you have a better window to work in.

scrawld: I hope this will fix your problem with the clicking problem.

So this a perfect update to end with version1 since the next step will be ToTex 2.0!

I'm planning to update the core of ToTex and will be implementing "ToTex+", which will contain more kind of maps and more customization on what your result will be.

So you will see more soon! :)

Any errors or suggestions alway more then welcome and a lot of texturing fun wished!

An odd problem

snailspeed · 2010-12-04

I'm coming up against an odd problem when using this script. I don't know if the problem is with my setting or the script itself, but I thought I'd bring it up should anyone else be coming up against it.

When the script is launched, it appears in the centre of the screen. If I use it where it is, I can use it. If I move the window to another position I cannot interact with it. The mouse icon turns to the one which appears when you hover over the tab on a tool bar (the one you can grab to move the toolbar off the main bar). Then, I can only move it around. I cannot click any of the buttons at all, just grab it and move the window about.

The odd thing is, if I move it back to its original position, It will work properly again. Even stranger, if I move only part of the interface back into the area that window originally occupied, I can interact with that part, but not the rest! Does that make sense?

As work around, I found I can move 3dsmax onto my second monitor, launch the script and then move the window back onto my first monitor. That I can still use it witout it blocking my screen. Again, providing I don't move it.

I'll try and work out what it could be at my end, but in case someone thinks it could be the script somehow, i'm using 3DS Max 2010 64bit on Windows 7. If you need more details, or if anyone can offer a clue as to what could cause it, let me know. Cos I really want to use this script ;).

Svennovich · 2010-12-04

Hey scrawld,
That is a strange bug you have. Never had such problems as you subscribed. I'm also working most of the time on max 2010 64bit on win7 ultimate. So i think their might be something wrong with you 3ds max.

I was planning to change something about the type of window ToTex is currently using. Since you have problems with running totex i'll do this tomorrow and post a new version. (It will no longer be a dockable window by default, but you can still dock it by using icons in totex)
Maybe this change in the script can fix your problem.

If you find a solution before me, feel free to share :)

Svennovich · 2010-11-24

New version 1.8.. normally solved the bug that occured in max 2009.
Also in the settings panel you can adjust Spread for Ambient Occlusion (Mental Ray).
also new Installer build with MSPM - MaxScript Project Manager (my 2nd tool)

More requests more then welcome.

kurt_hectic · 2010-11-20

on max 2009 i always have an error on line 183 : "destroyDialog gTextureBakeDialog"

:(

why?

Svennovich · 2010-11-24

Ow, I did not test ToTex in max 2009, I'll update a new version this week. and try to anticipate something on this error. Thanks for saying

Svennovich · 2010-08-19

ToTex v1.7 new feature for timeline render

Main feature added, "render total timeline" this will render out every frame on the timeline, these renders you can use as an image sequence in other applications. This way you have a lot of more control not only for static texture but also in animations. Perfect for blocking out or saving render time.

fixed some list problems when you edited the maplist from settings.

hope you like it :) any more suggestions let me know.

Svennovich · 2010-08-12

ToTex v1.6 release, some new features.

So the main new feature in this new version is that you now can Customize the mapList of Totex, to optimize it to your own workflow. In the settings panel you can check what map you want and don't want to use in ToTex, for example if you never use Heightmap it will not show in the ToTex list. This way you keep the maplist short enough to keep everything better organized.
(and i will add more maps to ToTex, so the list will be too long in the future)

'Vertex Color' map is also added in ToTex (request from Snppls, thanks for the suggestion)

Also Installation problems are fixed, it now checks on a version txt file in the mzpTmp folder, this way it won't use old ToTex files.

edit: placed a new version, their was a small error with the docking states (it was possible to dock toTex on the top and bottom, so i disabled it again)
Hope you like this :)

any more suggestions more than welcome, i'm happy to implement these in ToTex!

Svennovich · 2010-08-10

again, thanks for the feedback everyone!

snppls: challenge accepted! :) never heard about vertex color maps, i will take a look at it, I'll try to add it in the new version of ToTex. thanks for the suggestion.

Suzume:I know their is a problem with the installer. Sometimes it takes the wrong unzipped temp folder.
To fix it, you need to delete all mzptmp folders, these can be found at c:/users/username/appdata/local/temp/
Once deleted it should work :)

For some reason he doesn't take the newest ToTex folder. (the reason that you still have 1.4)
I'll try to fix it as soon as possible

I did mention it in the installation image of totex above. But i'll but it more clearly and add an attachement 'install problems.txt' or something.

What was your error that you got with the normal maps render?

nice to hear you guys like the script :)

Suzume · 2010-08-10

Yes, thanks for the quick help. Deleting the temporary mzp folders was the solution to the install problem.
On to the next one...

I think it's best to show a picture of what I mean, so please have a look at the attachment.
Regardless of how far away or tight I wrap the projection plane onto my reference geometry I keep getting weird intersections in the final texture.
And the map itself looks somewhat strange in certain areas - like if the ray didn't hit the geometry at all.
Might be a 3dsmax issue or more likely so my inexperience with the RenderToTexture system in 3dsmax (I mostly use ZBrush and XNormal).

Attachments

Svennovich · 2010-08-10

i'm trying to get the same render errors that you have but with me i don't have any problems.
You can also test with "send R2T", this way everything stays in max dialogs and you can render it out from there, if there is still a problem it is something with your render settings.

What version of max are you using?
if you want send me the maxfile i'm happy to help (msn: sven@fraeys.be)

Suzume · 2010-08-10

Ok, mail has been sent to you. I'm on 3dsmax 2010 64-bit. In the meantime I'll play around with the R2T settings, thx. :)

Edit:
So we two had a look at the issue I had and I think we can conclude these had nothing to do with ToTex. A combination of geometry-detail/texelspace and too low resolution settings caused the artifacting.

I appreciate your support and will recommend your script to anyone who needs to render geometry information into textures. It's a real time-saver.

Snppls · 2010-08-11

I'm sorry

Vertex color maps are pretty much just the vertex colors rendered out, it's useful for when you need vertex colors but when the engine doesn't support it.
Right now I'm using them for a shader where the color controls vertex displacement.

The way to do it right now in Max is using vertex color in the diffuse map slot, then render to texture as a diffuse map. I've gotten it to work before but now everytime I try it again it renders it with the scene's lighting, even if there's none except the default.

Suzume · 2010-08-11

Snppls:
Try to set the self-illumination value to maximum. This should couter-act/override any lighting information coming in from external light sources.

Suzume · 2010-08-10

After installing 1.5 I still have 1.4 firing up.
From a quick look inside the mzp file provided it seems the 1.5 version is in there - but after dragging the file into 3dsmax and clicking on install the version I get to see is still 1.4 ... even though I have deleted all files related to ToTex from my user scripts folder:
C:\Users\XXXXXXX\AppData\Local\Autodesk\3dsMax\2010 - 64bit\enu\scripts\

Any idea what's wrong? Should I just extract the mzp manually?

Originally I came here to post about an error I have with generating a normal map in 1.4 ... but this new error bugs me even more :D

Edit: So I tried copying the files from inside the mzp directly over to my scripts folder directly after an unsuccessful installation while still in 3dsmax.
After hitting on my custom ToTex button the script fired and I got an error on line 251 in ToTex.ms (I think).
Closing the listener window revealed the new UI of 1.5 to me ... so it is inside the mzp, but I cannot install nor use it.

Svennovich · 2010-08-09

new ToTex 1.5 release :)

I added a "Send R2T" button, this button will send the data of ToTex to the "render to texture" dialog of 3ds max. This way you can do more advanced modifications with the standard workflow of 3ds max. (which still has more options than ToTex).

The dock state of totex will now be saved when you hit the "save current settings" icon on the top left of ToTex. I guessed thats more intuitive.

Render preview of the uv's can be toggled off now.

Also the channel of UV's did not work, fixed it now so it should work perfectly

btw: thanks Michele71

Snppls · 2010-08-10

Really great script, you are right it saves a lot of time.

I hope I'm not too bold for asking this but I have a request for a feature that I think would be a great addition to your script, something which Max lacks. To render to texture a vertex color map. Right now you have to use a vertex color material in the diffuse slot and render to texture a diffuse map, which is bad since it also renders the lighting and it's a whole mess with using the right channels etc.

Again, great script, thanks.

Michele71 · 2010-08-04

Nice, very very nice script! It work very well :) :) one point to you!

TitusLVR · 2010-08-03

Hi! Thats awesome! you did it! many thanks!

PS: like new feature you can:
1) add color selection for background
and
2) add some buttons for render tuning - like super sampling etc...(or the buttons for redirecting from totex to render menu)

PSPS: eh.. but in 3ds max 9 not (2009) the blend render did not work.
And please check how ToTex works with channels, i test it in 3dmax9 and i had troubles with UV render on 2nd channel.

PSPSPS: Many thx ! for this script, and it would be awesome if you make it full compatible whit 3dsmax9 ;)

PSPSPSPS:) error screen http://funkyimg.com/viewer.php?img=/2/207/348/Totex_error.jpg

Svennovich · 2010-08-04

Hey TitusVR
thanks so much for this feedback it made it a lot easier to find bugs.

I think I found a way to make the blend render work with max9 but i'm not sure.

I found the flaw with the channel for the UV's and I fixed it.

But it is difficult to test it because i don't have max9.

ps: I think i will have a working version tonight/tomorrow, but this will make it easier for me.

psps: thanks!

pspsps: ....nothing more to say

Svennovich · 2010-08-02

allright ToTex 1.4

on request for TitusLVR added a new feature (that s almost the only thing thats been added to Totex, and some debug fixes)

"Blended Renders"
simply use : bake multiple objects in to one texture
What is does is render out like usual all the maps in to the target folder.
After all the rendering ToTex will make one new image for each Map that is a blend of all the previous renders (in the same category of course)

This way you don't have to start pasting everyting together in photoshop

hope you like it :)
Feedback or new requests are more than welcome!

TitusLVR · 2010-08-02

Hi, it is very helpfull script.
and can you add some feature? - bake multiple objects in to one texture ( max 9 )

Svennovich · 2010-08-02

Thats a good idea! didn't think about that, thanks

started with checking out how it would work in maxscript. Its not so difficult so i think it will be implemented it in ToTex in a few days.

any other suggestions for ToTex :) more then welcome

Svennovich · 2010-07-31

Allright Totex 1.3

The Material ID Mask system is added,
I hope this is what you are looking for, ronin3D?

note: I had some bugs that material id masks didn't work, if you still have problems, please let me know.

I adjusted some selection errors so ToTex won't crash any more (i think)
but if you still find bugs please let me know.

I'm still open for new requests, cause i'm out of idea's at the moment.

Hope you like it! :)

asymptote · 2010-07-27

Thanks, can't wait. I'm absent minded, I usually remember what I've forgotten to do about .03 of a sec "after" I hit render ;)
How do I get the preview to show as it's rendering ? I'm doing lots of shadow/alpha map tests and could save a lot of time aborting the render after the GI pass, If it looks bad.

Svennovich · 2010-07-27

*note: material ID Masking system almost finished! it will be available this week :)

allright some new updates for totex ! (v.1.2)
- cancelling the render will stop the total render list of ToTex
- render preview can be toggled on or off in the settings dialog

started working on the material ID system, i found out how to do it so i think i will have it finished at the end of the week.

hope you like it!

ronin3d · 2010-07-27

😛Great

asymptote · 2010-07-25

Brilliant script!! great time saver, my only problem is if I cancel the render, I can't access the viewports and have to end max and restart.
Using Max 2010 sp1 , finalrender r3

Svennovich · 2010-07-25

thanks asymptote, nice to hear that you like it

I never thought about that problem. I will spend some time on it tomorrow and try to fix it.

Just did some maxscript research and I can check when a user cancel a Render action. So i think i can fix the problem easily.

I will put the update as soon as possible.

greets

Svennovich · 2010-07-06

k, I created a new version of ToTex, added some new features
- I fixed the usermacro, so now you can find totex in the 'OoiTools' category
- set startup state of the window (so you can set it that it starts up docked on the left side
- activeX enableAcceleration toggle, it was a request of someone, i don't know what it does but if it makes someone happy lol

any new requests are more than welcome! thanks everybody for the feedback.

so for soon : I'm going to work on a system for rendering out seperate material Ids

ronin3d · 2010-07-06

Excellent news, specially the material id system you are working on... good luck

Svennovich · 2010-05-31

you are correct it is "LightingMap", mistyped it, will change it in next version, thanks!

Patrick Probst · 2010-05-30

Isn't it called "LightingMap" ?, not "Light__n__ingmap" ? ^^

2HD · 2010-05-25

Good script,

Would be nice to have possibility to select and render various UV Channel.

Thanks.

Svennovich · 2010-05-28

thanks, for the feedback, I will add it in the next release.
I hope everything works fine? if something else is bothering you or the ui isn't intuitive enough please tell :)

Svennovich · 2010-05-23

It works for both processes for the techniques I use.

It is the same as Render To Texture window of 3ds max, it only works faster.

What do you mean for the High Poly to Low Poly rips? Projection of normalmaps, AO and so on?

You can put 'projection' on so that it will save the information that comes from the baking with the 'projection' modifier and so on.

If you have ideas I be more than happy add it to the script.

Suggestions are more than welcome!

mLichy · 2010-05-23

Is this just for baking out LP maps? Not doing HP to LP Rips?

mortalhuman · 2010-06-13

Hi, it seems to have the projection modifier built in so, you can bake those as far as I can see.

Question: What settings does this use in the advanced render settings by default? Supersampling setting and so forth, behind this simple panel, is it also simple settings, or will I still have to setup my panel scene by scene?

Great script I will try if it bakes at high settings??

Svennovich · 2010-06-13

Hey mortalhuman,

The projection modifier isn't activated by the script, it just toggles the projection on and off in the max 'render to texture' dialog
So the user needs to put his own projection modifier on it and adjust the cage as he pleases and so on. (same workflow as the regular render to texture of max)

You can check in the settings panel of ToTex (second icon top left), their you can set the samples for the Ambient Occlusion of MR. But I think that s the main adjustment people do when baking AO's.

But the script doesn't adjust anything of the render settings. You can adjust them in your render settings and ToTex will use these.

I didn't want to make my script too complex since you can still change those settings yourself or with other scripts.

Could you show me exactly what render settings you specificly mean? the ones in render to texture dialog or the one in render settings (default scanline, mental ray, ....)

If you have any suggestions that you would like me to add, please let me know and i'll be happy to help :)

grts

ronin3d · 2010-06-13

Can you make it posible to rtt by material ID?. Is it posible at all?
And more options for AmbientOcclusion. Thanks in advance, sorry the english i speak spanish

Svennovich · 2010-06-13

hmmm....i think I can make something work with that :) not a bad idea ronin3D!
I'll check it out and let you know!

mortalhuman · 2010-06-14

That works for me, I don't mind going in the panel and setting it up. This still makes things so much faster :D I haven't tried it yet, I can't find the UI shortcuts. OoITools group isn't showing for me in the mainui for me :o I think I may be expecting it in the wrong place?

grts too :D

Svennovich · 2010-06-14

maybe you have an older version, the last one that I released should have the OoiTools category, if not check category "ToTex" that one should be available.

Will check it out..maybe i updated the wrong file or didn't code it right.