ScriptSpot

Script

Tyre Tire

By MrTom · 2013-08-11

Version
0.7
Version requirement
Built with Win7 / 3dsMax 2015 x64. Tested with 3dsMax 2013/2014/2015 Win7/8 x86/x64
Other software required
VRay (Any version that supports VRay displacement modifier)
Date updated
2014-11-30
Votes
15
Description

NOTE: Requires VRay (Uses VRay Displacement modifier).

This is intended as a 'head start' when creating Tyres (Tires), for vehicle wheels.
Still experimental and very much open to suggestions.

[ Click the thumbnails above for larger image ]

Should be fairly self-explanatory on how to use but just in case its needed the help section can be toggled by right-clicking the 'preview' area.

Feedback most welcome.
Cheers.

v0.7
TyreTire v0.7 is now completely FREE...Merry Christmas!
Yes, the trial period has been removed so its even more user friendly than ever.
If you've had problems getting the script to run before, please try v0.7.
Tested on:
3dsMax 2015 (17.0) SP2
VRay Adv 3.00.07

v0.6b
Fixed issues with mapping.
Fixed Map Dir Missing error.
Refined error checking.
Added 33%.
Tried to add profile scaling option when rim radius changed but failed on all accounts. If anyone knows how to scale the 'custom' shape of a sweep modifier via mxs with the same effect as manually scaling the spline sub-object of the profile..... and would care to share then I'll add it in.....meantime, I'm all out of ideas.

v0.5b
Fixed many issues with Windows 8.(Sorry Windows 8 Users, I didn't know it was that bad.)
Fixed height issue when changing 'tread depth' spinner.
Limited 'Rim Radius' spinner to zero or positive values only.
Fixed spinner 'Type in' method, should now work ok.
Slight change to 'Help' menu text.

v0.4b
Added error checking, now outputs to listener.
Fixed custom spline orientation bug.
Fixed profile movement when rim diameter changed.
Last used custom profile / map should now be retained.
Spinners now disabled until a tyre has been created.

v0.3b
Fixed HKey error. (Tested in Max 2014 on Win7 x64)
Swapped UI around for a more logical workflow.

v0.2b
Now checks for VRay installation.
Minor tweaks. Corrected 'help' error.

Additional Info

To Install: Unzip somewhere. Then either... 1: MAXScript > Run Script... 'TyreTire_FREE_v0.7.mse' or... 2: MAXScript > Run Script... 'TyreTire_FREE_v0.7.mcr' for the macro version, then... Customize > Customize UI > Category: MrTom ScriptName: F9 Tyre Tire IMPORTANT: 1: Custom 'profile' splines should to be created in the TOP viewport and in a CCW direction......ie, with vertex 1 on the right. This should keep the normals facing outward. You can edit the profile created by the script anyway which may be an easier option. 2: The image folder needs to stay with the script file for the script to load.
Attachments

Tags: Material, modifier, VRay, bicycle, tread, maps, car, wheel, displacement, motorcycle, tyre, tire, offroad, truck, cart, rubber

Comments (32)

bugmenot · 2016-09-18

It's so sad that Vray is required for this awsome script.

It would have been so nice if it worked directly with the scanline renderer or with MentalRay.

I have searched a bit but without luck, maybe someone here knows a Max Creation Graph that can do the same ? (perhaps)

Looks nice.

CJCA915 · 2014-12-07

Looks like a nice script, unfortunately, I don't have VRay. I'm a finalRender guy myself.

V-Ray

jackbear9 · 2014-09-22

Hi, MrTom

Can you provide me with a link to the correct V-Ray. I have tried and kept getting the error.

cam spline "key"

Nessus · 2014-07-22

I don't know if this is the correct place for this msg. I HAD a valid key for "cam spline" but now when I try to use it again I get an error msg "invalid key" this is txt msg I have for my key..which doesn't work anymore
key=D38E3A0A222BB7AD306E426EDD94B65AFE6217A4
can anyone help me solve this issue my email address is scooterabc@cox.net. Did my license expire? If so, how do I renew it?
thanks
howard w. seeber

Off-road

jastamos · 2013-09-28

What about motorcycle off-road (trial and motocross) presets?

Presets....

MrTom · 2013-09-28

Well the line has to be drawn somewhere otherwise I'd spend all my time creating every conceivable combination of profile / map possible.

The 'custom' pre-set is there for you to use your own profile and / or map.

You can even use one of the pre-set profiles with your own map...or your own profile with a pre-set map.....etc etc.

The whole script is only meant to give you a 'head start' when doing this type of modelling by automating the 'common' tasks and allowing a small amount of variation within them.

Regards.

error

onnavitsu · 2013-09-26

Windows 7 Ultimate Service Pack 1
3ds Max 2012 64bit (ver 14)
V_Ray_Adv_2_20_03
TyreTire v0.6b

Check TTtint...
Rhubarb...OK
Custard...OK
Check TTtint...OK
Check renderer...OK
Check Map Dir...OK
Check Itat...
Get Figs...OK
Check Itat...data parsed OK
Do UIC...TEMPORARY ERROR PLEASE TRY AGAIN

Do LogFile...OK

Please mail the above details to:

mrtom@fn-9.com

Thanks.

Temporary error.

MrTom · 2013-09-27

Hi Onnavitsu.

This is just a temporary error, probably caused by the way I've coded the script, doh!

Just run the script again, it should work.....hopefully clearing itself in the process.

If you continue to receive errors of this nature then I'll look into it further, but running the script a second (or maybe a third) time should be enough.

Sorry for the sloppy code....(but it IS still experimental)

Regards.
MrTom.

Scaling solved

MrTom · 2013-09-21

Thanks Barigazy, I keep forgetting Scriptspot has a forum.

As it happens I've solved the scaling issue now.....I've used a Linked XForm on the profile. I just need to add some 'back-up' code in case the profile gets deleted but once thats done I should be able to add it into the UI.

Cheers.

barigazy · 2013-09-21

Yup. Scriptspot have one of the best forum (mxs related).
To backup profile u can use


$.sweep.extractCustomSection()

But you already knows that.
I wrote custom fn for that


fn extractSweepSection mody = if isKindOf mody sweep do
(
	local customSection
	if isValidNode (customSection = getNodeByName mody.CustomShapeName) then customSection else
	(
		customSection = if mody.shapes[1] != undefined do (splineshape baseobject:mody.shapes[1])
		if customSection != undefined do mody.shapes[1] = customSection 
	) ; customSection
)
extractSweepSection $.sweep

About scaling spline issue I have more elegant solution (without modifiers)
But as I said earlier this is not place for discussion :)

barigazy · 2013-09-21

Are you planning to add mental ray support. Height and 3D displacement map are quete powerful. I also love cebas finalRender displacement modifier which pretty much works as VRayDisplaceMod but also have viewport preview.
I use VRay for most of my projects, but for small projects mental ray can produce soume outstanding results. This is what I done four years ago in mr, when I have free time I will try to remake this with your tool and VRay
Concept Mitsubishi rim Yokohama Tire
Wheels
Concept Mitsubishi rim Toyo Tire
Wheels1
Regards!

Mr Support.

MrTom · 2013-09-27

Hi barigazy.

I don't, and never have, used mental ray, been a VRay person from day 1.....many moons ago.

If I get "this" version good enough to release, and if people are interested then sure, I'll add in mental ray support.

I've had e-mails from [potential] users stating the script doesn't work only to read in their listener output that VRay isn't even installed so maybe the need for mental ray support is already there? I dunno.

Anyways, thanks for the script snippet.....that was exactly the way I was going with this.....only not quite so elegant.....it still amazes me that the code you need for something is never the code stated in the mxs docs, but some other 'variation' of it....which is NOT in the mxs docs! Its a wonder anyone ever codes anything really!

I'll start a forum thread.

Regards.

barigazy · 2013-09-27

I've already answered:)

Result

Gus · 2013-09-06

I followed all the steps, but the result is this
not render, texture
I have to manually map

Attachments

Curiouser and curiouser said Alice!

MrTom · 2013-09-06

Hi Gus.

Can you run the script again (no need to render) but run it with the Maxscript Listener open.

It should tell you exactly whats going on and if there are any any errors.

If the text is red then there is an error and the word ERROR should be shown somewhere in the list.

Copy and paste ALL of the Listener text into an e-mail and send it to me.

Just before you do that, just make sure that ALL the files/folders in the downloaded zip are in the same folder/directory......it looks like they are as you didn't get a warning and the preview is ok but just to be sure.

Also make sure VRay is the render engine......again you should get a warning if it isn't and the option to set it.

Also check the VRay Displacement Modifier has been added to the top of the stack and that 'Use object mtl' is checked.

I really appreciate your feedback on this.....its the only way of knowing about problems like this......I just need to be able to replicate the problem in order to find a solution.

It is a strange one though.

PS. What version of VRay are you using?

Regards.

Tyre Tire v0.6b

MrTom · 2013-09-20

This version hopefully fixes a few issues regards the mapping of the images and errors finding the pre-set image directory.

If you have had issues with the script not opening because of a missing map directory this should fix it....fingers crossed.

I've also tried to add an option to scale the profile when the rim radius is changed. I failed dismally but will endeavour to add that option somehow....sometime.

Regards.

barigazy · 2013-09-20

Hey MrTom you can at least open new thread on the forum about scaling issue
and we can discuss there. But you also need to provide some screenshoots

Mission Impossible!

MrTom · 2013-09-06

Not sure what you're doing here Gus but there is no way those settings could possibly give you those renders......and just what have you done to the material?

To highlight my point look at the 'Tiling' value for 'V'. In one its 0.7 and in the other its 0.5. This value controls how many times the 'map' is repeated AROUND the circumference of the tyre....which is why the spinner for this mapping in my rollout is constrained to an integer, (whole number). You see why 0.7 or 0.5 couldn't possibly give you the result in your image?

The rollout spinners are not controlled by the material editor as there seems little point....there is no need to change the mapping, (tiling), in the material editor if the tyre object still has focus with the rollout. Once it loses focus the rollout has no further control on the object anyway.

To make it absolutely clear.....you do not 'NEED' to change anything once the tyre is created....that's the whole point of the script...it does it all for you....it creates the tyre object, adds a displacement modifier, creates a rubber material, applies that material to the object, adds mapping coords, tiles the mapping AND adjusts the object height to allow for the tread depth, (so when rendered the tyre sits on the ground.)

That said, the presets I have done use generic values, so, the option to 'tweak' a few parameters is an option in the rollout to make things easier. In other words you don't have to go to the command panel or the material editor just to change the rim size or the mapping.....for example.

To put all that another way, this works 'out-of-the-box'.

Try this...

1. Download the scene attached and open it. (Max 2010 or later)
2. Run the script.
3. Click the 'Create Tyre Tire' button.

[OPTIONAL]...
Change the 'Mapping U:' value to 1.9

4. Make sure the 'Perspective' viewport is active....and....
5. Render the scene.

You should get something half-decent.

No need for you to dig away in the material editor! (Unless you think my rubber material really sucks and you want to change it....which is understandable :) )

You will however have to change things in the command panel and the material editor once the object loses focus.....in other words if you create more than one tyre and later decide to change the first one you WILL have to do this via the command panel and the material editor.

Regards.

Attachments

Thanks tutorial

Gus · 2013-09-05

my parameters car (Image)
Thank you MrTom fantastic script
Now I try with other tires
Regards

Attachments

Problem Map

Gus · 2013-09-04

I am a beginner can make a tutorial (Max 2014)
Thanks

Attachments

Tutorial:

MrTom · 2013-09-05

There's really not much to it...

1. Run Script.
2. Select a preset 'tyre'. [Default: Car]
3. Choose if you want the material to go into slot 24. [Default: yes]
4. Click 'Create Tyre-Tire'.

Thats it.

You can 'tweak' the preset if it's not quite how you want it, (and I doubt it will be), or just leave it as-is.

You can choose your own 'Profile' and 'Map' too if the none of the presets suit your needs.....which again can be 'tweaked' after you create the tyre.

By the look of the screen-shot you've already done all this so I'm failing to see exactly what it is you're having a problem with.

Regards.

v0.4b

MrTom · 2013-08-27

I've now added some basic error checking. Whilst this wont necessarily fix the problems it should make it easier to see why some people are getting errors.

If an error is detected it will show in the listener as 'ERROR' and in red.

Should you get an error you can now copy and paste the listener text into an e-mail and send it to me.

It may not detect everything but if you suspect an error then at least it should make easier to track down with the listener text.

Other minor changes include disabling the spinners until a tyre has been created, and any custom profiles or maps should now be retained if you switch to a preset and then back to custom.

Cheers.

Problem

oknglr · 2013-08-27

İs it just run with max 2013 ?

İhave the same problem ,like yusuf_es

Working!

Yusuf_ES · 2013-08-24

Hello Mr.Tom.
This error showing my workstation pc at office. Then, i try to run script my home pc. Script run perfectly. Showing "Hkey" messages. But, i ignore it. :)

Script really great. Tire "ngon" options very good. İ like it. :)

my Office computer problem.
What are the system specs?
- 3dsmax 2011 and sp1 pack installed.
Do you have VRay installed?
- Yes. Vray 2.40 installed. and assign to renderer. (But i try to run your script at home with 3dsmax 2013, vray 2.40, but renderer assigned "default scanline line" run the script showing messages "Do you want assign renderer vray?" Yes and switch to vray renderer and run the script. May be same thing work Office pc. i will try this)
What did you do just before the error that every other user doesn't do?
- Nothing. Reset to max. Fresh viewport and goto maxscript > run script
Can you do it again and take a screen grab?
- ok, i will.

Good script!

Yusuf_ES · 2013-08-23

MrTom very good script, but i can't run.

--Syntax error: at keyword parameter, expected name
--In line:

MrTom · 2013-08-23

Sorry to hear it's not working for you.

I'll look into it but I'll need more detailed info from you first......that error could of occurred anywhere at any-time....

What are the system specs?
Do you have VRay installed?
What did you do just before the error that every other user doesn't do?
Can you do it again and take a screen grab?
Etc....etc....

Regards.

Nice script but...

Shane Bekker · 2013-08-18

I tried running either version on 3DSMax Design 2014 and get the following errors:

When i run the script: Type error: HKey requires HKey, got undefined

Then when i dismiss that and hit Create Tyre Tire: Unable to convert: undefined type: Filename

CHeers

Damn and blast!

MrTom · 2013-08-18

I was aware of that problem and thought I'd dealt with it....obviously not!

I'll have another look.

Thanks for the feedback, very much appreciated.

PS.....would you mind telling me what the system specs are for that error?

Thanks.

v0.2b

MrTom · 2013-08-17

Thanks for the comments so far.....never thought of it as being a 'fun' script but yeah, great.

v0.2b is a minor change just to check VRay is installed before use.
Also added ver number in title.

Michele71 · 2013-08-13

Very fun and helpful script! Thanks for sharing :)

obaida · 2013-08-12

Nice script , thank you .
i didn't test it yet , but sure i will .