Patrefans
IanHubert from patreon
IanHubert patreon

Asset: v.1 Self-Generating Car (The AutoAuto)

🕑 Added 2021-03-28 02:04:34 +0000 UTC
Asset: v.1 Self-Generating Car (The AutoAuto)

Comments

Pablo Nicolas

Hi Ian! thank you for sharing this, this is an awesome technique :-) Super late to the party, I know, so maybe you'll never read this. Or maybe you already figured it out. But, anyways: To have the script imported automagically when you append the AutoAuto object you can: 1. add a "Script" node inside any one of the materials of the car. 2.set it to "Internal", and choose "AutoAutoCode.py" as the script. 3. It will complain because the script is not OSL, but it will become part of the object, and it will import as part of the car object anyways, and it will be available in the Text window to run ;-). https://ibb.co/XZMQ9vR I hope it helps. Thank you for all the awesomness!

Might ask a stupid question (only bcs i am a beginner), why am i able to use the optix denoiser and optix viewport ( in cycles) even though my graphics card shouldn't allow it? tried it before and didn 't work

Ian Hubert

Did you right click and select "Save Link As" or something like that?? Just clicking on it probably wouldn't work, yeah :/

Also, if anyone is having trouble with this .blend file (as I was) when I would pop over to rendered view it would just crash do the following to solve: 1. Open blender 2. Then go to the AutoAutoAsset.blend but before you open click the gear settings in top right and check "Trusted Source" This enables python script and basically lets the program run as intended. Not sure if this setting has changed in 2.93 or if everyone already knew this but figured I would comment to help out anyone else.

Legendary jollof

The save link is no responding😩

Don Hopkins

"AutoAutoCode.py" is hilarous and classic! The name for the original concept of a programming language was called "Autocode". (It was a generic term, not a particular language.) There was Glennie's Autocode, Mark I Autocode, Mercury Autocode (that sounds car oriented), EDSAC 2 Autocode (The Esdel of Autocode), and Atlas Autocode (for rocket scientists)! https://en.wikipedia.org/wiki/Autocode https://en.wikipedia.org/wiki/Atlas_Autocode

Ian Hubert

CARSTEN! I saw a notification for this post pop up and couldn't find it, and hadn't realized it was a comment here! I gotta go to bed now, but I'm excited to try this in the morning! If it works out, would you mind if I update the project file with it?? I feel like it'd be a lot more handy than the current system of everything appearing in the same spot.

Carsten Neumann

Hey Ian, this is so much fun! I'm not a real python pro, but I played around with your script and made it produce the cars in a x, y matrix. I also added some randomness to the individual (x-)position and z rotation. Hope this makes sense to someone! import bpy import random import mathutils #get a reference to the original Auto original = bpy.data.objects["AutoAuto"] x_copy = 10 y_copy = 4 x_jitter=0.3 y_jitter=0.2 x_distance=2.9 rot_jitter=0.05 def customize(car): keys=car.data.shape_keys.key_blocks for i in range(1,len(keys)): if i==1: keys[i].value=[-1,1][random.randint(0,1)] elif i<7: keys[i].value = random.uniform(-2,1) else: keys[i].value = random.uniform(-1,1) def make_car(x,y): # Duplicate the AutoAuto new_car = original.copy() new_car.data = original.data.copy() # Add car to active collectiona col_ref = bpy.context.view_layer.active_layer_collection.collection col_ref.objects.link(new_car) customize(new_car) #change location, add jitter new_car.location += mathutils.Vector((x_distance*(x+1)+random.uniform(-x_jitter,x_jitter),6*(y+1)+random.uniform(-y_jitter,y_jitter),0)) new_car.rotation_euler.rotate_axis('Z',random.uniform(-rot_jitter,rot_jitter)) #car factory loop : for i in range(y_copy): for j in range(x_copy): make_car(j,i)

Anderson Atlas

really nice. thank you! so much render time wasted in high-poly cars I had to stick in the background!

Tyler Adams

Flippin sweet bro!

Ian Hubert

OH HEY YEAH! Probably not with this same script, but I think you're right! It's a fairly basic series of steps (duplicate bird, offset each shape key animation a random value between, say, 1 and 200 frames). That would be a GREAT thing for me to try to experiment with (and save a lot of time, too).

how to rigging the car??

that's awesome ! Thanks a lot !

Ian Hubert

Ah thanks Dimitar! Yeah- definitely want to add more model varieties at some point in the future! I have a big freeway scene coming up, so that'll hopefully be a good catalyst for that :) And yeah!! I was trying to brainstorm roads a bit today; every technique I've used is always a bit of a hassle (combining repeating road textures with specific markings and having it all play nice without using HUGE uv maps and whatnot)- but I think I have a new way that might work better?? I'll share it here if it works out!

Thank you Hubert!

Dimitar

Super sweet! I've thought the same for a while that cars are either too high-res or too ugly for populating larger scenes! Could be nice to throw in the mix some SUVs and some more European-like cars with less beefy headlight designs. I would also be interested in a tutorial on your road texturing. I've found that sometimes the simplest things get the longest to get right - grass and asphalt, and all other surfaces

Nickolai bauer

I just realised that you actually talk about that offsetting shape keys to the birds isn't easy to do, but you wanted to do it so we could copy just one bird and do it again and again! Maybe python would be the way to do that!

Albert Wright

what a time to be alive!

Sam Morgan

Nice, cheers dude. It will go in my armoury to be called upon when people need cars:)

Sweet! Using the name for the colour seed - really handy hint thanks

please do some tutorials for crowdsim3d!

Pete Burges

Man, again: you could have stuck this on Blender market and coined it in, but you're giving it away to us for the price of a couple of coffees. Thank you. This is a truly useful and time saving asset for creating large populated scenes to an unrealistic deadline.

Definitely an exciting time for Blender users

Ian Hubert

I'd love to do that with clothing randomization and such!! Also- combining this type of workflow with geometry nodes could be RIDICULOUS. I've already seen people doing some crazy stuff with city generation and such. I'd love to try something like that :D. Really excited that Blender's finally getting these tools

This would be a cool way to generate other objects like People, buildings and houses, especially as background items.

One Word ... Brilliant !! Can't wait for two more papers down the line.

Jack Hodgson

Nice! BTW turning that flying cube into a fighter jet doing a low pass across the parking lot would be kinda cool.

I love the shapes these cars take. Very cool designs. Familiar but "foreign".

Drinking game: take a shot every time Ian takes his hat on or off. Bonus round for the flannel shirt.

Thanks Ian! This is going to be insanely useful!

Thanks Ian! Perfect timing

👌 awesomeeee;) sweet

Mark Curtis

Ian, as somebody who used to do arch-viz, sometimes for highway engineers, you have no idea how fantastic this is. The money I have spent on car model collections over the years is insane.

Ian Hubert

Ahahaha, thanks man! And I can't find where you posted the comment, but yeah! We should talk more about matching CG to footage! It almost always comes down to colorspace, and the fact that every color profile is different and all that, and honestly I still just eyeball it, mostly (there are MUCH better workflows out there, but they can also get really complex).

iain

Wow! Thanks Ian

Ian Hubert

It has one!! Under the "#Car Controls" material, in the Controller node! You can change the dirtiness slider. It's super rudimentary (controls some windshield dirt and some other subtle dirt on the body (I really was trying to not make the shaders take forever to complile- I'd love to go a bit more nuts at some point), but yeah! Try setting it to -1 or something (although looking at it now, the "dirt" looks a tad yellow).

Nickolai bauer

Just a thought for an upgrade - a dirt-amount controller. It would be nice to be able to make them dirtier - or maybe even some dents! I know it might take a lot of work - but you usually find a way to make a thing do what you want haha. very nice asset! Nice to know I can easily put cars in the background now, even though I feel like I should make everything myself.. But at least temporarily I can use these :D

Ian Hubert

Ah thanks David!! yeah! I want to make an actual honest-to-goodness tutorial, instead of just the asset, because I learned a ton (mostly: making a run-of-the-mill car wasn't as hard as I thought (although making a PROPER car, the way folks do with all the perfect details and all that, is still a huge huge feat).

Ian Hubert

He's so nice! And you YouTube channel is incredible. And seriously- I just asked, "Hey is this sort of thing even possible?" and he was like, "Yeah if you have this code I just wrote for you here you go".

Ian Hubert

Oh! Yeah it's there in the blend. Should open just like in the video :)

does this come with the pynthon scrip already or do i have to create my own?

William Landgren

My dude makes every asset even if you didn’t know you needed it

Awesomeeeee!!! That is so cool, i’m so excited to see this!

Jan van den Hemel

Awesome, thanks Ian (and Curtis!)

Ian Hubert

Ah yeah! So- I wanted to tackle a truck pretty soon, but the rest might have to wait until I properly start working on the scene these are going to be for (maybe not for a while??) I agree; definitely need more vehicle-type variety!

David

You made the tutorial! Ima so happy now =) Amazing as always my dude!

Fes

This is next level. Ian, do you think you'll get some non-sedan like vehicles in there as well, like SUVs, trucks, vans and mini-vans? That will break the uniformity up even more.

Ian, thank you for the inspiration! I've been learning Blender for about 2 months now and I've made some solid progress thanks to you! I'm a teacher at a primary school in Hong Kong. We do some pretty big scifi movie projects which usually take me about a year to complete! Up until now I've done all the VFX in AE, but since I found your videos we'll be trying a lot more ambitious projects! Thank you for the inspiration!

Kai Christensen

Ian, you're the bomb!

Brock

Thank you thank you!!!

Ian Hubert

That's what I felt! Between that and the mirror modifier, I really limited my options for what it could do, but in terms of adding a BUNCH of cars to a scene, keeping it lightweight felt like the most important goal- at least for now (I guess that'd be a good way to break it up, static cars, and heavier but more versatile rigged cars).

VideoSlice

dang what a cool tool! I'm glad you figured out the one single object thing, I think that makes it way more useful for quickly setting out hundreds of them, set it and forget it!

this is brilliant. some people don't think about it but cars are essential for backgrounds. this is definitively going to make my life easier.


More Creators