Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

SculptGenMax for 3ds Max 9

Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
05-21-2007 15:08
*** Description ***

SculptGenMax is a lightweight script that allows users to create sculptie prims in 3ds Max and export them to Second Life.


*** Current Version ***

SculptGenMax will no longer be released as a standalone product.

It is now a part of Prim Composer.

http://liferain.com/downloads/primcomposer/


*** Features ***

-- Roundtrip workflow from 3ds Max to Second Life and back
-- Load sculptmaps from disk to import sculpties into 3ds Max
-- Create sculpties in 3ds Max and export them to Second Life
-- All sculptmap topologies supported: sphere, torus, plane, and cylinder
-- Editable Poly, Editable Mesh, and NURBS supported
-- Preserves UV Mapping — Baked textures work seamlessly


*** License ***

SculptGenMax is licensed under GPL3
Copywrite 2007 Shack Dougall

Abu Nasu
Code Monkey
Join date: 17 Jun 2006
Posts: 476
05-21-2007 17:18
Goodness. I can't wait to try this. I've been getting some weirdness with the material approach and I was thinking that a vertex approach might be better, but I don't know Max Script.

I will definitely be giving this a whirl.
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
05-21-2007 19:26
in Max5 get a "--Unknown property: "width" in BitmapControl:theCanvas" 15th line from the bottom. I know it is for 9 but thought what the hey.


Edit: Would you know it Beta is down right now.
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
05-21-2007 20:02
@Abu

Let me know how it works for you. If it's useful, I'll be glad to maintain it and maybe expand it.

@Gearsawe

Thanks for trying it. The place where it died is setting up the user interface Sounds like they've changed some of the UI framework.

And it does seem like Beta is down. Just tried to login and it said it was closed for maintenance.
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
05-22-2007 05:37
Works greats. woohoo. now I only have 21days left on my trial version of 9. next will have to try this on a 31 segmented spline set to 32 sides.
Michael Khalamov
Registered User
Join date: 19 Jul 2006
Posts: 12
05-22-2007 23:49
Works good so far but i have a few glitches at the endings even if i made sure trice that every closing vertics is on the same place. I added my resulting file here thou.

The test3.jpg is the result shown on the beta grid, test3.zip the tga file for it and test3.max.zip the file i made it from. Hopefuly it will help to analyse.

Cheers

Mike
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
05-23-2007 07:44
From: Michael Khalamov
Works good so far but i have a few glitches at the endings.


Hi, Mike!

It was very helpful to see the .max file. I'm not sure how it happened, but your cylinder is twisted along the z-axis. The generated sculptie is actually exactly what you have in your max file.

Look at the attached images for guidance. The first one is your model--as shown in 3ds max--and the second one is the way it should look.

hope this helps!

--Shack
Abu Nasu
Code Monkey
Join date: 17 Jun 2006
Posts: 476
05-23-2007 08:04
With thet announcement that sculpties are coming in this update, looks like i'm suddenly over-extended (again). I was hoping for another week or two, but nothing I can do about it. :sigh:


From: someone
-- 4) move the vertices in top row so that they are all centered on a single point.
-- do not use the scale function to do this. Instead change the coords of each vertex so
-- that they all have *exactly* the same position.


Have you tried using Reset X-Form?
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
05-23-2007 08:26
From: Abu Nasu

Have you tried using Reset X-Form?


No, I've never used it. I'm looking at the documentation, but I'm not sure how I would use it. I'd love to learn though. :)
Abu Nasu
Code Monkey
Join date: 17 Jun 2006
Posts: 476
05-23-2007 08:41
What it does is 'strip the scaling' done to a mesh. Actually, I think it strips all transforms, but scaling is the notorious one. Another example would be rotation problems when exporting to OBJ.

You should be able to delete the top and bottom caps, scale the verts down to a point, Reset X-Form, and then collapse the stack.

Instead of moving the verts to the same point manually.

I'm pretty sure it will work.
Um, yeah.
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
05-23-2007 09:12
it seems to be missing the second row of verts, can't figure it out . I will post my result later tonight. I don't get exactly what I make as compared with my old texture method.
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
Version 0.2.1 : Supports Proportional
05-23-2007 10:13
Just uploaded a new version 0.2.1. Get it from the OP.

This version adds a new checkbox called "Proportional".

If checked, the sculptie will be generated so that the dimensions are proportional. Without proportional, a long skinny thing will show up in SL as short and stubby. With proportional, it will look as expected.
Daten Thielt
Registered User
Join date: 1 Dec 2006
Posts: 104
05-23-2007 11:01
Ok i duno what im doing wrong but i folow the instructions in the script and turn the cilinder into the shape i want to generate and i get this

start.jpg is the cilinder i made
3ds is the shape i made from the cilinder
and Datens first sculptie is the texture that was generated

ingame it turns out like a kinda 360 fan lol
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
05-23-2007 11:05
From: Daten Thielt
Scrap that, was me not selecting it lol


Yep, I know. It's on my list to put a nice dialog in there. :)
Daten Thielt
Registered User
Join date: 1 Dec 2006
Posts: 104
05-23-2007 11:11
lol ive realy gota learn to make a new post instead of editing my odl ones <damn old forum administration wanting to keep me own forum down in size lol>

abouve is my latest problem
Daten Thielt
Registered User
Join date: 1 Dec 2006
Posts: 104
05-23-2007 11:32
okes i think ur just gona have to ignore me, ive been aplying an editable mesh not an edit mesh lol im such a dumbass
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
Version 0.2.2 : Rotation issues fixed
05-23-2007 15:47
Updated to Version 0.2.2

See the OP to download new version.

Fixed some issues dealing with scaling, translation, and rotation. Now, if you rotate the object in 3ds Max, the sculptie will be rotated as well. Also, the center of the sculptie is now aligned properly.

Reason: I was using the raw vertex values to generate the sculpties. Instead, I needed to translate them into world coords. Anyway, it's fixed!
Michael Khalamov
Registered User
Join date: 19 Jul 2006
Posts: 12
05-23-2007 16:16
i apreciate your cool work on this Shack, and yes i twistet the cylinder, befire it was looking like yours too, but i tried wo make a pillar for a building i plan actually on the life grid =) for this form i normaly would have to use 32 prims to make it look like this =).
Checking out your updatet version right now.

Edit:Add: WOOOOOOOOT Great work now they come out like they should be. *Gives Shack a clap on his shoulder* btw i was waiting nearly the whole beta for an Script for MAXScript =), very good work.

Btw. addig a possibility for other forms to render into an texture would be grat like boxes etc. and maybe getting away from this 32 limit =), dont know if this is possible, its just a guess.

Cheers
Mike
Pesho Replacement
Registered User
Join date: 22 Jun 2006
Posts: 8
05-23-2007 17:44
I also really appreciate the work put in this, since 3dsmax-sculpt exporting is very important to me. Just a few questions - have you looked at Qarl's script for Maya? Im sure it uses principles that you might find useful for (or possibly translate in) MAXScript. The Maya script apparently uses NURBS surface points instead of vertexes to gather its data and translate it to a flat texture. I also noticed it scales the object into a bounding box to fit the texture first.
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
05-23-2007 18:11
From: Pesho Replacement
have you looked at Qarl's script for Maya? Im sure it uses principles that you might find useful for (or possibly translate in) MAXScript. The Maya script apparently uses NURBS surface points instead of vertexes to gather its data and translate it to a flat texture. I also noticed it scales the object into a bounding box to fit the texture first.


Hi, Pesho!

No, I haven't looked at Qarl's script in any depth. I glanced at it, but since this is the first MAXScript that I've written and I'm not an expert at Max, I decided to do it the way that made intuitive sense to me.

The whole NURBS thing still has me confused. Other than the fact that Qarl uses them in his script, I can't see any similarity between NURBS and sculpties. Sculpties look much more like polygon meshes to me. NURBS-like behavior such as rounded corners is just the result of compression and rounding errors in the sculpt texture.

But eventually, I might modify the script to handle NURBS and more general meshes. It isn't on my near-term horizon though. As soon as the current implementation stabilizes, I'm going to focus most of my time on using it to build things.
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
Try it without "Smooth"
05-23-2007 22:52
From: Gearsawe Stonecutter
it seems to be missing the second row of verts, can't figure it out . I will post my result later tonight. I don't get exactly what I make as compared with my old texture method.


Not sure if this is what you're bumping into, Gearsawe, but I thought it was interesting enough to report about.

So, tonight I finally had some time to use SculptGenMax. I've mostly just been testing and coding up till now. I was working in Beta. I built a bucket or cup shape and tried several different settings: 64x64, 256x256, smooth, no smooth.

The resulting images are attached.

Two conclusions:

1) The resolution of the texture is still very important. A larger texture gives a much better result. Conventional wisdom on that is that a larger texture helps to combat some of the JPEG2000 compression artifacts. What is clear is that it makes a big difference.

2) SculptGenMax's smooth feature is not entirely useful. :) At low resolutions it destroys important detail, while at higher resolutions, it isn't needed.

For example, if you compare the two 64x64 textures: one with smooth and one without. The un-smoothed prim looks ragged. The smoothed one looks smooth, but it has lost part of the shape.

And if you compare the two 256x256 textures. The un-smoothed texture looks great--much better than either of the 64x64 textures. Whereas the smoothed one is not really any smoother and has lost some definition.

So, based on this. I'd say. Turn off smooth and use a higher resolution texture. But I'll do some more experiments tomorrow. :rolleyes:
Michael Khalamov
Registered User
Join date: 19 Jul 2006
Posts: 12
05-24-2007 15:29
Ok shack :) done some testing and goofing around today and got one thing very bad resultet, like before i attach the files here for you to look at =)

Settings:
256*256
no smooth
keep props

and for those who want to have a sculptet box i add an basefile here too i prepared for testing around =)

Cheers

Mike
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
05-24-2007 17:15
From: Michael Khalamov
Ok shack :) done some testing and goofing around today and got one thing very bad resultet, like before i attach the files here for you to look at =)

Settings:
256*256
no smooth
keep props


Wow! That *is* bad. :D

This is just about a worst case scenario for sculpties, but one thing that you can do in SculptGenMax is to turn off "proportional". Proportional has one nasty side effect. If one dimension is much greater than the others, then it has the effect of reducing the precision of the other dimensions.

If you turn off proportional, each dimension will use the full 8-bits of precision. In your case, it makes a big difference. It's still not great. But at least it becomes recognizable. LOL :)

Edit: of course, if you turn off proportional, you'll have to stretch it into shape after you rez it. BTW, this object is a great example to argue for both lossless and 16-bit.

Edit2: Just released a new version 0.3. Might help a little, but probably not. Turning off proportional is your best bet.
_____________________
Prim Composer for 3dsMax
-- complete offline builder for prims and sculpties in 3ds Max
http://liferain.com/downloads/primcomposer/

Hierarchical Prim Archive (HPA)
-- HPA is is a fully-documented, platform-independent specification for storing and transferring builds between Second Life-compatible platforms and tools.
https://liferain.com/projects/hpa
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
Version 0.3
05-24-2007 17:42
Just released Version 0.3. Download from OP.

1) You no longer have to move the top and bottom row to a single point when creating the initial object. If you've done that to conform with previous versions it will still work, but you don't *have* to do it.

2) defaults changed. "Smooth" now defaults to off. And the default resolution is 128x128.

3) Changed the way that the bitmap is generated slightly. Shifted pixels -1 in x and y. Seems to give a slightly smoother result. I made this change after reading Deanna Trollop's post here: link

Let me know if any of this causes problems.
_____________________
Prim Composer for 3dsMax
-- complete offline builder for prims and sculpties in 3ds Max
http://liferain.com/downloads/primcomposer/

Hierarchical Prim Archive (HPA)
-- HPA is is a fully-documented, platform-independent specification for storing and transferring builds between Second Life-compatible platforms and tools.
https://liferain.com/projects/hpa
Michael Khalamov
Registered User
Join date: 19 Jul 2006
Posts: 12
05-24-2007 18:27
Your my hero *lol* well I have to give in im sucking completely at MaxScript actually =)

I'll try it with props of and yes its a worst case =)) this was why i postet it =)

From: someone
-- Now, you can move the vertices any way that you like. If you move the top or bottom
-- vertices, make sure that you move all 32 vertices at the same time, so that they stay
-- together.


Does this still apply ?

Edit: Right it works better with props off, but still has its problems with this sculpt, you may wonder for what i make those worse sculpts, they are intended to being buildingparts for houses and so on. =)

Cheers

Mike
1 2 3 4 5