aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs/common/objects.txt
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-03-07 17:41:23 +1000
committerDavid Walter Seikel2016-03-07 17:41:23 +1000
commitbf76409afc7b498d0e7dce041afde9e1d985a95b (patch)
tree1f4d09f22f8c5ee34e81dead009ca405737911eb /docs/common/objects.txt
parentAdded LunaCy ideas. (diff)
downloadSledjHamr-bf76409afc7b498d0e7dce041afde9e1d985a95b.zip
SledjHamr-bf76409afc7b498d0e7dce041afde9e1d985a95b.tar.gz
SledjHamr-bf76409afc7b498d0e7dce041afde9e1d985a95b.tar.bz2
SledjHamr-bf76409afc7b498d0e7dce041afde9e1d985a95b.tar.xz
Added text of dubious quality about in world objects.
Diffstat (limited to '')
-rw-r--r--docs/common/objects.txt556
1 files changed, 556 insertions, 0 deletions
diff --git a/docs/common/objects.txt b/docs/common/objects.txt
new file mode 100644
index 0000000..236a035
--- /dev/null
+++ b/docs/common/objects.txt
@@ -0,0 +1,556 @@
1Some very rough notes on what sorts of in world objects SL and OS have,
2and how to get there.
3
4
5--------------------------------------------------------------
6--------------------------------------------------------------
7
8Various forms of in world objects, mostly coz SL, but with extensions -
9 (+ marks an extension)
10
11terrains
12 height map, raw texture file
13 "onefangWorld 1.r32" is 262144 bytes in size. 13 channels * 256x256x256 levels. Except 262144 bytes is 4 channels of 256x256 bytes.
14 height * (multiplier / 128)
15 the above is quoted from a web page, but I would do the mutiply first
16 channel 1 height in meters
17 channel 2 height multiplier
18 channel 3 water height, only one height in SL per sim, so the first one is taken
19 channel 4 land map?
20 top is north, right is east
21 "interleaved" might be a problem, how is it interleaved?
22 4 x (texture, low and high elevation)
23 + optional seed for randomly generating the same texture
24 + 1 x texture, a pre baked high res texture
25 + allow in world painting that baked texture, using layers from the four textures
26 front door (landing point)
27 + security system / door bell
28 + each world has one or more of these, all the other objects are attached to a terrain
29 + will have to deal with there being only a tiny one, squashed down to get rid of it
30
31sea, sky
32 sea level, colour / shader, refraction, reflection
33 sky colour / shader, sun, moon, clouds, fog, stars, etc.
34 sun light (directional and ambient light)
35 + moon and star light
36 + sun / moon / star light obscured by clouds
37 shadows
38 wind, wind sound
39 + rain, snow, weather, climate
40 day cycle, time of day
41 LightShare/WindLight (LS/WL)
42 + and the various ways of encoding this in various places as hacks
43 + more generic shader handling?
44 + water as height map, handle the same as terrain
45 + smart water, splashes, waves, foam, flows, smart bubbles, mist, smart water sounds
46
47LL grass / trees
48 a texture and a very small xml file
49 + let users edit these
50
51avatars
52 shape, skin, eyes, hair (non prim), alpha / clothes / make up / tattoo layers
53 skeleton
54 + editable skeleton
55 baked avatar, client side AND server side
56 attachments
57 bald / shoe base
58 mesh avatars
59 avatar's camera as separate steerable object
60 coz look at and point at need in world objects
61 NPCs are just avatars
62
63BVH animations
64 simple sits
65 AO, swimmer, MLP
66 + BVJ + IAE
67
68primitives
69 box, cylinder, prism, sphere, torus, tube, ring
70 EFL - none, square, cube, cylinder, cone, sphere, torus, surface, terrain
71 none - an empty space
72 surface - pass in a function to set 3D points from 2D coords
73 terrain - perlin noise heightfield, uses surface
74 so could use surface to produce SL terrain and sculpties
75 we pass a functioon to surface, it scans through x,y; we return x, y, z
76 (terrain only changes z)
77 g3d - box, cylinder, sphere, tube, (box_strip_2d, mesh), heightfield from image, mesh files, in zips
78 position, size, rotation
79 path cut, hollow, skew, hole size, taper, top shear, slice, radius, revolutions
80 material - in this case relates to physics material, not texture material
81 + no prim turture needed, just don't implement limits
82 + extend LL prims, allow effects to be per axis, with direction
83 + subtract a prim / sculptie / mesh, or add a negative one
84 reminds me - "invisible" texture, the one that makes stuff vanish
85 flexies
86 faces - colours and textures
87 repeats, rotations, offsets
88 animated, shiny, transparent, various bump types
89 two (+ or more) types of mapping
90 full bright, glow, as light sources
91 + (sorta) cast and create shadows
92
93+ better light controls
94 each object can be lit by only a select few light sources
95 " has it's own set of shaders that override globals
96 facelights, pffft
97 " has it's own set of shaders that it uses to cast light on other objects
98 generalise LS/WL more
99
100editing controls
101 those bits and pieces that pop up in world around objects or terrain as you edit them
102
103HUD objects
104 include things like llDialog() here
105
106physics
107 basic avatar physics
108 locked, phantom, physical
109 complex physics, vehicles
110
111hovertext
112 actual hovertext, a billboard with text on it
113 avatar names
114 object / land / UI tooltips
115
116LL particle systems
117 legacy LL particle types
118 clouds, legacy clouds
119
1203D sound sources
121 land stream (ambient, not located in 3D space)
122 sound bytes
123 + prim stream
124 voice
125
126things on faces
127 + GuiLua / skang on faces
128 + notecard on a face
129 + then the ability to rez, or wear a notecard in world
130 + then the ability to rez, or wear a texture in world
131 + both cases create a flat rectangular prim to put the notecard / texture onto
132 movies on faces
133 web pages on faces, with working controls
134 + VNC style thingy on a face
135
136sculpties
137 texture, mirror, inside out, stitching type
138 + animated
139 + flexy
140
141LL meshes
142 static meshes, avatar meshes, clothes meshes
143
144+ proper mesh files
145 animated
146 flexy
147
148pathfinding stuff?
149 remembering that half of it is better done with NPCs and BVJ
150 though might be good for importing such things from typical game level assets
151
152new LL materials?
153 + should just be a matter of making the texture stuff more generic
154
155+ portals
156 a view into some other place
157 optionally you can step through them
158 a "fully open portal" just means that other place is next door
159 could also have portals through NPC's eyes
160 no reason why either end of portal has to be stationary
161 uni / bi directional, for audio / visual / traffic
162 obviously should be security aware
163 ability to create a temporary private portal to .. exactly where you are
164 basically creates a copy, runs it, puts you in both places
165 your view can be switched between them
166 each can be changed separately, COW
167 you can invite others "come see what I can see, look into my eyes, then click them"
168 save your changes, multiple times
169 better make it obvious that you are in -
170 Alice's copy of, onefang's copy of - "some_place", that - "Sum Wan" made, on - "SomeWhere" world.
171 a mirror would be a portal that just shows what's in front of it, but reversed
172
173
174--------------------------------------------------------------
175
176Not sure about these -
177
178In prim email and http servers, as allowed by LSL.
179
180 Basically scripts themselves, and all the bits that go along with
181that. Essentially all scripts must be inside objects to run. You could
182count your avatar as an object, that's running client side scripts.
183Only you, your close personal friends, and your script doctor, should be
184allowed to edit your avatars internal scripts.
185
186
187Gestures?
188
189 Are basically a simple scripting system for putting together
190animations, sounds, and local chat text. Can be triggered a variety of
191ways, including a text command it can replace. Console commands are a
192separate system, but we could replace the lot with client side Lua.
193
194
195--------------------------------------------------------------
196--------------------------------------------------------------
197
198What each engine has -
199
200
201SL EFL g3d
202
203 none
204 square
205box cube box
206cylinder cylinder cylinder
207prism
208pyramid
209tetrahydron
210hemicylinder
211cone cone
212hemicone
213sphere sphere sphere
214hemisphere
215torus torus
216tube tube
217ring
218 surface
219 terrain
220 heightfield
221SL mesh few mesh files lots of mesh files
222avatar
223
224
225--------------------------------------------------------------
226
227EFL is put together like this -
228
229scenes have one root node, and one camera node
230
231each node is of a type - camera, light, or mesh, and can only hold items of that type
232 can also be of type node, meaning contains nothing, other than other nodes I assume
233nodes have position, rotation, and scale; all of which can be inherited from the parent
234nodes are an n-ary tree structure, each one can contain several other member nodes, but can only have one parent
235a node can hold only one camera or light
236a node can hold multiple meshes
237a camera can be in multiple nodes
238a mesh can be in multiple nodes
239a light ????????????????????????
240
241key frame based animation
242 a mesh can have multiple frames
243 each frame has it's own material and geometric data
244 only one material per mesh frame
245 frame number saved in the node
246 so each node can have the same mesh, but using a different frame / material / geometry
247 not so good for skeleton, tree, or flexy animation?
248 better off using nodes for this, but then we have to deal with flexible joints and skin weghting
249 flexies also a problem
250 not to mention cloth flapping in the breeze
251 key frames might still be useful to optimise these things
252
253a material can have five textures, attached to "attributes", which can be dis/enabled
254 ambient, diffuse, specular, emission, and normal textures
255
256
257--------------------------------------------------------------
258
259Basic description of what each of those SL / EFL object bits do -
260
261none
262 EFL - no prim
263
264square
265 EFL - square
266
267surface
268 EFL - square that is morphed via a function
269
270terrain
271 EFL - surface with perlin noise function
272
273heightfield
274 surface with image supplied height
275
276sculpty
277 surface with image supplied coords
278
279box / cube
280 Typical cube / box
281
282prism
283 cube sliced diagonally in half
284 box -> top shear.x -> -0.50
285 -> taper.x -> 1.0
286
287pyramid
288 box -> taper.x,y -> 1.0,1.0
289
290tetrahedron
291 prism -> taper.x,y -> 1.0,1.0
292
293cylinder
294 solid cylinder
295
296hemicylinder
297 cylinder -> path cut b,e -> 0.250, 0.750
298
299tube
300 cylinder with a circular hole
301
302torus
303 rounded tube / donut
304
305ring
306 tube, with the top end sheared all the way in
307
308cone
309 cylinder -> taper.x,y -> 1.0,1.0
310
311hemicone
312 cylinder -> taper.x,y -> 1.0,1.0
313 path cut b,e -> 0.250, 0.750
314
315sphere
316 ball / sphere
317
318hemisphere
319 sphere -> path cut.e -> 0.500
320
321
322
323path cut B, E
324 pie slice taken out of one side
325 Direction and start point depends on basic shape.
326
327hollow H, shape
328 square, circle, or triangle hole of H size (5.0 -> 95.0)
329 default shape depends on shape of prim
330 For some the hole is completely internal, unless something else opens it
331
332twist B, E
333 twists bottom and top respectively, +/- 180 degrees
334 sphere / tube based objects go wierd, and +/- 360 degrees
335
336taper X, Y not sphere
337 taper top (or bottom if negative) of the X or Y direction
338
339top shear X, Y not sphere
340 shear the top in X or Y directions, positive or negative
341
342slice B, E not sphere, ring, torus, or tube
343 cut bottom, top off shape
344
345hole size X, Y ring, torus, and tube only
346 size of the internal hole, different from the hollow hole
347 in the X, Y directions
348 X drags the rest of the prim along, basically shortening / flattening
349
350skew S ring, torus, and tube only
351 these shapes are split, skew twists the split apart in the X direction
352
353radius R ring, torus, and tube only
354 these shapes are split, skew twists the split apart in the Y direction
355
356revolutions R ring, torus, and tube only
357 interacts with skew, default is a single revolution
358 can go up to 4 turns if skewed
359
360dimple B, E sphere only
361 a cone taken out of the top / bottom
362
363
364--------------------------------------------------------------
365--------------------------------------------------------------
366
367New object design.
368
369 Goals -
370 Do things quicker and better than EFL SURFACE.
371 Direct access to the resulting arrays, rather than passing pointers through functions for each damn point.
372 Pass a damn void pointer to the surface function.
373 Make sure things are pickable, think it might involve evas_*_aabb_add_to_frame().
374 more generic prims
375 prepare for g3d porting
376 SL "faces", and mesh files with multiple textures, can be handled by splitting them up into multiple meshes, all in the same node
377
378
379https://en.wikipedia.org/wiki/Polygonal_modeling
380
381
382CREATIONS -
383square / surface / terrain / heightfield / sculpty / billboard
384 all start with a 2D square in 3D space
385 some are mangled to suit function / image mapping coords
386 billboards are 2D sprites that always face the camera
387 imposters are billboards that replace 3D objects, when it can be hard to tell the difference, an optimization hack
388
389basic 2D shapes
390 triangle, square, polygons, circle
391
392basic paths
393 line, circle
394
395extrusion
396 a 2D shape extruded, swept along a line
397 box is an extruded square
398 prism is an extruded triangle
399 cylinder is an extruded circle
400 pyramid is an extruded square that's got taper
401 tetrahedron is an extruded triangle that's got taper
402 cone is an extruded circle that's got taper
403
404box / cube / prism / pyramid / tetrahedron
405 all variations on a box
406
407cylinder / hemicylinder / cone / hemicone
408 all variations on a cylinder
409
410sphere / hemisphere
411 all variations on a sphere
412
413tube / torus / ring
414 all an extrusion bent in a circle
415 which makes it officially a "revolve" - "generate a mesh by revolving (rotating) a shape around an axis"
416 tube is a box bent in a circle
417 torus is a cylinder bent in a circle
418 ring is a prism bent in a circle
419 could bend things in other shapes, or even follow a path
420
421loft / path
422 a 2D shape swept along a path
423
424marching cubes?
425
426
427BINARY CREATIONS -
428boolean operations (union / intersection / difference)
429 hollow difference between prim and a box, cylinder, or prism
430 dimple difference between sphere and cone
431 apparently there's also add, attach, and chamfer
432 add / attach / union what's the difference?
433 chamfer is basically a procedural rounded fill in between two things
434
435
436DEFORMATIONS -
437path cut +/- X, Y, Z direction
438
439slice +/- X, Y, Z direction, top or bottom
440
441taper +/- X, Y, Z direction
442 radius is basically taper applied to a "bent in a circle"
443
444shear +/- X, Y, Z direction, top or bottom
445 skew is basically shear applied to a "bent in a circle"
446
447twist +/- X, Y, Z direction, top or bottom, number of turns
448
449revolutions +/- how many times it is bent around in a circle
450 basically a product of the length of the extrusion compared to it's width
451 the longer it is, the more revolutions it goes around
452
453bend?
454deform and weighted deform?
455 needed for animating avatars I think
456morph?
457
458
459MANIPULATIONS -
460Displace introduce additional geometry based on a "displacement map" from the surface
461Simplify systematically remove and average vertices
462Subdivide smooth a course mesh by subdividing the mesh (Catmull-Clark, etc.)
463Convex Hull generate another mesh which minimally encloses a given mesh (think shrink-wrap)
464Cut create a hole in a mesh surface
465Stitch close a hole in a mesh surface
466
467
468MISC. -
469splines?
470NURBS are basically splines applied to a 3D surface?
471metaballs are spheres that glomp together (positive), or force apart (negative), smoothing out the juncture?
472
473
474TEXTURES -
475 heightfields
476 sculpties
477
478 ambient normal texture, but with what ever "ambient light" is falling on it
479 diffuse normal texture, as it appears under white light
480 specular shiny, reflection of the light source
481 includes a shininess EFL value
482 emission emits that colour, though not lighting up other things, glow map
483 normal bump map
484 at least one page differentiates between bump and normal maps
485
486
487 bump maps change the normal, so that the surface looks bumpy
488 SL has a bunch of fixed bump maps, though the new materials thingy might add generic bump map
489 displacement mapping is similar to bump map, only it changes the actual vertices
490
491 avoid lightmaps, pre calculated lighting is just wrong in a dynamic user created world, yet every one does it
492 might be the ambient texture above
493
494 mapping -
495 uv "Default" in SL.
496 planar
497 triplanar
498 sphere map
499 repeats, rotations, offsets
500
501 coloured
502 animated
503 transparent
504 fullbright, glow
505
506
507LIGHTS -
508 directional, the sun
509 ambient light, global flat illumination
510 point light, cast light in all directions from a point
511 spot light, cast a cone of light from a point
512
513 has a bunch of parameters
514
515
516SHADING -
517 flat
518 Gouraud
519 Phong
520 Cel / toon
521 etc.
522 custom per face shading
523
524
525--------------------------------------------------------------
526
527How EFL builds things -
528
529 evas_canvas3d_mesh_from_primitive_set()
530 evas_common_set_model_from_primitive()
531 evas_model_set_from_*_primitive()
532 ALLOCATE_VERTEX_DATA
533 _generate_indices()
534 SET_VERTEX_DATA
535 or
536 SET_VERTEX_DATA_FROM_ARRAY()
537 evas_canvas3d_mesh_frame_add()
538 evas_canvas3d_object_change()
539 evas_canvas3d_mesh_index_data_copy_set()
540 _set_vec3_vertex_data()
541 or
542 _set_vertex_data_from_array()
543
544--> evas_canvas3d_mesh_frame_vertex_data_copy_set() Not private, yay!
545 evas_canvas3d_mesh_aabb_add_to_frame() The model loaders call this as well, or evas_model_load_aabb_add_to_frame(), which wraps that.
546 Both private.
547 evas_canvas3d_object_change()
548
549So we should use one of these, to make sure we get the aabb added, so
550picking things works (I think that's how pick works) -
551
552evas_canvas3d_mesh_frame_vertex_data_copy_set() calls evas_canvas3d_mesh_aabb_add_to_frame().
553 copies the data buffer passed in
554evas_canvas3d_mesh_frame_vertex_data_set() doesn't, but does the same thing manually.
555 uses the buffer passed in, with no copy
556