Brodie Geers Posted October 21, 2011 Share Posted October 21, 2011 I'm wondering if there's a best way for randomizing car paints across a lot of parking lots. Each car is one object with a multi/sub material. Right now I'm just doing it by hand but that will certainly limit the number of different colors to 15 or so. It'd be nice to have 50 different colors with different shades and hues and such but I can't think of a great way to do that. CG-Source's multitexture seems close but if it works for this function I can't figure it out. I've never used it before so maybe I'm just not understanding it. -Brodie Link to comment Share on other sites More sharing options...
BrianKitts Posted October 21, 2011 Share Posted October 21, 2011 replicate your multi/sub material and make a couple different variations, then grab all the cars that have that material and use the soulbourn script for randomize selection and grab a partial percentage and apply one of the color variations. It'll take you longer to make the materials then it will to populate them throughout the entire parking lot of cars. Link to comment Share on other sites More sharing options...
Brodie Geers Posted October 22, 2011 Author Share Posted October 22, 2011 If I understand you correctly it's actually a bit trickier than that. I think what you suggest would work well if sub material 1 was always chrome, 2 was always car paint, 3 glass, etc. But this isn't the case. In the Dosch cars the matID's aren't always the same so I have to go into each material for each car and find the car paint and replace it. -Brodie Link to comment Share on other sites More sharing options...
Itoosoft Posted October 22, 2011 Share Posted October 22, 2011 You would use Forest Lite, both to scatter the cars and randomize colors. In this way: 1) For each car model, replace the paint car texture with a "Forest Color" map. Turn on Override->Map->Random Values, and assign in the tint map a texture with the colors that you want to randomize (i used a Gradient Ramp in my test scene). 2) Create a Forest object and assign the car models to the Geometry List. 3) Scatter them as you like. You also can use the Custom Edit mode to place each car individually. I have attached a sample screenshot. Please feel free to ask me about the plugin if you need help. Link to comment Share on other sites More sharing options...
pailhead Posted October 24, 2011 Share Posted October 24, 2011 If I understand you correctly it's actually a bit trickier than that. I think what you suggest would work well if sub material 1 was always chrome, 2 was always car paint, 3 glass, etc. But this isn't the case. In the Dosch cars the matID's aren't always the same so I have to go into each material for each car and find the car paint and replace it. -Brodie It's within one car. If you copy the same car, it will have the same ids and same materials. You copy the material with it, except that you change #X into a different color. You would have to do this for each car model, if the ids are different. Link to comment Share on other sites More sharing options...
Chris62 Posted October 24, 2011 Share Posted October 24, 2011 Why not use the wire color render element, create masks for just the car bodies and do the color shift in Photoshop? Link to comment Share on other sites More sharing options...
Brodie Geers Posted October 24, 2011 Author Share Posted October 24, 2011 (edited) You would use Forest Lite, both to scatter the cars and randomize colors. In this way: 1) For each car model, replace the paint car texture with a "Forest Color" map. Turn on Override->Map->Random Values, and assign in the tint map a texture with the colors that you want to randomize (i used a Gradient Ramp in my test scene). 2) Create a Forest object and assign the car models to the Geometry List. 3) Scatter them as you like. You also can use the Custom Edit mode to place each car individually. I have attached a sample screenshot. Please feel free to ask me about the plugin if you need help. This seems like a good option but I'm not getting it to work. I tried to imitate your settings but my cars just come out white. Do they have to be scattered using the forest object in order to get this color variation? -Brodie Edit: after some more research this does seem to be the case which means it probably isn't ideal for me in this case as I'd pretty much have to place the cars manually (there are probably about 700 parking spaces and I already have objects in each space for using the Soulburn object replacer script). I'll probably take a look at this for when I do the vegetation later though. I really like this ability to tint the maps and add some variation. Edited October 24, 2011 by brodie_geers Link to comment Share on other sites More sharing options...
Brodie Geers Posted October 24, 2011 Author Share Posted October 24, 2011 Why not use the wire color render element, create masks for just the car bodies and do the color shift in Photoshop? This is for an animation. -Brodie Link to comment Share on other sites More sharing options...
Chris62 Posted October 24, 2011 Share Posted October 24, 2011 (edited) I see, sorry mate - well then, is rendering the cars separately an option? Perhaps you can assign a matte green and/or blue chroma color and key those out, and shift your hue post. Youll be compositing anyway correct? Edited October 24, 2011 by Chris62 Link to comment Share on other sites More sharing options...
Brodie Geers Posted October 24, 2011 Author Share Posted October 24, 2011 I will but I think we'll see how things go. I'm not very good in after effects. I'll try using the 18 colors I've got and see how it looks once I get them applied and scattered about. -Brodie Link to comment Share on other sites More sharing options...
Chris62 Posted October 24, 2011 Share Posted October 24, 2011 (edited) I see now why you have to do it this way since youre talking about an animation. How many different cars are cloned? And are you doing any post composting at all? Its really easy in AE. What you can do is have three different clones, red green and blue. Assign each body light material and everything else a black matte. Turn off GI, shadows reflections etc, and render out a self iluminated render element of just the car bodies. In AE, drag that layer into a new comp. Go to effects/keying/color key and use the eye dropper tool and select the cars you want to create a mask for. Then use the new masks over top your rgb cars and shift your hues. I always use AE or PS to post effects. It takes a lot less time and gives your more freedom. Render elements are the best tool for this kind of workflow. Edited October 24, 2011 by Chris62 Link to comment Share on other sites More sharing options...
pailhead Posted October 25, 2011 Share Posted October 25, 2011 What is wrong with the option that Brian and I suggested? Unless you've got 700 different cars with each with a different combination of IDs, it seems like a pretty easy and straightforward solution. Link to comment Share on other sites More sharing options...
Chris62 Posted October 25, 2011 Share Posted October 25, 2011 (edited) Nothing is wrong with his suggestion but I was under the impression with Brodie's reply that it wasn’t the case. I was just offering another solution. Sakes alive -- is it me or is there a general air of smugness, indifference, impatience and downright hostility on this forum? Ive been lurking for a few years w/o one post - I think i shoulda stayed in that mode. Edited October 25, 2011 by Chris62 Link to comment Share on other sites More sharing options...
Trick Posted October 25, 2011 Share Posted October 25, 2011 I don't know what Forest Lite can do, but with Forest Pro I placed thousands of chairs in theatres, cars on parking lots, etc. using a simple (triangle) polygon as object placer and using the Forest Color map as tint tool. Please look into this again, because some tools in this plugin are specially redeveloped just for these purposes Link to comment Share on other sites More sharing options...
Brodie Geers Posted October 25, 2011 Author Share Posted October 25, 2011 (edited) pail...The solution you mentioned is pretty much what I've gone with but it took quite a long time and manual labor. I have about 30 unique cars from Dosch with different material ID's (18-23 ID's per car) and Standard materials which are very generic. I found some Vray materials for aluminum, chrome, rubber, glass, etc. and had to apply them individually to each of the 30 cars in all the necessary places. Then I created 18 color variations of a car paint texture. I'd then create 2 copies of a car, sample the material from the first one, name it Mustang1, copy that material twice and give those unique names. Then I'd locate which material ID was the car paint material and replace it with one of my Vray car paint colors. Do that for all 3 materials and then apply the Mustang 2 and Mustang 3 materials to copied cars I'd made. Did this for all 30 cars so now I have 90 cars with 18 different colors distributed amongst them. In actuality I didn't quite figure the order until later and ran into some issues so it was even more time consuming for that but it's done now and I'm about to try scattering the cars. Overall, I think the process is fine but it required a lot of time for a minimal amount of variation. With only 18 colors it's easy to pick up on the fact that the same colors are used throughout, particularly for the brighter colors like blues, orange, and yellow. -Brodie Edited October 25, 2011 by brodie_geers Link to comment Share on other sites More sharing options...
Brodie Geers Posted October 25, 2011 Author Share Posted October 25, 2011 I don't know what Forest Lite can do, but with Forest Pro I placed thousands of chairs in theatres, cars on parking lots, etc. using a simple (triangle) polygon as object placer and using the Forest Color map as tint tool. Please look into this again, because some tools in this plugin are specially redeveloped just for these purposes I'm giving this another go. I'm seeing some options that might allow me to scatter the cars over my objects within Forest Lite rather than using the object replacer script. If you can give me any more detail one what method you used within Forest Pro to scatter the objects and maintain the proper rotation and such it might prove helpful. -Brodie Link to comment Share on other sites More sharing options...
Scott Schroeder Posted October 25, 2011 Share Posted October 25, 2011 pail...The solution you mentioned is pretty much what I've gone with but it took quite a long time and manual labor. I have about 30 unique cars from Dosch with different material ID's (18-23 ID's per car) and Standard materials which are very generic. I found some Vray materials for aluminum, chrome, rubber, glass, etc. and had to apply them individually to each of the 30 cars in all the necessary places. Then I created 18 color variations of a car paint texture. I'd then create 2 copies of a car, sample the material from the first one, name it Mustang1, copy that material twice and give those unique names. Then I'd locate which material ID was the car paint material and replace it with one of my Vray car paint colors. Do that for all 3 materials and then apply the Mustang 2 and Mustang 3 materials to copied cars I'd made. Did this for all 30 cars so now I have 90 cars with 18 different colors distributed amongst them. In actuality I didn't quite figure the order until later and ran into some issues so it was even more time consuming for that but it's done now and I'm about to try scattering the cars. Overall, I think the process is fine but it required a lot of time for a minimal amount of variation. With only 18 colors it's easy to pick up on the fact that the same colors are used throughout, particularly for the brighter colors like blues, orange, and yellow. -Brodie 18 colors is a bit of overkill for car paint. Sure you have your purples, yellows, and the sort of wilder colors. But take a look at any parking lot. You'll see a lot of blacks, whites, grays, and reds. Shoot most car manufactures these days only offer 6-8 colors per model. I'd more worry about randomizing the major colors, then sprinkle in a yellow or purple here and there. Make sure you are getting a good amount of visual reference so you know what you are shooting for. An easier way is to create your material variations globally. So, red, yellow, blue, etc. Make sure all Mat ID's are the exact same for each material and each different car. Then, go on scriptspot.com and look for a script called randomize material. What this will do is take the number of materials you want to randomize, say 8, and select the first 8 material slots and randomly apply those to your selected objects. It's much easier than creating multiple copies of the car, then scattering them. Scatter your cars first, then randomize your material via script. Embrace the scripting world! If your task seems too repetitive and long, really check into scriptspot and I'm sure someone has automated that process. It's okay if you have 3 white cars next to each other. Look at viz ref and any local parking lot. Creating render elements of the car paint obj ID and selecting those in post is indeed a great suggestion for a quick and dirty way to randomize all of your reds/whites/blues/etc just a bit without the need to overkill your materials. Link to comment Share on other sites More sharing options...
Brodie Geers Posted October 25, 2011 Author Share Posted October 25, 2011 18 colors is a bit of overkill for car paint. Sure you have your purples, yellows, and the sort of wilder colors. But take a look at any parking lot. You'll see a lot of blacks, whites, grays, and reds. Shoot most car manufactures these days only offer 6-8 colors per model. I'd more worry about randomizing the major colors, then sprinkle in a yellow or purple here and there. Make sure you are getting a good amount of visual reference so you know what you are shooting for. An easier way is to create your material variations globally. So, red, yellow, blue, etc. Make sure all Mat ID's are the exact same for each material and each different car. Then, go on scriptspot.com and look for a script called randomize material. What this will do is take the number of materials you want to randomize, say 8, and select the first 8 material slots and randomly apply those to your selected objects. It's much easier than creating multiple copies of the car, then scattering them. Scatter your cars first, then randomize your material via script. Embrace the scripting world! If your task seems too repetitive and long, really check into scriptspot and I'm sure someone has automated that process. It's okay if you have 3 white cars next to each other. Look at viz ref and any local parking lot. Creating render elements of the car paint obj ID and selecting those in post is indeed a great suggestion for a quick and dirty way to randomize all of your reds/whites/blues/etc just a bit without the need to overkill your materials. Well, maintaining matID's throughout isn't really a good option in this situation I don't think. All of the cars have unique materials in some slots. For example, the brake lights are textured with a map of that particular cars brake light/turn signal, reverse light assembly. Same goes for car logos and some other things. I could just replace those with a solid color - maybe it'd look ok for an animation but not ideal. Plus I'd have to go through all 30 cars and manually adjust all the matID's - doable but I'd like to avoid it. Of course with all the time I've invested maybe some more wouldn't hurt to much. I see what you're saying about all the neutral colors. I was thinking about that on the way home last night. I'd focused most of my 18 colors on the beige, gray, white, black variations but to even have 1/18th of the cars as orange is too much. I think I'll follow your suggestion to place those vibrant colors separately. No matter what 18 colors still doesn't seem like enough. I think what I'll do is tone back my colors so I've got 18 variations on the neutral colors and then add in a few red, yellow, blues and call it a day. I've spent too much time on this already. -Brodie Link to comment Share on other sites More sharing options...
Matt McDonald Posted October 25, 2011 Share Posted October 25, 2011 there's a nifty random color generator that is compatible with scanline and v-ray. It's free too. Unfortunately, I can't quite remember what it's called it was made by the multi-scatter or vray-scatter people (I think). With it, you dial in a percentage of hue shift or brightness shift, whatever... If you want more specific control you could use the "Multi/Sub-Map". It allows you to specifically set up to 20 colors and then applies them randomly. This is how we do our cars. Before you dive too far in to any of these random materials do a quick test to make sure the cars don't change color from frame to frame. Link to comment Share on other sites More sharing options...
pailhead Posted October 25, 2011 Share Posted October 25, 2011 (edited) Nothing is wrong with his suggestion but I was under the impression with Brodie's reply that it wasn’t the case. I was just offering another solution. Sakes alive -- is it me or is there a general air of smugness, indifference, impatience and downright hostility on this forum? Ive been lurking for a few years w/o one post - I think i shoulda stayed in that mode. I think it's just you, I wasn't being hostile, and my question was directed to OP. He seems to have abandoned a perfectly good solution, i was just wondering why, mostly because I may have not understood the original question. You sound like you took offense, and thought that my question was to you, as to why would you suggest an alternative to my suggestion. *edit* Wow, i had no idea you had 30 different cars, and you wanted 18 variations each. Do you really need every car to have a unique color? Even if you populate all 700 spots, almost 80% of your cars will be unique. I definitely support scripting, but when you are pressed with a deadline and have a live project, unless you've got some previous experience you have to do things manually. Edited October 25, 2011 by pailhead Link to comment Share on other sites More sharing options...
Brodie Geers Posted October 25, 2011 Author Share Posted October 25, 2011 You misunderstood slightly or I mis-spoke. I've got 18 colors total. Those colors are being dispersed throughout all of the cars in the lot. I would have liked more unique colors if it were a simple solution, but I didn't find one in time (the forest lite solution may have helped but I'd put too much work into the current solution by the time I realized that might work). I was a bit off in my numbers too. After randomly deleting spaces and such I'm at about 1700 cars all together. I took my original 90 cars (30 unique cars copied 3 times) and applied mostly just neutral colors and a few variations of red to them. Then I copied about 6 of those down and applied a couple variations of yellow, blue, and orange to those 6 cars. I brought them all into my scene, and turned them into vray proxies. After randomly deleting some of my placeholders from the spaces and doing a bit of random rotation I selected 5% of my spaces and replaced them with the yellow/blue/orange cars. Then I selected the remaining 95% of spaces and replaced them with the 90 neutral colored cars. It wasn't the sexiest solution but the result looks good at this point and I'm ready to move onto some other problem. -Brodie Link to comment Share on other sites More sharing options...
Victor Erthal Posted October 26, 2011 Share Posted October 26, 2011 if you are using v-ray, you can assign a v-ray multi-sub texture to the paint color. then assign the different v-ray colors to the slots under the v-ray multi-sub texture. the trick here is to switch from face ids to object ids. once you have this setup, you can run a simple script that randomizes the cars object id. The god thing about this process is that it does not disturb the face ids, so it can be easily used with proxies. I am sure mental ray has a similar kind of randomizing texture, but not 100% sure that it works with object ids. Let me know if this helps or if you need a more detailed process description. good luck Link to comment Share on other sites More sharing options...
Brodie Geers Posted October 26, 2011 Author Share Posted October 26, 2011 I'm pretty much set for this time but for next time I run into something like this it sounds like an interesting process. I'm still trying to wrap my arms around 3ds Max so a bit more detail would be great (I am using Vray, btw). How do I switch from face id's to object ids? So if you put 20 colors in the multi-sub material it will randomly choose one of those colors? I read something similar elsewhere but they were talking about some issue where everytime you hide the object(s) it resets the color randomization or something like that. Is that an issue with this process or did I maybe misunderstand? -Brodie Link to comment Share on other sites More sharing options...
Victor Erthal Posted October 26, 2011 Share Posted October 26, 2011 i have not had that issue of hiding the objects. The switching part is inside the v-ray multi-sub texture. by default it uses the face id to assign a different slot to it, but it had a drop dow menu where you can choose to use the object id instead. then you need to run a script to randomize the object g-buffer ids or simply change it by hand if there are just a few objects. I have used this for different purposes. you can use it inside a composite texture for the trees so that there is some slight variation on the leaves green intensity, or if you create a proxy for books in a library for example, you can randomize the ids and have infinite complexity on the shelves. Link to comment Share on other sites More sharing options...
Brodie Geers Posted October 26, 2011 Author Share Posted October 26, 2011 Interesting. You've mentioned 'vray multi/sub' a couple times now. So are you distinguishing that from the normal multi/sub material? Because I'm not seeing an option for vray multi/sub. -Brodie Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now