1998Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: How to represent a 3d object... -->
<!--X-From-R13: Ayvire Xbjrgg <byvireNwbjrgg.znanjngh.cynarg.pb.am> -->
<!--X-Date: Tue, 24 Apr 1998 17:48:05 &#45;0700 -->
<!--X-Message-Id: Pine.LNX.3.95.980425173653.9307A&#45;100000#pyrolisk,ip.local -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: E0ySuwe&#45;0000hq&#45;00#emu,kanga.nu -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: How to represent a 3d object...</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:oliver#jowett,manawatu.planet.co.nz">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00637.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00684.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00654.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00726.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00675">Author</A>
&nbsp;|&nbsp;<A HREF="#00675">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00675">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: How to represent a 3d object...</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] Re: How to represent a 3d object...</LI>
<LI><em>From</em>: Oliver Jowett &lt;<A HREF="mailto:oliver#jowett,manawatu.planet.co.nz">oliver#jowett,manawatu.planet.co.nz</A>&gt;</LI>
<LI><em>Date</em>: Sat, 25 Apr 1998 18:20:42 +1200 (NZST)</LI>
<LI><em>Delivery-date</em>: Tue Apr 24 17:48:07 1998</LI>
<LI><em>Delivery-date</em>: Tue, 24 Apr 1998 17:48:07 -0700</LI>
<LI><em>Envelope-to</em>: claw#kanga,nu</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: "Petidomo List Agent,,,," &lt;<A HREF="mailto:petidomo#kanga,nu">petidomo#kanga,nu</A>&gt;</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Fri, 24 Apr 1998, Ben Greear wrote:

&gt; I am thinking about how to represent a 3d object in a 3d world.

[...]

&gt; I envision the object as a collections of intersections (nodes) and faces. 

&gt; The two big questions are:  what kind of data structure should I use for
&gt; in-memory storage, and how to encode this for storage in a persistant
&gt; storage mechanism.

&gt; There must be some standard way of representing this on disk, does anyone
&gt; have any pointers??

A few comments on in-memory formats (be warned, I last looked at this
about 3 years ago):

You can represent the object as a list of vertex locations (nodes), with
the faces being defined as a list of vertex references in some particular
order around the face (so the normal is well-defined). Normally (no pun
intended) you'd precompute the normals of each face to speed things up.
Having the normal ready can help with hidden-face removal, and also speeds
up various shading models if you feel so inclined. 

Store the object untransformed, with location/orientation/scale/etc info
separate. It's likely that you'll be changing these parameters frequently
(otherwise: why not just use a static bitmap?) and roundoff errors are a
real killer, unless you really want the Incredible Shrinking Object. This
also makes having multiple instances of a model in different locations
easy.

You'll probably want some sort of bounding box information if the object
is part of a larger world - x/y/z extent information may well be enough if
you don't have obscurely-shaped objects. Very useful for optimizing
display, and for collision detection etc.

There's a large amount of information available on ways to display 3d
objects, which affects how you want to store the data internally -
IIRC the comp.graphics (.algorithms?) FAQ has good references to this
type of thing.

A search dug up &lt;URL:<A  HREF="http://www.dcs.ed.ac.uk/~mxr/gfx/3d-hi.html">http://www.dcs.ed.ac.uk/~mxr/gfx/3d-hi.html</A>&gt; which
has quite a list of 3d storage formats. You may want to look at one of the
binary object formats for DB storage - OFF seems promising from a quick
glance through. 3d formats tend to like representing complete scenes made
up of lots of objects with huge piles of surface information, so your main
problem may be finding a simple format :)

Question: what environment is this aimed at? Some way to visualise a
particular object (and/or manipulate it) - ie. you're only displaying the
object itself? Hm, this could be a relatively cheap addon to an otherwise
non-3d system - a nice way to visualise and interact with objects carried,
etc.

"Interesting, a strange metallic sphere with three buttons in a triangle
on the top. I wonder what happens if I push the red one. &lt;click&gt; .. I
don't think the way it started flashing is a good thi--"

&lt;boom&gt;

Or are you aiming at displaying an object within a larger 3d world also
containing other objects / walls / avatars / etc?

-O


-- 
MUD-Dev: Advancing an unrealised future.
</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00726" HREF="msg00726.html">[MUD-Dev] Re: How to represent a 3d object...</A></strong>
<ul compact><li><em>From:</em> Ben Greear &lt;greear#cyberhighway,net&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00654" HREF="msg00654.html">[MUD-Dev] How to represent a 3d object...</A></STRONG>
<UL><LI><EM>From:</EM> Ben Greear &lt;greear#cyberhighway,net&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00637.html">[MUD-Dev] Re: (fwd) AD: [custom graphical] whitestar Crossfire MUD</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00684.html">[MUD-Dev] Re: (fwd) AD: [custom graphical] whitestar Crossfire MUD</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00654.html">[MUD-Dev] How to represent a 3d object...</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00726.html">[MUD-Dev] Re: How to represent a 3d object...</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00675"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00675"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>[MUD-Dev] Motivations (was something else...)</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00401" HREF="msg00401.html">[MUD-Dev] Motivations (was something else...)</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Tue 05 May 1998, 15:55 GMT
<UL>
<LI><strong><A NAME="00403" HREF="msg00403.html">[MUD-Dev] Re: Motivations (was something else...)</A></strong>, 
Richard Woolcock <a href="mailto:KaVir#dial,pipex.com">KaVir#dial,pipex.com</a>, Tue 05 May 1998, 16:39 GMT
</LI>
</UL>
</LI>
</ul>
<LI><strong><A NAME="00358" HREF="msg00358.html">[MUD-Dev] Re: (fwd) AD: [custom graphical] whitestar Crossfire MUD</A></strong>, 
Jay Sax <a href="mailto:cimri1#gte,net">cimri1#gte,net</a>, Mon 04 May 1998, 10:16 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="00654" HREF="msg00654.html">[MUD-Dev] How to represent a 3d object...</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Sat 25 Apr 1998, 02:44 GMT
<UL>
<LI><strong><A NAME="00675" HREF="msg00675.html">[MUD-Dev] Re: How to represent a 3d object...</A></strong>, 
Oliver Jowett <a href="mailto:oliver#jowett,manawatu.planet.co.nz">oliver#jowett,manawatu.planet.co.nz</a>, Sat 25 Apr 1998, 00:48 GMT
<UL>
<LI><strong><A NAME="00726" HREF="msg00726.html">[MUD-Dev] Re: How to represent a 3d object...</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Sun 26 Apr 1998, 04:14 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00242" HREF="msg00242.html">[MUD-Dev] Re: How to represent a 3d object...</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 29 Apr 1998, 22:49 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00663" HREF="msg00663.html">[MUD-Dev] Re: MAPPING: Creating a bitmaped graphic from map</A></strong>, 
John Bertoglio <a href="mailto:alexb#internetcds,com">alexb#internetcds,com</a>, Sat 25 Apr 1998, 01:20 GMT
<LI><strong><A NAME="00620" HREF="msg00620.html">[MUD-Dev] (fwd) AD: [custom graphical] whitestar Crossfire MUD</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Fri 24 Apr 1998, 18:29 GMT
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>