View Full Version : Modeling Random Cubes
mushir_q 10-15-2006, 01:56 AM Hi there,
Can anybody tel me how to model out such random placed cubes. If possible with the name(Pixel) as well. This is the image which i have found on internet while surfing and now i m really curious to model it .I tried greeble and vray displacement but didnt get xact result.
Please Do reply.
http://img90.imageshack.us/img90/7789/pixelng9.jpg (http://imageshack.us)
| |
gringer
10-15-2006, 03:56 AM
Hi there,
I wonder if there is some way to wire a noise map to the Y position of all the cubes at once?
If so, all you would need to do is create one cube, duplicate it to the right so it is right next to the original but make many copies at once. Now you have a long line of cubes. Duplicate all of the cubes in the other direction now (90 degrees) and you have a sheet of cubes.
If it IS possible to wire a noise map to their Y position, that would be super easy then.
Another way is to create a plane with many subdivisions. Make it non-renderable. Apply a noise map or displacement map to it, to get the vertices non-unform. Then use scatter (in MAX) to scatter a cube across the plane, by vertex. You may need to try different sized cubes to get everything fitting snugly, however the easiest way would be to make all the scattered cubes instances. Therefor tweaking the dimensions of only one would change them all.
I hope I made sense
Cheers :D
Hi there,
I wonder if there is some way to wire a noise map to the Y position of all the cubes at once?
If so, all you would need to do is create one cube, duplicate it to the right so it is right next to the original but make many copies at once. Now you have a long line of cubes. Duplicate all of the cubes in the other direction now (90 degrees) and you have a sheet of cubes.
If it IS possible to wire a noise map to their Y position, that would be super easy then.
Another way is to create a plane with many subdivisions. Make it non-renderable. Apply a noise map or displacement map to it, to get the vertices non-unform. Then use scatter (in MAX) to scatter a cube across the plane, by vertex. You may need to try different sized cubes to get everything fitting snugly, however the easiest way would be to make all the scattered cubes instances. Therefor tweaking the dimensions of only one would change them all.
I hope I made sense
Cheers :D
Umm you did, but the problem is there all using the same value on the noise map, so they'd all be the same height. Also im guessing your using the greyscale values to determine the height - you could just walk through a bitmap from left to right, top to bottom getting the greyscale value at every 10 pixel then build a box every 10th unit with the greyscale value at that point. It wouldnt take to long. Or you could do this:
for j = 1 to 100 do
(
n = (10*j-10)
for i = 1 to 100 do
(
r = random 1.0 10.0
b = box()
b.width = b.length = 10
b.pos = [(10*i-10),n,0]
b.height = r
)
)
something like that (ish)
or make a grid and do basically:
for f = 1 to $.faces.count do
(
r = random 1 10
extrude $.faces[f] r -- thats wrong syntax but you get the idea.
)
actually looking at the pic its even easier as there just offsets in position:
for i = 1 to 100 do
(
n = (i*10-10)
for g = 1 to 100 do
(
b = box()
b.height = b.length = b.width = 10
b.pos = [(g*10-10),n, (random 1 10)]
)
)
mushir_q
10-15-2006, 05:44 AM
Thanx for all ur replies and suggestions .
EEk I didnt understand ur scripting coz i m not familiar with scripting.
gringer. Thanx I am gonna tried with ur methid as well.
Waiting for more suggestions.
newellteapot
10-15-2006, 10:31 AM
I'm crap at scripting, so I always try to find alternative workarounds.
Why not simply using particles?
A particle system would also be useful in case you want to animate it (like the cubes arrive as a cloud and form the text, or viceversa) and is procedural and therefore flexible.
With the scatter the problem is that the objects would go one inside the other, but you can tell the particles to avoid each other:)
gringer
10-16-2006, 12:42 PM
Hey,
I got this result by using the 'displaced plane' method I was talking about before.
It was really easy. Create a plane. Give it a fair few sub-divisions (make sure that the sub-divisions form the shape of sqaure, roughly). Apply a displace modifier to the plane. Stick a noise map in the map slot. Drag a copy of the noise map into your material editor and create an instance. Set the strength on the displace modifier to something largish so you can see a result. Tweak the noise map until you can see that the vertices are displaced enough.
Create a cube. Go to the create panel, choose geometry, then compound objects from the drop down menu. Select scatter (with your newly created cube still selected). Choose the plane as the distribution object. Choose to displace it by 'every vertex'. Then untick perpendicular.
Then all you should need to do is tweak the dimensions of the cube and they should all change. (the default scatter setting is to create instances.)
I hope that gets you what you're after.
Cheers :D
mushir_q
10-16-2006, 06:52 PM
Tnax Gringer for your kind effort in making this. I am really glad after seeing your out put.
And ye I have got what i was looking for. Now its just a matter of setting the noise but thanx million to show me the right way.
God Bless You
Mushir
CGTalk Moderation
10-16-2006, 06:52 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.
vBulletin v3.0.5, Copyright ©2000-2009, Jelsoft Enterprises Ltd.