PDA

View Full Version : creating new primitive shapes


abyjoe
12-20-2007, 02:12 PM
any way is it possible to create new primitives ???

Jon-Huhn
12-20-2007, 02:51 PM
You mean like box() ?

abyjoe
12-20-2007, 03:21 PM
yes like the box, cylinder i want to create a new shape. HOW and WHY NOT???

PEN
12-20-2007, 03:45 PM
What are you after, can you be way more specific? Do you want to write your own geometry plugins of just make a box.

MoonDoggie
12-20-2007, 03:51 PM
just type


box()



in the listener window...or if you have arguments like the position, scale do


box name:"myBox" pos:[10,10,10]

abyjoe
12-20-2007, 04:15 PM
just like the box, or any other primitive i want to create my own shape... like a teapot is unique primitive, is there a way to create a primitive of different shape.... the idea is it cant be an editable mesh or editable poly, it has to be a primitive

DigitalNeutrinos
12-20-2007, 06:17 PM
Im sure maybe someone here will clarify but i think you will have to write a ms script and start it out like so:


plugin simpleObject yourobjectname
name:"yourobjectname"
classID:#(0x7b7c5748, 0x4e27ef3f)
--genClassID()
--#(63445,55332)

and end it like so?

)--tool create

)--plugin simpleObject yourobjectname


and place it it here
\stdplugs\stdscripts



your fellow Newb :)

PEN
12-20-2007, 06:22 PM
DigitalNeutrino is correct, you will have write your own scripted plugin. Lots of information in the help to get you started.

abyjoe
12-21-2007, 09:32 AM
ok thanks for heads up guys... i will post back as soon as i have found something... when you say scripted plugin does it mean maxscript itself is not enough for it and I need the max SDK to do it ???

Bobo
12-21-2007, 09:46 AM
ok thanks for heads up guys... i will post back as soon as i have found something... when you say scripted plugin does it mean maxscript itself is not enough for it and I need the max SDK to do it ???

No we don't. Since Max 3, one can write plugins in pure MAXScript, or extend existing C++/SDK plugins with MAXScript UIs. Especially simple geometry plugins (where you can build your own meshes) and simple modifiers (where you can deform meshes in a gizmo space without changing topology the way Bend and Twist do) are rather simple to develop. They will be slightly slower than SDK plugins ("slightly" might mean orders of magnitude, but they are still usable for most cases) but so much faster to develop.

martinB
12-28-2007, 01:50 PM
You could also try an old script of mine: Plug-O-Matic
http://scripts.breidt.net/#plugomatic

It will take an editable mesh and turn it into a new object type. Unfortunately, this does not work for shapes, as scripted shapes have very limited support in MAXScript, if I am not mistaken.

-- MartinB

abyjoe
02-08-2008, 01:48 PM
thanks a lot bobo... all this while i thought plugin == sdk... will get on this now. martin thanx for pointing me towards ur script.. its exactly what i was after...

abyjoe
02-08-2008, 03:10 PM
i tried this and it works... thanks again... before I can use this i need to make sure i understand whats happening and add so custom features to it...

i am doing quite a few tests and it doesnt let me override an existing primitive name that I create with this script... i can replace the file but while installing it gives me an error... ???

focomoso
02-08-2008, 09:04 PM
If I follow you right, you need to change the classID. This is unique for every plug-in so if you change what the plug-in extents, you need to change the id. Type genclassid() into the listener to get a new one.

CGTalk Moderation
02-08-2008, 09:04 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.