[Plugin] Normal Map Maker
39 posts
• Page 1 of 2 • 1, 2
[Plugin] Normal Map MakerUPDATED: Now there is an actual plugin file to download and install thanks to Didier Bur.
Ok, here's a quick and dirty normal map maker. It will re-paint all selected faces with the color of their normal, then it changes the camera to top mode and exports an image. Unfortunately you will have to crop the image yourself. Please watch the video for a brief demonstration of how to use it. This video shows an old version of the plugin that required pasting code into the Ruby console. That is no longer necessary. Now the plugin has a proper item in the plugins menu. Here is a picture of the base geometry: Here is the actual exported normal map that you need to crop down: Please, register (free) to access all the attachments on the forums.
Re: [Plugin] Normal Map MakerChris that's excellent
Nice pink background in SU too
Re: [Plugin] Normal Map MakerDang. Though this is good, I for a moment thought you had found a way of SETTING the normal in SU.
Oh well, maybe in SU 12...
Re: [Plugin] Normal Map Maker
Re: [Plugin] Normal Map MakerAlso, if people don't like copy and pasting code into the ruby console, I could further develop it to be a regular install plugin that goes into the menu system. Maybe if I get some free time. I prefer menu items personally.
Re: [Plugin] Normal Map MakerYou described an easy and excellent way to make b&W displacement/bump map in another topic (using a gradient black-to-white image projected sideways...).
If you ever develop this plugin into a menu item one, could you also include that option? (although true that it can easily be done simply manually, too). Gai...
Re: [Plugin] Normal Map Maker+1 for menu
+1 for Gaieus suggestion +1 for +1
Re: [Plugin] Normal Map MakerThanks a lot Chris for this one. Hope you'll find some time to make a menu for this one...and +1 for the Gaieus suggestion.
Cheers.
Re: [Plugin] Normal Map MakerHi,
Here is my contribution to this nice idea. I hate commands in the console, etc, so I've made it a plugin. It sets temporarily the display style without edges and edges profiles, resets it after the tool has ended. It restore all the original materials of the faces and also purge unused materials. You'll find the command under the File menu -> Export normal map @Chris: I hope you don't mind me tweaking your script... EDIT: modified on Dec. 8th 2010(menu option not working) Please, register (free) to access all the attachments on the forums.
Last edited by Didier Bur on Wed Dec 08, 2010 6:24 pm, edited 1 time in total.
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F) http://rld.crai.archi.fr/rubylibrarydepot/
Re: [Plugin] Normal Map MakerGreat, thanks Didier! You added pretty much everything else I was hoping to get to later, just didn't have time at the moment. I can redo my video tutorial and stuff later when I get a chance. Hopefully tonight.
Chris
Re: [Plugin] Normal Map MakerChris and Didier, Good work. This is a very neat function added to Sketchup's "bag of tricks".
Re: [Plugin] Normal Map MakerNeat!
Welcome to try Thea Render, Thea support | kerkythea.net -team member
Re: [Plugin] Normal Map MakerHi,
Just edited the script and re-uploaded it, because the menu option was not working. Sorry for the inconvenience, Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F) http://rld.crai.archi.fr/rubylibrarydepot/
Re: [Plugin] Normal Map MakerIt is a nice step forward!
I was thinking about using TIG's Java solution and produce a PNG with proper aspect ratio and without modifying the original materials. I don't know how to calculate smooth normals over a whole face when an edge is smoothed in SU, but I bet it can be done. Author of Thea Render for SketchUp
Re: [Plugin] Normal Map MakerI've been thinking about using a jar to mimic 'make_unique' for skewed textured materials etc as exporting these with correct UV mapping to tri-faces is not possible [or at least I don't know how to do it] - the way the built-in OBJ exporter copes is to make special versions of the texture image files that have non-exportable distorted UV-maps [from skewing etc] and then use those as a non-distorted image in the OBJ code... It's relatively easy to distort the width/height of an image in java BUT skewing is more tricky - but possible... e.g. http://www.jhlabs.com/ip/distorting.html and http://www.jhlabs.com/ip/filters/index.html or http://java.sun.com/products/java-media ... p.doc.html
TIG
Re: [Plugin] Normal Map Maker
Sketchup::TextureWriter allows you to write out distorted images. If you load a face with distorted texture to the TW and write it out it'll save a modified version of it. Oddly enough, it doesn't seem to work the same way for skewed, scaled etc - then the texture is the original texture. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [Plugin] Normal Map Makerah...
But a skewed texture only needs three co-ordinates - why are these troublesome for triangles? Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [Plugin] Normal Map Maker
Maybe I use the wrong wording... it's textures that are somehow rotated/skewed/sheared that need four UVs ? TIG
Re: [Plugin] Normal Map MakerOnly distorted textures needs four points.
Normal size (based on material width and height): 1 point Uniformly scaled: 2 points Non-uniformly scaled: 3 points Skewed - sheared: 3 points Distorted: 4 points Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [Plugin] Normal Map MakerIt's distorted then - do you mean that we CAN export these already using a TW and the material's actual face front-material?
If so, how do we 'know' a face has a 'distorted' texture as opposed to a 'skewed' or 'rotated' one ? Let's say I have a face with a material that has its texture distorted and some other faces use that material 'undistorted'. The material is exported 'undistorted' and used with most faces with the simple 3-point UV-mapping... I need to know how to find which face has which type of texture, then if it's distorted then export that texture as a 'variant' using the TW with the very face, and then use that image-file for that face in the exported data. Is this what the built-in OBJ-Exporter does when it makes distorted texture files for some faces... The main issue is how do I tell if a face's material's texture is 'distorted' and needs this extra step... It would greatly improve my OBJexporter and some 3rd party tools I am involved with... TIG
Re: [Plugin] Normal Map Makersorry for the stupid question but...
1 - whats the advantage of normal map over bump and displacement maps (both of which can use the same grayscale bitmap)? 2 - VRAY doesnt use normal maps, does it?
Re: [Plugin] Normal Map Maker
http://www.spinquad.com/forums/showthre ... #post54371 a) is a bump map b) is a parallax/normal map c) is a relief map (normal map with self shadowing)
Not sure what V-Ray 2 does - but the version V-Ray for SketchUp currently use doesn't. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [Plugin] Normal Map Maker
http://forums.sketchucation.com/viewtopic.php?f=180&t=23947&hilit=distorted&start=60#p204899 Author of Thea Render for SketchUp
Re: [Plugin] Normal Map Maker
A bumpmap is like: Hey, change your normal (surface direction) by this grayscale amount! A normal map is more like: Yo, use this normal instead of your old one!
Re: [Plugin] Normal Map MakerI just downloaded and installed this plugin, but it doesn't seem to work, I am sure I missed something, nothing shows up in the plugins menu. Anybody have a step by step?
Re: [Plugin] Normal Map Maker
It doesn't work for me either
Re: [Plugin] Normal Map Makerhi, did you look in the right place?
UI.menu("File").add_item("Export normal map") john
SketchUcation One-Liner AdvertsKeyframe Animation plugin - animate your SketchUp model by adding movement to any object.
Premium Members get 20% discount!
39 posts
• Page 1 of 2 • 1, 2
|