Jump to content

Model request


Josh
 Share

Recommended Posts

If anyone wants to make a desk like below, I will add a script to give it physics. The drawers should be separate pieces. A physics shape needs to be created for the desk and each size drawer you use. Each drawer can be a limb in the mesh file, with a name like drawer1, drawer2, etc. The pivot of the drawer should be in the center rear of the drawer. The drawer physics shape should consider this point the origin...the draw physics shape will be loaded from the .phy file and connected at this point with a slider joint, with limits. After I write the script, you will be able to grab the drawers in the editor and pull them open to see what is inside. :)

 

It might be easier to just make all the drawers the same, since it will probably be a little confusing to set up at first.

 

desk.jpg

 

This is what got me thinking about this:

http://www.youtube.com/watch?v=Ux4OwkS9ybA

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

ok. I modeled it last night at home. just some questions.

I could not exactely understand where to place drawers pivot point?

green one or red?

Desk_drawer_pivot.jpg

 

and should I export separate drawers and separate desk with their own .phy files?

what about LODs?

Omid Saadat

OD Arts Blog

 

AMD Phenom II X4 940 - Geforce 8800GTS - 4GB RAM - XP x86

AMD 6000+ - Geforce 9800 GT - 2GB RAM - XP x86 (Home pc)

Intel Core i7 - Geforce 310M - 4GB Ram - Win7 x64 (Laptop)

Link to comment
Share on other sites

ok. I modeled it last night at home. just some questions.

I could not exactely understand where to place drawers pivot point?

green one or red?

Desk_drawer_pivot.jpg

 

and should I export separate drawers and separate desk with their own .phy files?

what about LODs?

 

center of the green is what he asked. <_<

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Link to comment
Share on other sites

The green one is correct. Just make sure the pivot you add for the drawer in the desk model is in the same place.

 

The type of drawer should be a separate model, with a convex hull .phy file. If any drawers are the same, I can load another copy of the model.

 

Here's what I am going to do in code:

drawerpivot=object.model:FindChild("drawer")
drawer=LoadModel("abstract::furniture_desk_drawer1.gmf")
drawer:SetPosition(drawerpivot:GetPosition(1),1)
drawerjoint=CreateJointSlider(object.model,drawer,Vec3(0,0,1)
drawerjoint:SetLimits(0,0.6) --or whatever amount looks good

The doors in the tunnels scene will open like Penumbra if you just fly up to them in the editor, hold the shift key, and click and drag them with the mouse.

 

I would not worry about LOD at this point. Let's see if this even works first!

 

Looks pretty nice so far.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

It actually doesn't matter where on the drawer the pivot is, as long as the tag you place in the desk mesh matches the position of the drawer pivot, so the drawer appears in the right place.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

@VicToMeyeZR: thanks :) almost every one in this forum can speak and understand english better than me!

 

Model is ready.

there is 6 drawers as reference image, 4 of them are same but I exported them separately, because their pivot points would be different.

All Pivot points are same place

Physics are convex hull

Source Max file is included

 

Screenshots:

 

MetalDesk_Pic.JPG

MetalDesk_Pic2.JPG

 

Pivot poits:

 

MetalDesk_Pivot.JPG

 

Physics:

MetalDesk_phy.JPG

Download Source Max file

 

If there were mistakes or errors, let me know.

thanks.

Omid Saadat

OD Arts Blog

 

AMD Phenom II X4 940 - Geforce 8800GTS - 4GB RAM - XP x86

AMD 6000+ - Geforce 9800 GT - 2GB RAM - XP x86 (Home pc)

Intel Core i7 - Geforce 310M - 4GB Ram - Win7 x64 (Laptop)

Link to comment
Share on other sites

Looks fantastic Omid, really nice work :)

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

thanks Aggror. I know it should be better than this, but I tried to make it match with other objects in underground level.

 

@Josh.

it seems there is something wrong in Alex exporter. I will fix it using phygen and reupload.

one question: can we put something inside drawers using convex hull shape?

Omid Saadat

OD Arts Blog

 

AMD Phenom II X4 940 - Geforce 8800GTS - 4GB RAM - XP x86

AMD 6000+ - Geforce 9800 GT - 2GB RAM - XP x86 (Home pc)

Intel Core i7 - Geforce 310M - 4GB Ram - Win7 x64 (Laptop)

Link to comment
Share on other sites

Drawer 5 and 6 seem to still use triangle mesh collision, so I have them disabled for now. The drawers tend to droop a bit with gravity. This might be due to the way they are positioned. I created the slider joint at (0,0,0) since there are no pivots in the desk mesh to place them. I think the drawers should be centered at their rear center, and then a pivot added to the desk mesh I can use to position them. That might make the slider joint more accurate.

 

Here's the script:

require("scripts/class")

local class=CreateClass(...)

function class:CreateObject(model)
local object=self.super:CreateObject(model)

local joint
local n

object.model:SetMass(20)
object.model:SetCollisionType(COLLISION_PROP)

object.drawer={}
for n=1,4 do
	object.drawer[n]=LoadModel("abstract::0d_drawer_0"..n..".gmf",object.model)
	object.drawer[n]:SetMass(0.1)
	object.drawer[n]:SetCollisionType(COLLISION_PROP)
	joint=CreateJointSlider(object.model,object.drawer[n],Vec3(0,0,0),Vec3(0,0,1))
	joint:SetLimits(-0.5,0)
end

function object:Reset()
	local n
	for n=1,6 do
		if self.drawer[n]~=nil then
			self.drawer[n]:SetMatrix(self.model.mat)
		end
	end		
end

function object:Free()
	local n
	for n=1,6 do
		if self.drawer[n]~=nil then
			self.drawer[n]:Free()
			self.drawer[n]=nil
		end
	end
	self.super:Free()
end

end

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

oops :/

it seems I missed 5,6

should I change drawer pivot points to their rear center?

what about desk mesh pivot point?

I set all pivot point in same position for easier to place desk and drawers snap to one point with their correct posiotion.

Omid Saadat

OD Arts Blog

 

AMD Phenom II X4 940 - Geforce 8800GTS - 4GB RAM - XP x86

AMD 6000+ - Geforce 9800 GT - 2GB RAM - XP x86 (Home pc)

Intel Core i7 - Geforce 310M - 4GB Ram - Win7 x64 (Laptop)

Link to comment
Share on other sites

thanks, it seems more logical than my pivots!

its not hard to do it right now, its really hard to upload! so I think I should wait for Josh to confirm :lol:

Omid Saadat

OD Arts Blog

 

AMD Phenom II X4 940 - Geforce 8800GTS - 4GB RAM - XP x86

AMD 6000+ - Geforce 9800 GT - 2GB RAM - XP x86 (Home pc)

Intel Core i7 - Geforce 310M - 4GB Ram - Win7 x64 (Laptop)

Link to comment
Share on other sites

I know it should be better than this, but I tried to make it match with other objects in underground level.

Oh my GOD!! believe me, I did not mean, underground models are not good, or I can model better than underground models!!

I just spent more time to mach colors and contrast in textures :lol:

Omid Saadat

OD Arts Blog

 

AMD Phenom II X4 940 - Geforce 8800GTS - 4GB RAM - XP x86

AMD 6000+ - Geforce 9800 GT - 2GB RAM - XP x86 (Home pc)

Intel Core i7 - Geforce 310M - 4GB Ram - Win7 x64 (Laptop)

Link to comment
Share on other sites

Oh my GOD!! believe me, I did not mean, underground models are not good, or I can model better than underground models!!

I just spent more time to mach colors and contrast in textures :(

Blasphemy! :rolleyes:

 

Just kidding. ;)

 

The texturing looks really nice. It seems like it would fit in with a variety of scenes and not look out of place.

 

You can make a drawer shape out of multiple objects. Each object has to be a convex hull, but you can make the phy shape out of multiple convex hulls in one obj file.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

:)

You can make a drawer shape out of multiple objects. Each object has to be a convex hull, but you can make the phy shape out of multiple convex hulls in one obj file.

can you explain more? :unsure:

do you mean I should export drawer parts seperately and make convex hull phy for each part of each drawer? and how can I make the phy shape out of multiple convex hulls in one obj?

Omid Saadat

OD Arts Blog

 

AMD Phenom II X4 940 - Geforce 8800GTS - 4GB RAM - XP x86

AMD 6000+ - Geforce 9800 GT - 2GB RAM - XP x86 (Home pc)

Intel Core i7 - Geforce 310M - 4GB Ram - Win7 x64 (Laptop)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...