

Thread Tools  Search this Thread  Display Modes 

17th February 2012, 13:35  #1 
Junior Member
Join Date: Jan 2012
Posts: 20

How to create cubic room DM
Please show me or explain the code of boxlike(room) dynamic movement. I cant understand such a code
Example Presets: Tuggummi  Let me out! UnConeD  Cubic Flower 
19th February 2012, 15:33  #2 
Junior Member
Join Date: Jan 2012
Posts: 20

Example Code (UnConeD  Watercolorcube):
code: This is a boxlike(or Cube Surface) code 
15th April 2012, 22:30  #3 
Forum King

this code performs a raytrace  with some hacks  to achieve its effect. the idea is to get the equation of a line, from a direction and start position, and intersect it with the equations of planes describing the cube to find the texture coordinates we want on the cube's surface.
ox,oy,oz are a camera position y=y*af is aspect ratio correction the big block of code involving sx, cx, sy... are rotations the k = lines are solving the raytrace and picking the correct solution x and y are then set based on the results. these are texture coordinates. alpha provides the fading to hide ugly edges. if you try and recreate this approach from scratch without copying code you should get a good understanding of the technique and be able to apply it to arbitrary situations... AVS code like this is not easy to pick apart or follow, the coding style we all used to use, the lack of comments and the obscurity of the problems all pile up to make it very difficult. 
18th July 2012, 06:24  #4 
Junior Member
Join Date: Jan 2012
Posts: 20

Could you show me a general equation of k?
Does it (ray tracing) involving with calculus? (Partial Derivative, Integral, Tangent plane, etc) 

Thread Tools  Search this Thread 
Display Modes  

